]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iommu/arm-smmu-v3: Stop pre-zeroing batch commands
authorJohn Garry <john.garry@huawei.com>
Wed, 11 Aug 2021 15:49:26 +0000 (23:49 +0800)
committerWill Deacon <will@kernel.org>
Fri, 13 Aug 2021 13:26:06 +0000 (14:26 +0100)
commitfac956710ab0812f9e395e9f7a27da551412830f
tree453a56763d17cbc81a975d11e7a8721d96d22e35
parent2cbeaf3f36eb300cae1f344e125162c42fb091a3
iommu/arm-smmu-v3: Stop pre-zeroing batch commands

Pre-zeroing the batched commands structure is inefficient, as individual
commands are zeroed later in arm_smmu_cmdq_build_cmd(). The size is quite
large and commonly most commands won't even be used:

struct arm_smmu_cmdq_batch cmds = {};
345c: 52800001  mov w1, #0x0                    // #0
3460: d2808102  mov x2, #0x408                  // #1032
3464: 910143a0  add x0, x29, #0x50
3468: 94000000  bl 0 <memset>

Stop pre-zeroing the complete structure and only zero the num member.

Signed-off-by: John Garry <john.garry@huawei.com>
Link: https://lore.kernel.org/r/1628696966-88386-1-git-send-email-john.garry@huawei.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c