ia64/xen-unstable

changeset 15376:39a95178edbf

[IA64] Enable more sn2 features under Xen

Signed-off-by: Jes Sorensen <jes@sgi.com>
author Alex Williamson <alex.williamson@hp.com>
date Tue Jun 19 15:17:20 2007 -0600 (2007-06-19)
parents 7d4c40c21690
children c20bc60f9243
files xen/arch/ia64/linux-xen/sn/kernel/io_init.c xen/arch/ia64/linux-xen/sn/kernel/irq.c
line diff
     1.1 --- a/xen/arch/ia64/linux-xen/sn/kernel/io_init.c	Mon Jun 18 13:50:42 2007 -0600
     1.2 +++ b/xen/arch/ia64/linux-xen/sn/kernel/io_init.c	Tue Jun 19 15:17:20 2007 -0600
     1.3 @@ -182,6 +182,7 @@ sn_pcidev_info_get(struct pci_dev *dev)
     1.4  	}
     1.5  	return NULL;
     1.6  }
     1.7 +#endif
     1.8  
     1.9  /* Older PROM flush WAR
    1.10   *
    1.11 @@ -361,6 +362,7 @@ sn_pci_window_fixup(struct pci_dev *dev,
    1.12  	controller->window = new_window;
    1.13  }
    1.14  
    1.15 +#ifndef XEN
    1.16  void sn_pci_unfixup_slot(struct pci_dev *dev)
    1.17  {
    1.18  	struct pci_dev *host_pci_dev = SN_PCIDEV_INFO(dev)->host_pci_dev;
    1.19 @@ -656,9 +658,7 @@ void sn_bus_free_sysdata(void)
    1.20  static int __init sn_io_early_init(void)
    1.21  {
    1.22  	int i, j;
    1.23 -#ifndef XEN
    1.24  	struct pci_dev *pci_dev = NULL;
    1.25 -#endif
    1.26  
    1.27  	if (!ia64_platform_is("sn2") || IS_RUNNING_ON_FAKE_PROM())
    1.28  		return 0;
     2.1 --- a/xen/arch/ia64/linux-xen/sn/kernel/irq.c	Mon Jun 18 13:50:42 2007 -0600
     2.2 +++ b/xen/arch/ia64/linux-xen/sn/kernel/irq.c	Tue Jun 19 15:17:20 2007 -0600
     2.3 @@ -27,6 +27,7 @@
     2.4  #include <asm/sn/sn_sal.h>
     2.5  
     2.6  #ifdef XEN
     2.7 +#define pci_dev_get(dev)	do {} while(0)
     2.8  #define move_native_irq(foo)	do {} while(0)
     2.9  #endif
    2.10  
    2.11 @@ -264,7 +265,6 @@ void sn_irq_init(void)
    2.12  	}
    2.13  }
    2.14  
    2.15 -#ifndef XEN
    2.16  static void register_intr_pda(struct sn_irq_info *sn_irq_info)
    2.17  {
    2.18  	int irq = sn_irq_info->irq_irq;
    2.19 @@ -278,6 +278,7 @@ static void register_intr_pda(struct sn_
    2.20  		pdacpu(cpu)->sn_first_irq = irq;
    2.21  }
    2.22  
    2.23 +#ifndef XEN
    2.24  static void unregister_intr_pda(struct sn_irq_info *sn_irq_info)
    2.25  {
    2.26  	int irq = sn_irq_info->irq_irq;
    2.27 @@ -339,9 +340,7 @@ static void unregister_intr_pda(struct s
    2.28  	spin_unlock(&sn_irq_info_lock);
    2.29  #endif
    2.30  }
    2.31 -#endif /* XEN */
    2.32  
    2.33 -#ifndef XEN
    2.34  static void sn_irq_info_free(struct rcu_head *head)
    2.35  {
    2.36  	struct sn_irq_info *sn_irq_info;
    2.37 @@ -351,7 +350,6 @@ static void sn_irq_info_free(struct rcu_
    2.38  }
    2.39  #endif
    2.40  
    2.41 -#ifndef XEN
    2.42  void sn_irq_fixup(struct pci_dev *pci_dev, struct sn_irq_info *sn_irq_info)
    2.43  {
    2.44  	nasid_t nasid = sn_irq_info->irq_nasid;
    2.45 @@ -360,7 +358,9 @@ void sn_irq_fixup(struct pci_dev *pci_de
    2.46  
    2.47  	pci_dev_get(pci_dev);
    2.48  	sn_irq_info->irq_cpuid = cpu;
    2.49 +#ifndef XEN
    2.50  	sn_irq_info->irq_pciioinfo = SN_PCIDEV_INFO(pci_dev);
    2.51 +#endif
    2.52  
    2.53  	/* link it into the sn_irq[irq] list */
    2.54  	spin_lock(&sn_irq_info_lock);
    2.55 @@ -379,6 +379,7 @@ void sn_irq_fixup(struct pci_dev *pci_de
    2.56  
    2.57  void sn_irq_unfixup(struct pci_dev *pci_dev)
    2.58  {
    2.59 +#ifndef XEN
    2.60  	struct sn_irq_info *sn_irq_info;
    2.61  
    2.62  	/* Only cleanup IRQ stuff if this device has a host bus context */
    2.63 @@ -408,8 +409,8 @@ void sn_irq_unfixup(struct pci_dev *pci_
    2.64  #endif
    2.65  	pci_dev_put(pci_dev);
    2.66  
    2.67 +#endif
    2.68  }
    2.69 -#endif
    2.70  
    2.71  static inline void
    2.72  sn_call_force_intr_provider(struct sn_irq_info *sn_irq_info)