WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 18/31] Coalesce xen/pcifront.h in drivers/xen/pcifron

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 18/31] Coalesce xen/pcifront.h in drivers/xen/pcifront/pcifront.h
From: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Date: Thu, 5 Nov 2009 16:33:26 -0500
Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Delivery-date: Thu, 05 Nov 2009 13:55:50 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1257456819-782-18-git-send-email-konrad.wilk@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1257456819-782-1-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-2-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-3-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-4-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-5-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-6-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-7-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-8-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-9-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-10-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-11-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-12-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-13-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-14-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-15-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-16-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-17-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-18-git-send-email-konrad.wilk@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Moved all of the function declerations in the driver's pcifront.h.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
---
 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 <xen/xenbus.h>
 #include <xen/interface/io/pciif.h>
 #include <linux/interrupt.h>
-#include <xen/pcifront.h>
 #include <asm/atomic.h>
 #include <linux/workqueue.h>
 
@@ -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 <linux/acpi.h>
+#include <asm/pci.h>
+#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 <hap9@xxxxxxxxxxxxxx>
- */
-#ifndef __XEN_ASM_PCIFRONT_H__
-#define __XEN_ASM_PCIFRONT_H__
-
-#include <linux/spinlock.h>
-
-#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 <linux/acpi.h>
-#include <asm/pci.h>
-#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


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>