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-ia64-devel

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

To: Alex Williamson <alex.williamson@xxxxxx>
Subject: [Xen-ia64-devel] [patch] more Xenification of sn2 irq code
From: Jes Sorensen <jes@xxxxxxx>
Date: Tue, 19 Jun 2007 09:37:44 +0200
Cc: xen-ia64-devel <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 19 Jun 2007 00:35:41 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.4 (X11/20060527)
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
<Prev in Thread] Current Thread [Next in Thread>