[PATCH] iommu: Split out and tidy up Arm Kconfig
Robin Murphy
robin.murphy at arm.com
Fri Mar 21 04:35:30 PDT 2025
On 2025-03-21 7:18 am, Pranjal Shrivastava wrote:
> On Thu, Mar 20, 2025 at 02:21:28PM +0000, Robin Murphy wrote:
>> There are quite a lot of options for the Arm drivers, still all buried
>> in the top-level Kconfig. For ease of use and consistency with all the
>> other subdirectories, break these out into drivers/arm. For similar
>> clarity and self-consistency, also tweak the ARM_SMMU sub-options to use
>> "if" instead of "depends", to match ARM_SMMU_V3. Lastly also clean up
>> the slightly messy description of ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT as
>> highlighted by Geert - by now we really shouldn't need commentary on
>> v4.x kernel behaviour anyway - and downgrade it to EXPERT as the first
>> step in the 6-year-old threat to remove it entirely.
>>
>> Cc: Geert Uytterhoeven <geert+renesas at glider.be>
>> Signed-off-by: Robin Murphy <robin.murphy at arm.com>
>> ---
>> drivers/iommu/Kconfig | 157 +-------------------------------------
>> drivers/iommu/arm/Kconfig | 144 ++++++++++++++++++++++++++++++++++
>> 2 files changed, 145 insertions(+), 156 deletions(-)
>> create mode 100644 drivers/iommu/arm/Kconfig
>>
>
> Thanks for this! It looks good.
> I was able to toggle configs and build for arm64.
>
>> +
>> +config QCOM_IOMMUa
> Nit: I don't have much context but:
>
> 1. Shall this be in .../arm/Kconfig?
Yes, it represents arm/arm-smmu/qcom-iommu.c
> Is this an custom
> implementation of some arm-smmu version? If yes, then maybe we can
> update the help string while at it?
It's based on driving preconfigured SMMU S1 contexts individually, but
with Qualcomm-specific bindings and usage flavour, hence why it lives
next to arm-smmu to share code, but remains its own distinct thing.
>> + # Note: iommu drivers cannot (yet?) be built as modules
>
> 2. I don't think this is true now? Shall we remove this comment?
Indeed it's out of date now, but I see that in itself still serving some
purpose as an indicator that nobody's yet looked to see if this driver
*could* be made modular, so I chose to leave it as-is.
>> + bool "Qualcomm IOMMU Support"
>> + depends on ARCH_QCOM || COMPILE_TEST
>> + depends on !GENERIC_ATOMIC64 # for IOMMU_IO_PGTABLE_LPAE
>> + select QCOM_SCM
>> + select IOMMU_API
>> + select IOMMU_IO_PGTABLE_LPAE
>> + select ARM_DMA_USE_IOMMU
>> + help
>> + Support for IOMMU on certain Qualcomm SoCs.
>>
>
> With the above nits:
>
> Reviewed-by: Pranjal Shrivastava <praan at google.com>
Thanks!
Robin.
More information about the linux-arm-kernel
mailing list