direct-io.hg

view linux-2.6-xen-sparse/include/xen/pcifront.h @ 13973:c4ed5b740a8d

linux: remove {lock,unlock}_vm_area(). Instead use vmalloc_sync_all()
in alloc_vm_area().
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Fri Feb 16 11:24:10 2007 +0000 (2007-02-16)
parents 3adf00179a63
children e47738923a05
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/config.h>
10 #include <linux/spinlock.h>
12 #ifdef __KERNEL__
14 #ifndef __ia64__
16 struct pcifront_device;
17 struct pci_bus;
19 struct pcifront_sd {
20 int domain;
21 struct pcifront_device *pdev;
22 };
24 static inline struct pcifront_device *
25 pcifront_get_pdev(struct pcifront_sd *sd)
26 {
27 return sd->pdev;
28 }
30 static inline void pcifront_init_sd(struct pcifront_sd *sd, int domain,
31 struct pcifront_device *pdev)
32 {
33 sd->domain = domain;
34 sd->pdev = pdev;
35 }
37 #if defined(CONFIG_PCI_DOMAINS)
38 static inline int pci_domain_nr(struct pci_bus *bus)
39 {
40 struct pcifront_sd *sd = bus->sysdata;
41 return sd->domain;
42 }
43 static inline int pci_proc_domain(struct pci_bus *bus)
44 {
45 return pci_domain_nr(bus);
46 }
47 #endif /* CONFIG_PCI_DOMAINS */
49 #else /* __ia64__ */
51 #include <asm/pci.h>
52 #define pcifront_sd pci_controller
54 static inline struct pcifront_device *
55 pcifront_get_pdev(struct pcifront_sd *sd)
56 {
57 return (struct pcifront_device *)sd->platform_data;
58 }
60 static inline void pcifront_init_sd(struct pcifront_sd *sd, int domain,
61 struct pcifront_device *pdev)
62 {
63 sd->segment = domain;
64 sd->acpi_handle = NULL;
65 sd->iommu = NULL;
66 sd->windows = 0;
67 sd->window = NULL;
68 sd->platform_data = pdev;
69 }
71 #endif /* __ia64__ */
73 extern struct rw_semaphore pci_bus_sem;
75 #endif /* __KERNEL__ */
77 #endif /* __XEN_ASM_PCIFRONT_H__ */