[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-ia64-devel] [patch] more Xenification of sn2 irq code



Hi,

Just a cleanup of some of the #ifdef's in the sn2 specific code.

Cheers,
Jes

# HG changeset patch
# User jes@xxxxxxxxxxxxxxxx
# Date 1182238538 -7200
# Node ID f5c03237a7f0e136721291e390374826e9c97f4a
# Parent  6acbcc8500005bc2f6094901c53226ff218f091c
Enable more sn2 features under Xen

Signed-off-by: Jes Sorensen <jes@xxxxxxx>

diff -r 6acbcc850000 -r f5c03237a7f0 xen/arch/ia64/linux-xen/sn/kernel/io_init.c
--- a/xen/arch/ia64/linux-xen/sn/kernel/io_init.c       Mon Jun 18 17:04:56 
2007 +0200
+++ b/xen/arch/ia64/linux-xen/sn/kernel/io_init.c       Tue Jun 19 09:35:38 
2007 +0200
@@ -182,6 +182,7 @@ sn_pcidev_info_get(struct pci_dev *dev)
        }
        return NULL;
 }
+#endif
 
 /* Older PROM flush WAR
  *
@@ -361,6 +362,7 @@ sn_pci_window_fixup(struct pci_dev *dev,
        controller->window = new_window;
 }
 
+#ifndef XEN
 void sn_pci_unfixup_slot(struct pci_dev *dev)
 {
        struct pci_dev *host_pci_dev = SN_PCIDEV_INFO(dev)->host_pci_dev;
@@ -656,9 +658,7 @@ static int __init sn_io_early_init(void)
 static int __init sn_io_early_init(void)
 {
        int i, j;
-#ifndef XEN
        struct pci_dev *pci_dev = NULL;
-#endif
 
        if (!ia64_platform_is("sn2") || IS_RUNNING_ON_FAKE_PROM())
                return 0;
diff -r 6acbcc850000 -r f5c03237a7f0 xen/arch/ia64/linux-xen/sn/kernel/irq.c
--- a/xen/arch/ia64/linux-xen/sn/kernel/irq.c   Mon Jun 18 17:04:56 2007 +0200
+++ b/xen/arch/ia64/linux-xen/sn/kernel/irq.c   Tue Jun 19 09:35:38 2007 +0200
@@ -27,6 +27,7 @@
 #include <asm/sn/sn_sal.h>
 
 #ifdef XEN
+#define pci_dev_get(dev)       do {} while(0)
 #define move_native_irq(foo)   do {} while(0)
 #endif
 
@@ -264,7 +265,6 @@ void sn_irq_init(void)
        }
 }
 
-#ifndef XEN
 static void register_intr_pda(struct sn_irq_info *sn_irq_info)
 {
        int irq = sn_irq_info->irq_irq;
@@ -278,6 +278,7 @@ static void register_intr_pda(struct sn_
                pdacpu(cpu)->sn_first_irq = irq;
 }
 
+#ifndef XEN
 static void unregister_intr_pda(struct sn_irq_info *sn_irq_info)
 {
        int irq = sn_irq_info->irq_irq;
@@ -339,9 +340,7 @@ static void unregister_intr_pda(struct s
        spin_unlock(&sn_irq_info_lock);
 #endif
 }
-#endif /* XEN */
-
-#ifndef XEN
+
 static void sn_irq_info_free(struct rcu_head *head)
 {
        struct sn_irq_info *sn_irq_info;
@@ -351,7 +350,6 @@ static void sn_irq_info_free(struct rcu_
 }
 #endif
 
-#ifndef XEN
 void sn_irq_fixup(struct pci_dev *pci_dev, struct sn_irq_info *sn_irq_info)
 {
        nasid_t nasid = sn_irq_info->irq_nasid;
@@ -360,7 +358,9 @@ void sn_irq_fixup(struct pci_dev *pci_de
 
        pci_dev_get(pci_dev);
        sn_irq_info->irq_cpuid = cpu;
+#ifndef XEN
        sn_irq_info->irq_pciioinfo = SN_PCIDEV_INFO(pci_dev);
+#endif
 
        /* link it into the sn_irq[irq] list */
        spin_lock(&sn_irq_info_lock);
@@ -379,6 +379,7 @@ void sn_irq_fixup(struct pci_dev *pci_de
 
 void sn_irq_unfixup(struct pci_dev *pci_dev)
 {
+#ifndef XEN
        struct sn_irq_info *sn_irq_info;
 
        /* Only cleanup IRQ stuff if this device has a host bus context */
@@ -408,8 +409,8 @@ void sn_irq_unfixup(struct pci_dev *pci_
 #endif
        pci_dev_put(pci_dev);
 
-}
-#endif
+#endif
+}
 
 static inline void
 sn_call_force_intr_provider(struct sn_irq_info *sn_irq_info)
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.