mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Natalie.Protasevich@unisys.com
To: linux-kernel@vger.kernel.org
Cc: akpm@osdl.org, Natalie.Protasevich@unisys.com
Subject: [patch 1/2] Incorrect PCI interrupt assignment on ES7000 for platform GSI
Date: Mon, 13 Sep 2004 19:50:59 -0600	[thread overview]
Message-ID: <200409140151.i8E1p03W023713@localhost.localdomain> (raw)

Resending the patches for PCI interrupt assignment problem after proper formatting (sorry, Andrew!)

In arch/i386/kernel/acpi/boot.c, platform GSI does not propagate back from mp_register_gsi() to a calling routine which results in IRQ to be set for wrong GSI. This causes most of the PCI slots on the first PCI module to fail.  This patch fixes the problem by returning new GSI back to acpi_register_gsi().

Signed-off-by: Natalie Protasevich <Natalie.Protasevich@xxxxxxxxxx>

---

 linux-root/arch/i386/kernel/acpi/boot.c |    5 +++--
 linux-root/arch/i386/kernel/mpparse.c   |   11 ++++++-----
 linux-root/include/asm-i386/mpspec.h    |    2 +-
 3 files changed, 10 insertions(+), 8 deletions(-)

diff -puN arch/i386/kernel/acpi/boot.c~mypatch arch/i386/kernel/acpi/boot.c
--- linux/arch/i386/kernel/acpi/boot.c~mypatch	2004-09-13 14:08:21.192015024 -0600
+++ linux-root/arch/i386/kernel/acpi/boot.c	2004-09-13 14:10:51.457171248 -0600
@@ -442,6 +442,7 @@ int acpi_gsi_to_irq(u32 gsi, unsigned in
 unsigned int acpi_register_gsi(u32 gsi, int edge_level, int active_high_low)
 {
 	unsigned int irq;
+	unsigned int plat_gsi;
 
 #ifdef CONFIG_PCI
 	/*
@@ -463,10 +464,10 @@ unsigned int acpi_register_gsi(u32 gsi, 
 
 #ifdef CONFIG_X86_IO_APIC
 	if (acpi_irq_model == ACPI_IRQ_MODEL_IOAPIC) {
-		mp_register_gsi(gsi, edge_level, active_high_low);
+		plat_gsi = mp_register_gsi(gsi, edge_level, active_high_low);
 	}
 #endif
-	acpi_gsi_to_irq(gsi, &irq);
+	acpi_gsi_to_irq(plat_gsi, &irq);
 	return irq;
 }
 EXPORT_SYMBOL(acpi_register_gsi);
diff -puN include/asm-i386/mpspec.h~mypatch include/asm-i386/mpspec.h
--- linux/include/asm-i386/mpspec.h~mypatch	2004-09-13 14:08:21.249006360 -0600
+++ linux-root/include/asm-i386/mpspec.h	2004-09-13 14:09:52.381152168 -0600
@@ -33,7 +33,7 @@ extern void mp_register_lapic_address (u
 extern void mp_register_ioapic (u8 id, u32 address, u32 gsi_base);
 extern void mp_override_legacy_irq (u8 bus_irq, u8 polarity, u8 trigger, u32 gsi);
 extern void mp_config_acpi_legacy_irqs (void);
-extern void mp_register_gsi (u32 gsi, int edge_level, int active_high_low);
+extern int mp_register_gsi (u32 gsi, int edge_level, int active_high_low);
 #endif /*CONFIG_ACPI_BOOT*/
 
 #define PHYSID_ARRAY_SIZE	BITS_TO_LONGS(MAX_APICS)
diff -puN arch/i386/kernel/mpparse.c~mypatch arch/i386/kernel/mpparse.c
--- linux/arch/i386/kernel/mpparse.c~mypatch	2004-09-13 14:08:21.311996784 -0600
+++ linux-root/arch/i386/kernel/mpparse.c	2004-09-13 14:12:00.562665616 -0600
@@ -1051,7 +1051,7 @@ void __init mp_config_acpi_legacy_irqs (
 
 int (*platform_rename_gsi)(int ioapic, int gsi);
 
-void mp_register_gsi (u32 gsi, int edge_level, int active_high_low)
+int mp_register_gsi (u32 gsi, int edge_level, int active_high_low)
 {
 	int			ioapic = -1;
 	int			ioapic_pin = 0;
@@ -1060,13 +1060,13 @@ void mp_register_gsi (u32 gsi, int edge_
 #ifdef CONFIG_ACPI_BUS
 	/* Don't set up the ACPI SCI because it's already set up */
 	if (acpi_fadt.sci_int == gsi)
-		return;
+		return gsi;
 #endif
 
 	ioapic = mp_find_ioapic(gsi);
 	if (ioapic < 0) {
 		printk(KERN_WARNING "No IOAPIC for GSI %u\n", gsi);
-		return;
+		return gsi;
 	}
 
 	ioapic_pin = gsi - mp_ioapic_routing[ioapic].gsi_base;
@@ -1085,12 +1085,12 @@ void mp_register_gsi (u32 gsi, int edge_
 		printk(KERN_ERR "Invalid reference to IOAPIC pin "
 			"%d-%d\n", mp_ioapic_routing[ioapic].apic_id, 
 			ioapic_pin);
-		return;
+		return gsi;
 	}
 	if ((1<<bit) & mp_ioapic_routing[ioapic].pin_programmed[idx]) {
 		Dprintk(KERN_DEBUG "Pin %d-%d already programmed\n",
 			mp_ioapic_routing[ioapic].apic_id, ioapic_pin);
-		return;
+		return gsi;
 	}
 
 	mp_ioapic_routing[ioapic].pin_programmed[idx] |= (1<<bit);
@@ -1098,6 +1098,7 @@ void mp_register_gsi (u32 gsi, int edge_
 	io_apic_set_pci_routing(ioapic, ioapic_pin, gsi,
 		    edge_level == ACPI_EDGE_SENSITIVE ? 0 : 1,
 		    active_high_low == ACPI_ACTIVE_HIGH ? 0 : 1);
+	return gsi;
 }
 
 #endif /*CONFIG_X86_IO_APIC && (CONFIG_ACPI_INTERPRETER || CONFIG_ACPI_BOOT)*/
_

             reply	other threads:[~2004-09-14  1:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-14  1:50 Natalie.Protasevich [this message]
2004-09-14  2:35 ` Tonnerre
2004-09-14  3:36 Protasevich, Natalie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200409140151.i8E1p03W023713@localhost.localdomain \
    --to=natalie.protasevich@unisys.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®