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.

Fixes: 08b52c30be ("iommu/ipmmu-vmsa: Implement basic PCIE-IPMMU OSID support")
Reported-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Mykyta Poturai <mykyta_poturai@epam.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
This commit is contained in:
Mykyta Poturai authored and Stefano Stabellini committed 2025-08-21 14:47:01 -07:00
1 parent f3365a6bfd
commit 3cf47a1e16
1 file changed
+4 -2
+4 -2
View File
@@ -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__ */
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.