xen: avoid generation of stub <asm/pci.h> header

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>
This commit is contained in:
Oleksii Kurochko authored and Jan Beulich committed 2023-11-13 15:00:06 +01:00
1 parent d0ea916fcd
commit dec9e02f31
4 files changed
+12 -14

No files matched your search

+1
View File
@@ -23,6 +23,7 @@
#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>
-7
View File
@@ -130,13 +130,6 @@ bool pci_check_bar(const struct pci_dev *pdev, mfn_t start, mfn_t end);
#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) {}
-7
View File
@@ -1,7 +0,0 @@
#ifndef __ASM_PPC_PCI_H__
#define __ASM_PPC_PCI_H__
struct arch_pci_dev {
};
#endif /* __ASM_PPC_PCI_H__ */
+11
View File
@@ -68,7 +68,18 @@ typedef union {
};
} 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 {
/*
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.