Linux IOMMU Development
 help / color / mirror / Atom feed
From: Nicolin Chen <nicolinc@nvidia.com>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Jason Gunthorpe <jgg@ziepe.ca>, Kevin Tian <kevin.tian@intel.com>,
	"Joerg Roedel" <joro@8bytes.org>, Will Deacon <will@kernel.org>,
	Robin Murphy <robin.murphy@arm.com>,
	Arnd Bergmann <arnd@arndb.de>, <iommu@lists.linux.dev>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] iommufd_driver: make IOMMUFD_DRIVER_CORE a 'bool' symbol
Date: Mon, 24 Mar 2025 15:37:29 -0700	[thread overview]
Message-ID: <Z+HeqSkEZek2JpT1@nvidia.com> (raw)
In-Reply-To: <20250324210329.2809869-2-arnd@kernel.org>

On Mon, Mar 24, 2025 at 10:03:23PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> Calling iommufd_sw_msi() from iommu_dma_prepare_msi() in the iommu core
> code is no longer possible if the driver core is in a loadable module
> because it is now a direct call rather than a function pointer:
> 
> arm-linux-gnueabi-ld: drivers/iommu/iommu.o: in function `iommu_dma_prepare_msi':
> iommu.c:(.text+0x4fb4): undefined reference to `iommufd_sw_msi'
> 
> This effectively makes the iommu driver core part of the iommu subsystem
> itself, so disallow building it as a loadable module.
> 
> Fixes: e009e088d88e ("iommu: Drop sw_msi from iommu_domain")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/iommu/iommufd/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iommu/iommufd/Kconfig b/drivers/iommu/iommufd/Kconfig
> index 0a07f9449fd9..2beeb4f60ee5 100644
> --- a/drivers/iommu/iommufd/Kconfig
> +++ b/drivers/iommu/iommufd/Kconfig
> @@ -1,6 +1,6 @@
>  # SPDX-License-Identifier: GPL-2.0-only
>  config IOMMUFD_DRIVER_CORE
> -	tristate
> +	bool

Hmm, looks like giving up this "tristate" is the only option as
IOMMU_API is now accessing iommufd_sw_msi() that itself and two
functions are kind of too big to be placed in a header.

Tested-by: Nicolin Chen <nicolinc@nvidia.com>

Thanks!

  reply	other threads:[~2025-03-24 22:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-24 21:03 [PATCH 1/2] iommufd: import IOMMUFD_INTERNAL namespace Arnd Bergmann
2025-03-24 21:03 ` [PATCH 2/2] iommufd_driver: make IOMMUFD_DRIVER_CORE a 'bool' symbol Arnd Bergmann
2025-03-24 22:37   ` Nicolin Chen [this message]
2025-03-24 22:05 ` [PATCH 1/2] iommufd: import IOMMUFD_INTERNAL namespace Nicolin Chen

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=Z+HeqSkEZek2JpT1@nvidia.com \
    --to=nicolinc@nvidia.com \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=iommu@lists.linux.dev \
    --cc=jgg@ziepe.ca \
    --cc=joro@8bytes.org \
    --cc=kevin.tian@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robin.murphy@arm.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