Rev | Line | |
---|
[34] | 1 | /* |
---|
| 2 | * PCI Frontend - Common data structures & function declarations |
---|
| 3 | * |
---|
| 4 | * Author: Ryan Wilson <hap9@epoch.ncsc.mil> |
---|
| 5 | */ |
---|
| 6 | #ifndef __XEN_PCIFRONT_H__ |
---|
| 7 | #define __XEN_PCIFRONT_H__ |
---|
| 8 | |
---|
| 9 | #include <linux/spinlock.h> |
---|
| 10 | #include <linux/pci.h> |
---|
| 11 | #include <xen/xenbus.h> |
---|
| 12 | #include <xen/interface/io/pciif.h> |
---|
| 13 | #include <xen/pcifront.h> |
---|
| 14 | |
---|
| 15 | struct pci_bus_entry { |
---|
| 16 | struct list_head list; |
---|
| 17 | struct pci_bus *bus; |
---|
| 18 | }; |
---|
| 19 | |
---|
| 20 | struct pcifront_device { |
---|
| 21 | struct xenbus_device *xdev; |
---|
| 22 | struct list_head root_buses; |
---|
| 23 | spinlock_t dev_lock; |
---|
| 24 | |
---|
| 25 | int evtchn; |
---|
| 26 | int gnt_ref; |
---|
| 27 | |
---|
| 28 | /* Lock this when doing any operations in sh_info */ |
---|
| 29 | spinlock_t sh_info_lock; |
---|
| 30 | struct xen_pci_sharedinfo *sh_info; |
---|
| 31 | }; |
---|
| 32 | |
---|
| 33 | int pcifront_connect(struct pcifront_device *pdev); |
---|
| 34 | void pcifront_disconnect(struct pcifront_device *pdev); |
---|
| 35 | |
---|
| 36 | int pcifront_scan_root(struct pcifront_device *pdev, |
---|
| 37 | unsigned int domain, unsigned int bus); |
---|
| 38 | void pcifront_free_roots(struct pcifront_device *pdev); |
---|
| 39 | |
---|
| 40 | #endif /* __XEN_PCIFRONT_H__ */ |
---|
Note: See
TracBrowser
for help on using the repository browser.