Linux IOMMU Development
 help / color / mirror / Atom feed
From: Robin Murphy <robin.murphy@arm.com>
To: Pranjal Shrivastava <praan@google.com>
Cc: joro@8bytes.org, will@kernel.org, iommu@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org,
	Geert Uytterhoeven <geert+renesas@glider.be>
Subject: Re: [PATCH] iommu: Split out and tidy up Arm Kconfig
Date: Fri, 21 Mar 2025 11:35:30 +0000	[thread overview]
Message-ID: <fe800f66-ed99-49ed-8010-67702ab4542d@arm.com> (raw)
In-Reply-To: <Z90St0D6hyphtOID@google.com>

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@glider.be>
>> Signed-off-by: Robin Murphy <robin.murphy@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@google.com>

Thanks!

Robin.

  reply	other threads:[~2025-03-21 11:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-20 14:21 [PATCH] iommu: Split out and tidy up Arm Kconfig Robin Murphy
2025-03-21  7:18 ` Pranjal Shrivastava
2025-03-21 11:35   ` Robin Murphy [this message]
2025-04-17 14:34 ` Joerg Roedel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fe800f66-ed99-49ed-8010-67702ab4542d@arm.com \
    --to=robin.murphy@arm.com \
    --cc=geert+renesas@glider.be \
    --cc=iommu@lists.linux.dev \
    --cc=joro@8bytes.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=praan@google.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox