2 * PCI Frontend - arch-dependendent declarations
4 * Author: Ryan Wilson <hap9@epoch.ncsc.mil>
6 #ifndef __XEN_ASM_PCIFRONT_H__
7 #define __XEN_ASM_PCIFRONT_H__
9 #include <linux/spinlock.h>
15 struct pcifront_device;
20 struct pcifront_device *pdev;
23 static inline struct pcifront_device *
24 pcifront_get_pdev(struct pcifront_sd *sd)
29 static inline void pcifront_init_sd(struct pcifront_sd *sd, int domain,
30 struct pcifront_device *pdev)
36 #if defined(CONFIG_PCI_DOMAINS)
37 static inline int pci_domain_nr(struct pci_bus *bus)
39 struct pcifront_sd *sd = bus->sysdata;
42 static inline int pci_proc_domain(struct pci_bus *bus)
44 return pci_domain_nr(bus);
46 #endif /* CONFIG_PCI_DOMAINS */
51 #define pcifront_sd pci_controller
53 static inline struct pcifront_device *
54 pcifront_get_pdev(struct pcifront_sd *sd)
56 return (struct pcifront_device *)sd->platform_data;
59 static inline void pcifront_init_sd(struct pcifront_sd *sd, int domain,
60 struct pcifront_device *pdev)
63 sd->acpi_handle = NULL;
67 sd->platform_data = pdev;
72 extern struct rw_semaphore pci_bus_sem;
74 #endif /* __KERNEL__ */
76 #endif /* __XEN_ASM_PCIFRONT_H__ */