Merge git://git.infradead.org/~dwmw2/cafe-2.6
[sfrench/cifs-2.6.git] / arch / ia64 / sn / pci / pcibr / pcibr_provider.c
index 98f716bd92f0ce414d414f8c1c6cf68523d01f7f..27dd7df0f446c606bfc17572af0622fab0a45825 100644 (file)
@@ -74,12 +74,28 @@ static int sal_pcibr_error_interrupt(struct pcibus_info *soft)
        return (int)ret_stuff.v0;
 }
 
+u16 sn_ioboard_to_pci_bus(struct pci_bus *pci_bus)
+{
+       s64 rc;
+       u16 ioboard;
+       nasid_t nasid = NASID_GET(SN_PCIBUS_BUSSOFT(pci_bus)->bs_base);
+
+       rc = ia64_sn_sysctl_ioboard_get(nasid, &ioboard);
+       if (rc) {
+               printk(KERN_WARNING "ia64_sn_sysctl_ioboard_get failed: %ld\n",
+                      rc);
+               return 0;
+       }
+
+       return ioboard;
+}
+
 /* 
  * PCI Bridge Error interrupt handler.  Gets invoked whenever a PCI 
  * bridge sends an error interrupt.
  */
 static irqreturn_t
-pcibr_error_intr_handler(int irq, void *arg, struct pt_regs *regs)
+pcibr_error_intr_handler(int irq, void *arg)
 {
        struct pcibus_info *soft = (struct pcibus_info *)arg;
 
@@ -122,8 +138,8 @@ pcibr_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
        /*
         * register the bridge's error interrupt handler
         */
-       if (request_irq(SGI_PCIASIC_ERROR, (void *)pcibr_error_intr_handler,
-                       SA_SHIRQ, "PCIBR error", (void *)(soft))) {
+       if (request_irq(SGI_PCIASIC_ERROR, pcibr_error_intr_handler,
+                       IRQF_SHARED, "PCIBR error", (void *)(soft))) {
                printk(KERN_WARNING
                       "pcibr cannot allocate interrupt for error handler\n");
        }
@@ -255,3 +271,4 @@ pcibr_init_provider(void)
 
 EXPORT_SYMBOL_GPL(sal_pcibr_slot_enable);
 EXPORT_SYMBOL_GPL(sal_pcibr_slot_disable);
+EXPORT_SYMBOL_GPL(sn_ioboard_to_pci_bus);