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 21/31] Coalesce pcifront.h in xenbus.c.

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 21/31] Coalesce pcifront.h in xenbus.c.
From: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Date: Thu, 5 Nov 2009 16:33:29 -0500
Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Delivery-date: Thu, 05 Nov 2009 14:04:26 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1257456819-782-21-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> <1257456819-782-19-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-20-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-21-git-send-email-konrad.wilk@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
. and the next commit should be no surprise.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
---
 drivers/xen/pcifront/pcifront.h |   77 ---------------------------------------
 drivers/xen/pcifront/xenbus.c   |   69 ++++++++++++++++++++++++++++++++++-
 2 files changed, 68 insertions(+), 78 deletions(-)
 delete mode 100644 drivers/xen/pcifront/pcifront.h

diff --git a/drivers/xen/pcifront/pcifront.h b/drivers/xen/pcifront/pcifront.h
deleted file mode 100644
index 0bb4dbe..0000000
--- a/drivers/xen/pcifront/pcifront.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * PCI Frontend - Common data structures & function declarations
- *
- *   Author: Ryan Wilson <hap9@xxxxxxxxxxxxxx>
- */
-#ifndef __XEN_PCIFRONT_H__
-#define __XEN_PCIFRONT_H__
-
-#include <linux/spinlock.h>
-#include <linux/pci.h>
-#include <xen/xenbus.h>
-#include <xen/interface/io/pciif.h>
-#include <linux/interrupt.h>
-#include <asm/atomic.h>
-#include <linux/workqueue.h>
-
-struct pci_bus_entry {
-       struct list_head list;
-       struct pci_bus *bus;
-};
-
-#define _PDEVB_op_active               (0)
-#define PDEVB_op_active                (1 << (_PDEVB_op_active))
-
-struct pcifront_device {
-       struct xenbus_device *xdev;
-       struct list_head root_buses;
-       spinlock_t dev_lock;
-
-       int evtchn;
-       int gnt_ref;
-
-       int irq;
-
-       /* Lock this when doing any operations in sh_info */
-       spinlock_t sh_info_lock;
-       struct xen_pci_sharedinfo *sh_info;
-       struct work_struct op_work;
-       unsigned long flags;
-
-};
-
-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)
-{
-}
-
-int pcifront_scan_root(struct pcifront_device *pdev,
-                      unsigned int domain, unsigned int bus);
-int pcifront_rescan_root(struct pcifront_device *pdev,
-                        unsigned int domain, unsigned int bus);
-void pcifront_free_roots(struct pcifront_device *pdev);
-
-void pcifront_do_aer(struct work_struct *data);
-
-irqreturn_t pcifront_handler_aer(int irq, void *dev);
-
-#endif /* __XEN_PCIFRONT_H__ */
diff --git a/drivers/xen/pcifront/xenbus.c b/drivers/xen/pcifront/xenbus.c
index 23d9f22..56ad256 100644
--- a/drivers/xen/pcifront/xenbus.c
+++ b/drivers/xen/pcifront/xenbus.c
@@ -10,7 +10,14 @@
 #include <xen/events.h>
 #include <xen/grant_table.h>
 #include <xen/page.h>
-#include "pcifront.h"
+#include <linux/spinlock.h>
+#include <linux/pci.h>
+#include <xen/xenbus.h>
+#include <xen/interface/io/pciif.h>
+#include <linux/interrupt.h>
+#include <asm/atomic.h>
+#include <linux/workqueue.h>
+
 
 #ifndef __init_refok
 #define __init_refok
@@ -20,6 +27,66 @@
 #define INVALID_EVTCHN    (-1)
 
 
+struct pci_bus_entry {
+       struct list_head list;
+       struct pci_bus *bus;
+};
+
+#define _PDEVB_op_active               (0)
+#define PDEVB_op_active                (1 << (_PDEVB_op_active))
+
+struct pcifront_device {
+       struct xenbus_device *xdev;
+       struct list_head root_buses;
+       spinlock_t dev_lock;
+
+       int evtchn;
+       int gnt_ref;
+
+       int irq;
+
+       /* Lock this when doing any operations in sh_info */
+       spinlock_t sh_info_lock;
+       struct xen_pci_sharedinfo *sh_info;
+       struct work_struct op_work;
+       unsigned long flags;
+
+};
+
+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)
+{
+}
+
+int pcifront_scan_root(struct pcifront_device *pdev,
+                      unsigned int domain, unsigned int bus);
+int pcifront_rescan_root(struct pcifront_device *pdev,
+                        unsigned int domain, unsigned int bus);
+void pcifront_free_roots(struct pcifront_device *pdev);
+
+void pcifront_do_aer(struct work_struct *data);
+
+irqreturn_t pcifront_handler_aer(int irq, void *dev);
+
 DEFINE_SPINLOCK(pcifront_dev_lock);
 static struct pcifront_device *pcifront_dev = NULL;
 
-- 
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>