Platforms which doesn't have HAS_PCI enabled it is needed to
have <asm/pci.h>, which contains only an empty definition of
struct arch_pci_dev (except Arm, it introduces several Arm-specific
functions ).
Also, for architectures (such as PPC or RISC-V) on initial
stages of adding support, it is needed to generate <asm/pci.h>
for only define the mentioned above arch_pci_dev structure.
For the Arm-only stubs (mentioned in <asm/pci.h> for disabled
HAS_PCI and Arm-specific) will be needed
to add <asm/pci.h> directly alongside <xen/pci.h>. Only to
<arm/domain.c> <asm/pci.h> was added.
Suggested-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Julien Grall <jgrall@amazon.com>
#include <asm/kernel.h>
#include <asm/setup.h>
#include <asm/tee/tee.h>
+#include <asm/pci.h>
#include <asm/platform.h>
#include <asm/psci.h>
#include <asm/setup.h>
#else /*!CONFIG_HAS_PCI*/
-struct arch_pci_dev { };
-
-static always_inline bool is_pci_passthrough_enabled(void)
-{
- return false;
-}
-
struct pci_dev;
static inline void arch_pci_init_pdev(struct pci_dev *pdev) {}
+++ /dev/null
-#ifndef __ASM_PPC_PCI_H__
-#define __ASM_PPC_PCI_H__
-
-struct arch_pci_dev {
-};
-
-#endif /* __ASM_PPC_PCI_H__ */
};
} pci_sbdf_t;
+#ifdef CONFIG_HAS_PCI
#include <asm/pci.h>
+#else
+
+struct arch_pci_dev { };
+
+static inline bool is_pci_passthrough_enabled(void)
+{
+ return false;
+}
+
+#endif
struct pci_dev_info {
/*