[Linux-ia64] Using Linus's tree for IA64.

From: Peter Chubb <peter_at_chubb.wattle.id.au>
Date: 2003-07-04 12:04:09
I've been trying to use Linus's tree directly for IA64.  

You need two patches to get it to work:
  1.  H. J. Lu's `use ./incbin' patch to usr/makefile

  http://marc.theaimsgroup.com/?l=linux-kernel&m=105537201719611&w=2

  2. The appended patch derived from David's tree to get ACPI to route
     interrupts properly.



# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.1385  -> 1.1386 
#	drivers/acpi/pci_irq.c	1.18    -> 1.19   
#	  drivers/acpi/osl.c	1.40    -> 1.41   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/07/04	peterc@gelato.unsw.edu.au	1.1386
# Import from David's 2.5 tree: make ACPI interrupt routing work on IA64.
# --------------------------------------------
#
diff -Nru a/drivers/acpi/osl.c b/drivers/acpi/osl.c
--- a/drivers/acpi/osl.c	Fri Jul  4 11:53:44 2003
+++ b/drivers/acpi/osl.c	Fri Jul  4 11:53:44 2003
@@ -250,7 +250,14 @@
 	irq = acpi_fadt.sci_int;
 
 #ifdef CONFIG_IA64
-	irq = gsi_to_vector(irq);
+	int vector;
+
+	vector = acpi_irq_to_vector(irq);
+	if (vector < 0) {
+		printk(KERN_ERR PREFIX "SCI (IRQ%d) not registerd\n", irq);
+		return AE_OK;
+	}
+	irq = vector;
 #endif
 	acpi_irq_irq = irq;
 	acpi_irq_handler = handler;
@@ -268,7 +275,7 @@
 {
 	if (acpi_irq_handler) {
 #ifdef CONFIG_IA64
-		irq = gsi_to_vector(irq);
+		irq = acpi_irq_to_vector(irq);
 #endif
 		free_irq(irq, acpi_irq);
 		acpi_irq_handler = NULL;
diff -Nru a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c
--- a/drivers/acpi/pci_irq.c	Fri Jul  4 11:53:44 2003
+++ b/drivers/acpi/pci_irq.c	Fri Jul  4 11:53:44 2003
@@ -36,6 +36,9 @@
 #ifdef CONFIG_X86_IO_APIC
 #include <asm/mpspec.h>
 #endif
+#ifdef CONFIG_IOSAPIC
+# include <asm/iosapic.h>
+#endif
 #include <acpi/acpi_bus.h>
 #include <acpi/acpi_drivers.h>
 
@@ -248,6 +251,8 @@
 		return_VALUE(0);
 	}
 
+	entry->irq = entry->link.index;
+
 	if (!entry->irq && entry->link.handle) {
 		entry->irq = acpi_pci_link_get_irq(entry->link.handle, entry->link.index);
 		if (!entry->irq) {
@@ -307,7 +312,6 @@
 {
 	int			irq = 0;
 	u8			pin = 0;
-	static u16		irq_mask = 0;
 
 	ACPI_FUNCTION_TRACE("acpi_pci_irq_enable");
 
@@ -356,7 +360,11 @@
 		}
  	}
 
+#ifdef CONFIG_IA64
+	dev->irq = gsi_to_irq(irq);
+#else
 	dev->irq = irq;
+#endif
 
 	ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device %s using IRQ %d\n", dev->slot_name, dev->irq));
 
@@ -369,6 +377,10 @@
 		irq_mask |= (1 << dev->irq);
 		eisa_set_level_irq(dev->irq);
 	}
+#endif
+#ifdef CONFIG_IOSAPIC
+	if (acpi_irq_model == ACPI_IRQ_MODEL_IOSAPIC)
+		iosapic_enable_intr(dev->irq);
 #endif
 
 	return_VALUE(dev->irq);


_______________________________________________
Linux-IA64 mailing list
Linux-IA64@linuxia64.org
http://lists.linuxia64.org/lists/listinfo/linux-ia64
Received on Thu Jul 3 22:13:34 2003

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:16 EST