[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] xen/arm: smmuv3: remove unused function



Hi Stewart,

On 12/12/2022 16:00, Stewart Hildebrand wrote:
When building with clang 12 and CONFIG_ARM_SMMU_V3=y, we observe the
following build error:

drivers/passthrough/arm/smmu-v3.c:1408:20: error: unused function 
'arm_smmu_disable_pasid' [-Werror,-Wunused-function]
static inline void arm_smmu_disable_pasid(struct arm_smmu_master *master) { }
                    ^

Remove the function.

Signed-off-by: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
---
There is also a definition of arm_smmu_disable_pasid() just above,
guarded by #ifdef CONFIG_PCI_ATS. Should this one be removed too? It
might be nice to keep this definition for ease of backporting patches
from Linux, but if we ever plan on supporting PCI_ATS in Xen this may
need to be re-visited.

Given the function is not called at all, I think this is a bit odd to remove the stub but leave the implementation when CONFIG_PCI_ATS is defined.

Rahul, do you plan to use it in the PCI passthrough code? If yes, then I would consider to use __maybe_unused.


This is a candidate for backport to 4.17, 4.16, and possibly 4.15,
although 4.15 has other issues with clang 12.

The SMMUv3 is a tech preview feature. So we don't usually backport fixes. I don't see any reason to diverge here.

Also, note that 4.15 is in any case only security supported since October 2022. So such patch would not qualify for backport.

Cheers,

--
Julien Grall



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.