From: Konrad Rzeszutek Wilk Subject: [PATCH 18/31] Coalesce xen/pcifront.h in drivers/xen/pcifront/pcifront.h Date: Thu, 5 Nov 2009 16:33:26 -0500 Message-ID: <1257456819-782-19-git-send-email-konrad.wilk@oracle.com> References: <1257456819-782-1-git-send-email-konrad.wilk@oracle.com> <1257456819-782-2-git-send-email-konrad.wilk@oracle.com> <1257456819-782-3-git-send-email-konrad.wilk@oracle.com> <1257456819-782-4-git-send-email-konrad.wilk@oracle.com> <1257456819-782-5-git-send-email-konrad.wilk@oracle.com> <1257456819-782-6-git-send-email-konrad.wilk@oracle.com> <1257456819-782-7-git-send-email-konrad.wilk@oracle.com> <1257456819-782-8-git-send-email-konrad.wilk@oracle.com> <1257456819-782-9-git-send-email-konrad.wilk@oracle.com> <1257456819-782-10-git-send-email-konrad.wilk@oracle.com> <1257456819-782-11-git-send-email-konrad.wilk@oracle.com> <1257456819-782-12-git-send-email-konrad.wilk@oracle.com> <1257456819-782-13-git-send-email-konrad.wilk@oracle.com> <1257456819-782-14-git-send-email-konrad.wilk@oracle.com> <1257456819-782-15-git-send-email-konrad.wilk@oracle.com> <1257456819-782-16-git-send-email-konrad.wilk@oracle.com> <1257456819-782-17-git-send-email-konrad.wilk@oracle.com> <1257456819-782-18-git-send-email-konrad.wilk@oracle.com> Return-path: In-Reply-To: <1257456819-782-18-git-send-email-konrad.wilk@oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: Jeremy Fitzhardinge , Konrad Rzeszutek Wilk List-Id: xen-devel@lists.xenproject.org Moved all of the function declerations in the driver's pcifront.h. Signed-off-by: Konrad Rzeszutek Wilk --- drivers/xen/pcifront/pcifront.h | 54 ++++++++++++++++++++++++++++- include/xen/pcifront.h | 72 --------------------------------------- 2 files changed, 53 insertions(+), 73 deletions(-) delete mode 100644 include/xen/pcifront.h diff --git a/drivers/xen/pcifront/pcifront.h b/drivers/xen/pcifront/pcifront.h index 8e24fbe..3c6a799 100644 --- a/drivers/xen/pcifront/pcifront.h +++ b/drivers/xen/pcifront/pcifront.h @@ -11,7 +11,6 @@ #include #include #include -#include #include #include @@ -41,6 +40,59 @@ struct pcifront_device { }; +#ifndef __ia64__ + +struct pcifront_sd { + int domain; + struct pcifront_device *pdev; +}; + +static inline struct pcifront_device * +pcifront_get_pdev(struct pcifront_sd *sd) +{ + return sd->pdev; +} + +static inline void pcifront_init_sd(struct pcifront_sd *sd, + unsigned int domain, unsigned int bus, + struct pcifront_device *pdev) +{ + sd->domain = domain; + sd->pdev = pdev; +} + + +static inline void pcifront_setup_root_resources(struct pci_bus *bus, + struct pcifront_sd *sd) +{ +} + +#else /* __ia64__ */ + +#include +#include +#define pcifront_sd pci_controller + +extern void xen_add_resource(struct pci_controller *, unsigned int, + unsigned int, struct acpi_resource *); +extern void xen_pcibios_setup_root_windows(struct pci_bus *, + struct pci_controller *); + +static inline struct pcifront_device * +pcifront_get_pdev(struct pcifront_sd *sd) +{ + return (struct pcifront_device *)sd->platform_data; +} + +static inline void pcifront_setup_root_resources(struct pci_bus *bus, + struct pcifront_sd *sd) +{ + xen_pcibios_setup_root_windows(bus, sd); +} + +#endif /* __ia64__ */ + +extern struct rw_semaphore pci_bus_sem; int pcifront_scan_root(struct pcifront_device *pdev, unsigned int domain, unsigned int bus); diff --git a/include/xen/pcifront.h b/include/xen/pcifront.h deleted file mode 100644 index bda9bd6..0000000 --- a/include/xen/pcifront.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * PCI Frontend - arch-dependendent declarations - * - * Author: Ryan Wilson - */ -#ifndef __XEN_ASM_PCIFRONT_H__ -#define __XEN_ASM_PCIFRONT_H__ - -#include - -#ifdef __KERNEL__ - -#ifndef __ia64__ - -struct pcifront_device; -struct pci_bus; - -struct pcifront_sd { - int domain; - struct pcifront_device *pdev; -}; - -static inline struct pcifront_device * -pcifront_get_pdev(struct pcifront_sd *sd) -{ - return sd->pdev; -} - -static inline void pcifront_init_sd(struct pcifront_sd *sd, - unsigned int domain, unsigned int bus, - struct pcifront_device *pdev) -{ - sd->domain = domain; - sd->pdev = pdev; -} - - -static inline void pcifront_setup_root_resources(struct pci_bus *bus, - struct pcifront_sd *sd) -{ -} - -#else /* __ia64__ */ - -#include -#include -#define pcifront_sd pci_controller - -extern void xen_add_resource(struct pci_controller *, unsigned int, - unsigned int, struct acpi_resource *); -extern void xen_pcibios_setup_root_windows(struct pci_bus *, - struct pci_controller *); - -static inline struct pcifront_device * -pcifront_get_pdev(struct pcifront_sd *sd) -{ - return (struct pcifront_device *)sd->platform_data; -} - -static inline void pcifront_setup_root_resources(struct pci_bus *bus, - struct pcifront_sd *sd) -{ - xen_pcibios_setup_root_windows(bus, sd); -} - -#endif /* __ia64__ */ - -extern struct rw_semaphore pci_bus_sem; - -#endif /* __KERNEL__ */ - -#endif /* __XEN_ASM_PCIFRONT_H__ */ -- 1.6.2.5