ia64/xen-unstable

view linux-2.6-xen-sparse/include/xen/pcifront.h @ 14100:e47738923a05

[LINUX] Purge include <linux/config.h>. It has been obsolete for some time now.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
author Ian Campbell <ian.campbell@xensource.com>
date Fri Feb 23 16:56:45 2007 +0000 (2007-02-23)
parents 3adf00179a63
children d4f59e652078
line source
1 /*
2 * PCI Frontend - arch-dependendent declarations
3 *
4 * Author: Ryan Wilson <hap9@epoch.ncsc.mil>
5 */
6 #ifndef __XEN_ASM_PCIFRONT_H__
7 #define __XEN_ASM_PCIFRONT_H__
9 #include <linux/spinlock.h>
11 #ifdef __KERNEL__
13 #ifndef __ia64__
15 struct pcifront_device;
16 struct pci_bus;
18 struct pcifront_sd {
19 int domain;
20 struct pcifront_device *pdev;
21 };
23 static inline struct pcifront_device *
24 pcifront_get_pdev(struct pcifront_sd *sd)
25 {
26 return sd->pdev;
27 }
29 static inline void pcifront_init_sd(struct pcifront_sd *sd, int domain,
30 struct pcifront_device *pdev)
31 {
32 sd->domain = domain;
33 sd->pdev = pdev;
34 }
36 #if defined(CONFIG_PCI_DOMAINS)
37 static inline int pci_domain_nr(struct pci_bus *bus)
38 {
39 struct pcifront_sd *sd = bus->sysdata;
40 return sd->domain;
41 }
42 static inline int pci_proc_domain(struct pci_bus *bus)
43 {
44 return pci_domain_nr(bus);
45 }
46 #endif /* CONFIG_PCI_DOMAINS */
48 #else /* __ia64__ */
50 #include <asm/pci.h>
51 #define pcifront_sd pci_controller
53 static inline struct pcifront_device *
54 pcifront_get_pdev(struct pcifront_sd *sd)
55 {
56 return (struct pcifront_device *)sd->platform_data;
57 }
59 static inline void pcifront_init_sd(struct pcifront_sd *sd, int domain,
60 struct pcifront_device *pdev)
61 {
62 sd->segment = domain;
63 sd->acpi_handle = NULL;
64 sd->iommu = NULL;
65 sd->windows = 0;
66 sd->window = NULL;
67 sd->platform_data = pdev;
68 }
70 #endif /* __ia64__ */
72 extern struct rw_semaphore pci_bus_sem;
74 #endif /* __KERNEL__ */
76 #endif /* __XEN_ASM_PCIFRONT_H__ */