mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Andrew Vasquez <andrew.vasquez@qlogic.com>
Cc: Muli Ben-Yehuda <muli@il.ibm.com>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Rajesh Shah <rajesh.shah@intel.com>, Andi Kleen <ak@muc.de>,
	"Protasevich, Natalie" <Natalie.Protasevich@UNISYS.com>,
	"Luck, Tony" <tony.luck@intel.com>,
	Linus Torvalds <torvalds@osdl.org>,
	Linux-Kernel <linux-kernel@vger.kernel.org>,
	Badari Pulavarty <pbadari@gmail.com>
Subject: Re: 2.6.19-rc1 genirq causes either boot hang or "do_IRQ: cannot handle IRQ -1"
Date: Fri, 6 Oct 2006 12:42:13 -0700	[thread overview]
Message-ID: <20061006124213.28afb767.akpm@osdl.org> (raw)
In-Reply-To: <20061006190039.GN2365@n6014avq19270.qlogic.org>

On Fri, 6 Oct 2006 12:00:39 -0700
Andrew Vasquez <andrew.vasquez@qlogic.com> wrote:

> [   27.510539] Booting processor 1/2 APIC 0x1
> [   27.514684] Unable to handle kernel NULL pointer dereference at 0000000000000088 RIP: 
> [   27.520204]  [<ffffffff80225fb0>] profile_tick+0x40/0x90
> [   27.528118] PGD 0 
> [   27.530222] Oops: 0000 [1] SMP 
> [   27.533505] CPU 0 
> [   27.535610] Modules linked in:
> [   27.538755] Pid: 1, comm: swapper Not tainted 2.6.19-rc1 #5
> [   27.544367] RIP: 0010:[<ffffffff80225fb0>]  [<ffffffff80225fb0>] profile_tick+0x40/0x90
> [   27.552483] RSP: 0000:ffffffff8059ff78  EFLAGS: 00010046
> [   27.557842] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000001
> [   27.565024] RDX: ffff810081a77f40 RSI: 0000000000000046 RDI: 0000000000000001
> [   27.572203] RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000007


hm, we seem to have broken x86_64 completely.

smp_apic_timer_interrupt() needs to do

	struct pt_regs *old_regs = set_irq_regs(regs);

on entry and

	set_irq_regs(old_regs);

on exit.

But it doesn't get passed the pt_regs*

>From my reading of `macro apicinterrupt' in arch/x86_64/kernel/entry.S,
smp_apic_timer_interrupt() actually _does_ get passed the pt_reg*, only it
doesn't declare it.  I think - Andi would need to confirm.

If I'm right...


diff -puN arch/x86_64/kernel/apic.c~x86_64-irq_regs-fix arch/x86_64/kernel/apic.c
--- a/arch/x86_64/kernel/apic.c~x86_64-irq_regs-fix
+++ a/arch/x86_64/kernel/apic.c
@@ -913,8 +913,10 @@ void smp_local_timer_interrupt(void)
  * [ if a single-CPU system runs an SMP kernel then we call the local
  *   interrupt as well. Thus we cannot inline the local irq ... ]
  */
-void smp_apic_timer_interrupt(void)
+void smp_apic_timer_interrupt(struct pt_regs *regs)
 {
+	struct pt_regs *old_regs = set_irq_regs(regs);
+
 	/*
 	 * the NMI deadlock-detector uses this.
 	 */
@@ -934,6 +936,7 @@ void smp_apic_timer_interrupt(void)
 	irq_enter();
 	smp_local_timer_interrupt();
 	irq_exit();
+	set_irq_regs(old_regs);
 }
 
 /*
_



  reply	other threads:[~2006-10-06 19:43 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-05 21:22 Muli Ben-Yehuda
2006-10-06 15:14 ` Eric W. Biederman
2006-10-06 15:50   ` Muli Ben-Yehuda
2006-10-06 16:20     ` Muli Ben-Yehuda
2006-10-06 19:00       ` Andrew Vasquez
2006-10-06 19:42         ` Andrew Morton [this message]
2006-10-06 20:02           ` Andrew Vasquez
2006-10-06 20:15             ` Linus Torvalds
2006-10-06 20:18             ` Andrew Morton
2006-10-06 20:42             ` Muli Ben-Yehuda
2006-10-06 20:14           ` Linus Torvalds
2006-10-06 19:53       ` Benjamin LaHaise
2006-10-06 17:47     ` Eric W. Biederman
2006-10-06 20:23       ` Muli Ben-Yehuda
2006-10-06 23:42         ` Eric W. Biederman
2006-10-07  8:03           ` Muli Ben-Yehuda
2006-10-07 16:52             ` Eric W. Biederman
2006-10-07 17:59               ` Muli Ben-Yehuda
2006-10-08 13:39                 ` [PATCH 0/3] x86_64 irq fixes Eric W. Biederman
2006-10-08 13:41                   ` [PATCH 1/3] i386/x86_64: FIX pci_enable_irq to set dev->irq to the irq number Eric W. Biederman
2006-10-08 13:43                     ` [PATCH 2/3] i386/x86_64: Remove global IO_APIC_VECTOR Eric W. Biederman
2006-10-08 13:47                       ` [PATCH 3/3] x86_64 irq: Allocate a vector across all cpus for genapic_flat Eric W. Biederman
2006-10-08 19:01                         ` Muli Ben-Yehuda
2006-10-08 18:59                   ` [PATCH 0/3] x86_64 irq fixes Muli Ben-Yehuda
2006-10-07 19:03               ` 2.6.19-rc1 genirq causes either boot hang or "do_IRQ: cannot handle IRQ -1" Linus Torvalds
2006-10-07 19:33                 ` Arjan van de Ven
2006-10-07 19:57                   ` Linus Torvalds
2006-10-09  6:06                     ` Eric W. Biederman
2006-10-09  7:40                       ` Arjan van de Ven
2006-10-09 14:46                         ` Eric W. Biederman
2006-10-09 15:28                           ` Protasevich, Natalie
2006-10-09 15:39                             ` Arjan van de Ven
2006-10-09 16:02                               ` 2.6.19-rc1 genirq causes either boot hang or "do_IRQ: cannothandle " Protasevich, Natalie
2006-10-07 20:24                 ` 2.6.19-rc1 genirq causes either boot hang or "do_IRQ: cannot handle " Eric W. Biederman
2006-10-06 16:02   ` Linus Torvalds
2006-10-06 17:22     ` Eric W. Biederman
2006-10-06 18:08       ` Linus Torvalds
2006-10-06 18:48         ` Eric W. Biederman
2006-10-09  5:41         ` [PATCH 1/1] x86_64 irq: Scream but don't die if we receive an unexpected irq 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=20061006124213.28afb767.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=Natalie.Protasevich@UNISYS.com \
    --cc=ak@muc.de \
    --cc=andrew.vasquez@qlogic.com \
    --cc=benh@kernel.crashing.org \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=muli@il.ibm.com \
    --cc=pbadari@gmail.com \
    --cc=rajesh.shah@intel.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=torvalds@osdl.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

Powered by JetHome