From nobody Sun Feb 8 02:34:56 2026 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C80C133858F for ; Mon, 1 Dec 2025 17:30:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=13.77.154.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764610218; cv=none; b=K7zEfa89KWT/3l8/u5jrgiTb5KLYYHmrxXQCGrHPYZN7wkDp18HSpdfPPOXKqKkoQeHu+quYDi8lUgo4hviOSXGCoUvX1x5XSDpuWpdVmhHtQmoe/s5RDzjWJ1NPV36Sk1JhLV6pV5SvxE6sQLIXGrOUtK+/MeGJpZ1IrDed81Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764610218; c=relaxed/simple; bh=ch1iG4+rbAwhyHGFHyNeUh174auZewU/c2vFBb8DVF0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ER27toMHINWjiInBxnYPedM5t3JfUJvhw8/5xNr+11JtwSzIqjdpd6i1hTGmCmx3kcdj5fwv8wPuFE8oizBfNb84ZL9wqGhtlBiJnIv/xnKY5EWC7foPHt+R2//rBtcNCbeR3jkeVeysvK9vsS+BMOq3xXIQ3Gz/roufx5yf9v4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com; spf=pass smtp.mailfrom=linux.microsoft.com; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b=ekutGR0M; arc=none smtp.client-ip=13.77.154.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="ekutGR0M" Received: from DESKTOP-0403QTC.corp.microsoft.com (unknown [40.65.108.177]) by linux.microsoft.com (Postfix) with ESMTPSA id 66C02201551D; Mon, 1 Dec 2025 09:30:15 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 66C02201551D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1764610215; bh=HsIcBiKk6OaLkg7+LF8HSq/9kvaT/CtZxs5ppRMC5DU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ekutGR0MQpcrKN5c27xT/f/M2vYEjOGl5Fu2wJprZNQm6PazP/ZZxv3pw4vybXXMM zIh1BEQ2QblsDwe/rFygpazh+qUZduCTkT6oX47iLQmCmwdeeuFTQ/tioX4yWNHECw 06lHBnUWfmui84tQziipU8F5tiy+a7loK3oTPyO8= From: Jacob Pan To: linux-kernel@vger.kernel.org, "iommu@lists.linux.dev" , Jason Gunthorpe , Alex Williamson , Joerg Roedel , Will Deacon , Robin Murphy , Nicolin Chen , "Tian, Kevin" , "Liu, Yi L" Cc: skhawaja@google.com, pasha.tatashin@soleen.com, Jacob Pan , Zhang Yu , Jean Philippe-Brucker , David Matlack Subject: [RFC 1/8] iommu: Make iommu_device_register_bus available beyond selftest Date: Mon, 1 Dec 2025 09:30:05 -0800 Message-Id: <20251201173012.18371-2-jacob.pan@linux.microsoft.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20251201173012.18371-1-jacob.pan@linux.microsoft.com> References: <20251201173012.18371-1-jacob.pan@linux.microsoft.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Bus type specific registeration can be used beyond selfttest mock IOMMU driver, move it outside CONFIG_IOMMUFD_TEST. Signed-off-by: Jacob Pan --- drivers/iommu/iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index 59244c744eab..0df914a04064 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -298,7 +298,6 @@ void iommu_device_unregister(struct iommu_device *iommu) } EXPORT_SYMBOL_GPL(iommu_device_unregister); =20 -#if IS_ENABLED(CONFIG_IOMMUFD_TEST) void iommu_device_unregister_bus(struct iommu_device *iommu, const struct bus_type *bus, struct notifier_block *nb) @@ -347,6 +346,7 @@ int iommu_device_register_bus(struct iommu_device *iomm= u, } EXPORT_SYMBOL_GPL(iommu_device_register_bus); =20 +#if IS_ENABLED(CONFIG_IOMMUFD_TEST) int iommu_mock_device_add(struct device *dev, struct iommu_device *iommu) { int rc; --=20 2.34.1