patch-2.4.0-test10 linux/arch/ia64/dig/iosapic.c

Next file: linux/arch/ia64/hp/hpsim_console.c
Previous file: linux/arch/ia64/config.in
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/dig/iosapic.c linux/arch/ia64/dig/iosapic.c
@@ -31,6 +31,10 @@
 #include <asm/ptrace.h>
 #include <asm/system.h>
 
+#ifdef	CONFIG_ACPI_KERNEL_CONFIG
+# include <asm/acpikcfg.h>
+#endif
+
 #undef DEBUG_IRQ_ROUTING
 
 static spinlock_t iosapic_lock = SPIN_LOCK_UNLOCKED;
@@ -228,7 +232,7 @@
 {
 	struct hw_interrupt_type *irq_type;
 	struct pci_vector_struct *vectors;
-	int i, irq;
+	int i, irq, num_pci_vectors;
 
 	if (irqbase == 0)
 		/* 
@@ -255,9 +259,14 @@
 	 * Map the PCI Interrupt data into the ACPI IOSAPIC data using
 	 * the info that the bootstrap loader passed to us.
 	 */
+# ifdef CONFIG_ACPI_KERNEL_CONFIG
+	acpi_cf_get_pci_vectors(&vectors, &num_pci_vectors);
+# else
 	ia64_boot_param.pci_vectors = (__u64) __va(ia64_boot_param.pci_vectors);
 	vectors = (struct pci_vector_struct *) ia64_boot_param.pci_vectors;
-	for (i = 0; i < ia64_boot_param.num_pci_vectors; i++) {
+	num_pci_vectors = ia64_boot_param.num_pci_vectors;
+# endif
+	for (i = 0; i < num_pci_vectors; i++) {
 		irq = vectors[i].irq;
 		if (irq < 16)
 			irq = isa_irq_to_vector(irq);
@@ -277,11 +286,11 @@
 		iosapic_trigger(irq)  = IO_SAPIC_LEVEL;
 		iosapic_polarity(irq) = IO_SAPIC_POL_LOW;
 
-#ifdef DEBUG_IRQ_ROUTING
+# ifdef DEBUG_IRQ_ROUTING
 		printk("PCI: BUS %d Slot %x Pin %x IRQ %02x --> Vector %02x IOSAPIC Pin %d\n", 
 		       vectors[i].bus, vectors[i].pci_id>>16, vectors[i].pin, vectors[i].irq, 
 		       irq, iosapic_pin(irq));
-#endif
+# endif
 	}
 #endif /* CONFIG_IA64_SOFTSDV_HACKS */
 
@@ -377,7 +386,7 @@
 	unsigned int ver, v;
 	int l, max_pin;
 
-	ver = iosapic_version(iosapic->address);
+	ver = iosapic_version((unsigned long) ioremap(iosapic->address, 0));
 	max_pin = (ver >> 16) & 0xff;
 	
 	printk("IOSAPIC Version %x.%x: address 0x%lx IRQs 0x%x - 0x%x\n", 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)