[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2] iommu/ipmmu-vmsa: Fix build with HAS_PCI=n
- To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Mykyta Poturai <Mykyta_Poturai@xxxxxxxx>
- Date: Thu, 21 Aug 2025 11:23:55 +0000
- Accept-language: en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=XSok/gl8zoudCbmSQAT0+WE1rsc3HoymuSDCT6W4FTE=; b=vQBDM7n01oFFGBiXGH160oHPIPRvDB0cVl6csZiANnwlLa8JvyvllL9tIJEaBQmmVnPSg33aWP3GCwNq6rQiJorRlJXHZQXit7ulwcwdHA1UW9rAJcP3KuzXxddrkRlOY1sOfFBe45aFBPcfVwSrtXvbqzPfBYYgzm7Hm8C/NE+lwrRtESqXk2gpZWGws6jgueoHpTFGhu0QfR3w3B0G/xeTgA/LdJAntNZ1HDK0Y4cks26j7RPgQfi6gJ46ZT7MywYgLikyti7+nEe0t8pbdSMLjeNQ49oayGmeBkIzm0pvFJIEL2eQlN1zJJfCiNP1kam9zK/35uShaV21N9Ymig==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=mV6YcNDAiM8x1HK0jD071fwU1I1BKuJYKo5H53Hh9IMIdQ+9OCvdxBEMs4GSIAdrMn5oWaH8buqCZZzjes4gOh4HS4GMJ2YE9fWVOu3Q7bKTteCvGrUqdZQLjLpsDDRuzilKjUdXed6Q5POKStrsqoz9TqpL3ikZefO1VDRhKeG59maAOq+QaRR5P7goxin9UmjGjR7MWd/zTKXXsxTkVxyjJsA6PtG8FOGUfEHGkNKZnUCxDGkk+HyKCDZIJ3U7JPoyMQurqJiR7ld77IdhRNbA76eAui9Y/9j/4UWA//C+V/vW4cLt/MceorvxR+9Iqc5f46c1ZSFMdiK400XxdA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
- Cc: Mykyta Poturai <Mykyta_Poturai@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
- Delivery-date: Thu, 21 Aug 2025 11:24:10 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHcEo4Ufb3CXIWr1ky3KSQI/1VSSA==
- Thread-topic: [PATCH v2] iommu/ipmmu-vmsa: Fix build with HAS_PCI=n
With PCI disabled the build fails due to undefined struct
pci_host_bridge.
Add ifdef guard to pci-host-rcar4.h to not require the stuct being
defined when PCI support is disabled. All call sites are already covered
by HAS_PCI check, so no dummy implementations are needed.
Also move includes under the header guard to not break MISRA rules.
Reported-by: Jan Beulich <jbeulich@xxxxxxxx>
Signed-off-by: Mykyta Poturai <mykyta_poturai@xxxxxxxx>
---
xen/arch/arm/pci/pci-host-rcar4.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/xen/arch/arm/pci/pci-host-rcar4.h
b/xen/arch/arm/pci/pci-host-rcar4.h
index 8ac6626a22..31ef9d2d40 100644
--- a/xen/arch/arm/pci/pci-host-rcar4.h
+++ b/xen/arch/arm/pci/pci-host-rcar4.h
@@ -1,9 +1,10 @@
/* SPDX-License-Identifier: GPL-2.0-only */
-#include <asm/pci.h>
-
#ifndef __PCI_HOST_RCAR4_H__
#define __PCI_HOST_RCAR4_H__
+#include <asm/pci.h>
+
+#ifdef CONFIG_HAS_PCI
void rcar4_pcie_osid_bdf_set(struct pci_host_bridge *bridge,
unsigned int reg_id, uint32_t osid, uint32_t bdf);
void rcar4_pcie_osid_bdf_clear(struct pci_host_bridge *bridge,
@@ -14,5 +15,6 @@ int rcar4_pcie_osid_reg_alloc(struct pci_host_bridge *bridge);
void rcar4_pcie_osid_reg_free(struct pci_host_bridge *bridge,
unsigned int reg_id);
int rcar4_pcie_osid_regs_init(struct pci_host_bridge *bridge);
+#endif
#endif /* __PCI_HOST_RCAR4_H__ */
--
2.34.1
|