public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Yinghai Lu <yinghai@kernel.org>
To: Dave Airlie <airlied@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Ingo Molnar <mingo@elte.hu>
Subject: Re: oops in ioapic_write_entry
Date: Mon, 02 Aug 2010 18:34:52 -0700	[thread overview]
Message-ID: <4C57723C.1060400@kernel.org> (raw)
In-Reply-To: <4C577197.9020003@kernel.org>

On 08/02/2010 06:32 PM, Yinghai Lu wrote:
> On 08/02/2010 04:17 PM, Dave Airlie wrote:
>>>
>>> the kernel is using mptable, and the  system have mcp55, so how come
>>> with irq 35?
>>> assume we should only have ioapic irq 0 - 23 ...
>>>
>>> Can you send out boot log with "debug apic=debug pci=routeirq" with
>>> 2.6.32 and 2.6.35?
>>
>> Okay el6log is from a RHEL6 2.6.32 kernel, but it should give a good
>> baseline, the 2.6.35 oops even earlier with all those options and is
>> in the second attachment.
> 

please use this one instead..., forget to run quilt refresh before sending it.

[PATCH -v2] x86: fix pin_2_irq mapping

We should not twist gsi to irq mapping if acpi is not used.

-v2 remove not used irq_to_gsi()

Signed-off-by: Yinghai Lu <yinghai@kernel.org>

---
 arch/x86/include/asm/io_apic.h |   10 ++++++++++
 arch/x86/kernel/acpi/boot.c    |    4 ++--
 arch/x86/kernel/apic/io_apic.c |    5 +----
 3 files changed, 13 insertions(+), 6 deletions(-)

Index: linux-2.6/arch/x86/include/asm/io_apic.h
===================================================================
--- linux-2.6.orig/arch/x86/include/asm/io_apic.h
+++ linux-2.6/arch/x86/include/asm/io_apic.h
@@ -185,6 +185,16 @@ int mp_find_ioapic_pin(int ioapic, u32 g
 void __init mp_register_ioapic(int id, u32 address, u32 gsi_base);
 extern void __init pre_init_apic_IRQ0(void);
 
+#ifdef CONFIG_ACPI
+unsigned int gsi_to_irq(unsigned int gsi);
+u32 irq_to_gsi(int irq);
+#else
+static inline unsigned int gsi_to_irq(unsigned int gsi)
+{
+	return gsi;
+}
+#endif
+
 #else  /* !CONFIG_X86_IO_APIC */
 
 #define io_apic_assign_pci_irqs 0
Index: linux-2.6/arch/x86/kernel/acpi/boot.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/acpi/boot.c
+++ linux-2.6/arch/x86/kernel/acpi/boot.c
@@ -100,7 +100,7 @@ static u32 isa_irq_to_gsi[NR_IRQS_LEGACY
 	0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
 };
 
-static unsigned int gsi_to_irq(unsigned int gsi)
+unsigned int gsi_to_irq(unsigned int gsi)
 {
 	unsigned int irq = gsi + NR_IRQS_LEGACY;
 	unsigned int i;
@@ -123,7 +123,7 @@ static unsigned int gsi_to_irq(unsigned
 	return irq;
 }
 
-static u32 irq_to_gsi(int irq)
+u32 irq_to_gsi(int irq)
 {
 	unsigned int gsi;
 
Index: linux-2.6/arch/x86/kernel/apic/io_apic.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/apic/io_apic.c
+++ linux-2.6/arch/x86/kernel/apic/io_apic.c
@@ -1029,10 +1029,7 @@ static int pin_2_irq(int idx, int apic,
 	} else {
 		u32 gsi = mp_gsi_routing[apic].gsi_base + pin;
 
-		if (gsi >= NR_IRQS_LEGACY)
-			irq = gsi;
-		else
-			irq = gsi_top + gsi;
+		irq = gsi_to_irq(gsi);
 	}
 
 #ifdef CONFIG_X86_32

  reply	other threads:[~2010-08-03  1:36 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-02  5:28 oops in ioapic_write_entry Dave Airlie
2010-08-02  6:49 ` Yinghai Lu
2010-08-02 23:17   ` Dave Airlie
2010-08-03  1:32     ` Yinghai Lu
2010-08-03  1:34       ` Yinghai Lu [this message]
2010-08-03  3:13         ` Eric W. Biederman
2010-08-03  7:19           ` Yinghai Lu
2010-08-03  8:00             ` Eric W. Biederman
2010-08-03  8:04               ` Yinghai Lu
2010-08-03  8:56                 ` Eric W. Biederman
2010-08-03  9:01                   ` Yinghai Lu
2010-08-03  9:15                     ` Eric W. Biederman
2010-08-03  9:36                       ` Yinghai Lu
2010-08-03 11:08                         ` Eric W. Biederman
2010-08-03 19:45                           ` Yinghai Lu
2010-08-03 20:02                             ` Yinghai Lu
2010-08-03 21:38                             ` Eric W. Biederman
2010-08-03 23:12                               ` Dave Airlie
2010-08-04  0:00                               ` Yinghai Lu
2010-08-04  1:19                                 ` Eric W. Biederman
2010-08-04  7:33                               ` Ingo Molnar
2010-08-04  8:59                               ` Yinghai Lu
2010-08-04  9:26                                 ` Ingo Molnar
2010-08-04 12:12                                 ` Eric W. Biederman
2010-08-04 19:22                                   ` Yinghai Lu
2010-08-04 20:34                                     ` Eric W. Biederman
2010-08-04 22:06                                       ` Yinghai Lu
2010-08-03  8:00             ` Yinghai Lu
2010-08-03  8:27               ` Eric W. Biederman
2010-08-03  3:26     ` Eric W. Biederman
     [not found]       ` <AANLkTi=qtLkY0=h77=EVL+y1q41b_cMBODvL4Hu6A6wL@mail.gmail.com>
2010-08-03  6:00         ` Eric W. Biederman

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=4C57723C.1060400@kernel.org \
    --to=yinghai@kernel.org \
    --cc=airlied@gmail.com \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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