linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC] arm: genirq: fix boot on arm platforms
@ 2010-10-14 17:29 Anand Gadiyar
  2010-10-16 16:10 ` Linus Walleij
  2010-10-16 18:32 ` Thomas Gleixner
  0 siblings, 2 replies; 3+ messages in thread
From: Anand Gadiyar @ 2010-10-14 17:29 UTC (permalink / raw)
  To: linux-arm-kernel

Commit b683de2b3 in linux-next as of 20101014 (genirq: Query
arch for number of early descriptors) seems to have broken
bootup on several ARM boards - my beagleboard gives the
following dump with earlyprintk.

NR_IRQS:402
Unable to handle kernel NULL pointer dereference at virtual address 00000028
pgd = c0004000
[00000028] *pgd=00000000
Internal error: Oops: 5 [#1]
last sysfs file:
Modules linked in:
CPU: 0    Not tainted  (2.6.36-rc7-next-20101014-linux-next-20101012+ #40)
PC is at init_IRQ+0x14/0x48
LR is at start_kernel+0x150/0x2c0
pc : [<c000b474>]    lr : [<c0008944>]    psr: 800001d3
sp : c0927fd0  ip : 000008d0  fp : 00000000
r10: 00000000  r9 : 411fc083  r8 : 8002ca24
r7 : c092a80c  r6 : c0439c44  r5 : c0439c48  r4 : c0979ac0
r3 : 00000001  r2 : 00000000  r1 : 00000001  r0 : 00000000
Flags: Nzcv  IRQs off  FIQs off  Mode SVC_32  ISA ARM  Segment kernel
Control: 10c5387f  Table: 80004019  DAC: 00000015
Process swapper (pid: 0, stack limit = 0xc09262f0)
Stack: (0xc0927fd0 to 0xc0928000)
7fc0:                                     00000192 c0008944 c00085bc 00000000
7fe0: 00000000 c0439c48 00000000 10c5387d c0979c5c 80008034 00000000 00000000
[<c000b474>] (init_IRQ+0x14/0x48) from [<c0008944>] (start_kernel+0x150/0x2c0)
[<c0008944>] (start_kernel+0x150/0x2c0) from [<80008034>] (0x80008034)
Code: e3a03000 ea000004 e3a02000 e2833001 (e5921028)
---[ end trace 1b75b31a2719ed1c ]---
Kernel panic - not syncing: Attempted to kill the idle task!

We seem to be using desc->status without assigning desc to
anything. Fix this by adding back the code that was originally
there.

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Russell King <linux@arm.linux.org.uk>
---
I'm not 100% sure this is the correct fix. I'm just reporting
that this small change allows me to boot again.

Apologies if some of you get this twice - a typo in git-send-email
caused the mail to bounce from some accounts, so I'm resending.

 arch/arm/kernel/irq.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Index: mainline/arch/arm/kernel/irq.c
===================================================================
--- mainline.orig/arch/arm/kernel/irq.c
+++ mainline/arch/arm/kernel/irq.c
@@ -157,8 +157,10 @@ void __init init_IRQ(void)
 	struct irq_desc *desc;
 	int irq;
 
-	for (irq = 0; irq < nr_irqs; irq++)
+	for (irq = 0; irq < nr_irqs; irq++) {
+		desc = irq_to_desc_alloc_node(irq, 0);
 		desc->status |= IRQ_NOREQUEST | IRQ_NOPROBE;
+	}
 
 	init_arch_irq();
 }

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH RFC] arm: genirq: fix boot on arm platforms
  2010-10-14 17:29 [PATCH RFC] arm: genirq: fix boot on arm platforms Anand Gadiyar
@ 2010-10-16 16:10 ` Linus Walleij
  2010-10-16 18:32 ` Thomas Gleixner
  1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2010-10-16 16:10 UTC (permalink / raw)
  To: linux-arm-kernel

2010/10/14 Anand Gadiyar <gadiyar@ti.com>:

> We seem to be using desc->status without assigning desc to
> anything. Fix this by adding back the code that was originally
> there.
>
> I'm not 100% sure this is the correct fix. I'm just reporting
> that this small change allows me to boot again.

Thank you for this patch Anand, it makes my
ARM RealView PB1176 and my ST-Ericsson U8500 prototype
both boot again on the -next tree!

Tested-by: Linus Walleij <linus.walleij@stericsson.com>

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH RFC] arm: genirq: fix boot on arm platforms
  2010-10-14 17:29 [PATCH RFC] arm: genirq: fix boot on arm platforms Anand Gadiyar
  2010-10-16 16:10 ` Linus Walleij
@ 2010-10-16 18:32 ` Thomas Gleixner
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Gleixner @ 2010-10-16 18:32 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, 14 Oct 2010, Anand Gadiyar wrote:

> Commit b683de2b3 in linux-next as of 20101014 (genirq: Query
> arch for number of early descriptors) seems to have broken
> bootup on several ARM boards - my beagleboard gives the
> following dump with earlyprintk.
> 
> NR_IRQS:402
> Unable to handle kernel NULL pointer dereference at virtual address 00000028
> pgd = c0004000
> [00000028] *pgd=00000000
> Internal error: Oops: 5 [#1]
> last sysfs file:
> Modules linked in:
> CPU: 0    Not tainted  (2.6.36-rc7-next-20101014-linux-next-20101012+ #40)
> PC is at init_IRQ+0x14/0x48
> LR is at start_kernel+0x150/0x2c0
> pc : [<c000b474>]    lr : [<c0008944>]    psr: 800001d3
> sp : c0927fd0  ip : 000008d0  fp : 00000000
> r10: 00000000  r9 : 411fc083  r8 : 8002ca24
> r7 : c092a80c  r6 : c0439c44  r5 : c0439c48  r4 : c0979ac0
> r3 : 00000001  r2 : 00000000  r1 : 00000001  r0 : 00000000
> Flags: Nzcv  IRQs off  FIQs off  Mode SVC_32  ISA ARM  Segment kernel
> Control: 10c5387f  Table: 80004019  DAC: 00000015
> Process swapper (pid: 0, stack limit = 0xc09262f0)
> Stack: (0xc0927fd0 to 0xc0928000)
> 7fc0:                                     00000192 c0008944 c00085bc 00000000
> 7fe0: 00000000 c0439c48 00000000 10c5387d c0979c5c 80008034 00000000 00000000
> [<c000b474>] (init_IRQ+0x14/0x48) from [<c0008944>] (start_kernel+0x150/0x2c0)
> [<c0008944>] (start_kernel+0x150/0x2c0) from [<80008034>] (0x80008034)
> Code: e3a03000 ea000004 e3a02000 e2833001 (e5921028)
> ---[ end trace 1b75b31a2719ed1c ]---
> Kernel panic - not syncing: Attempted to kill the idle task!
> 
> We seem to be using desc->status without assigning desc to
> anything. Fix this by adding back the code that was originally
> there.

Yeah, sorry. That was my fault. I applied a patch only half.

Find below the missing chunk, which makes next boot on my ARM boards
again.

Thanks,

	tglx
---
diff --git a/arch/arm/include/asm/hw_irq.h b/arch/arm/include/asm/hw_irq.h
index 90831f6..5586b7c 100644
--- a/arch/arm/include/asm/hw_irq.h
+++ b/arch/arm/include/asm/hw_irq.h
@@ -24,4 +24,6 @@ void set_irq_flags(unsigned int irq, unsigned int flags);
 #define IRQF_PROBE	(1 << 1)
 #define IRQF_NOAUTOEN	(1 << 2)
 
+#define ARCH_IRQ_INIT_FLAGS	(IRQ_NOREQUEST | IRQ_NOPROBE)
+
 #endif
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c
index 5456d11..36ad3be 100644
--- a/arch/arm/kernel/irq.c
+++ b/arch/arm/kernel/irq.c
@@ -154,12 +154,6 @@ void set_irq_flags(unsigned int irq, unsigned int iflags)
 
 void __init init_IRQ(void)
 {
-	struct irq_desc *desc;
-	int irq;
-
-	for (irq = 0; irq < nr_irqs; irq++)
-		desc->status |= IRQ_NOREQUEST | IRQ_NOPROBE;
-
 	init_arch_irq();
 }
 

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-10-16 18:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-14 17:29 [PATCH RFC] arm: genirq: fix boot on arm platforms Anand Gadiyar
2010-10-16 16:10 ` Linus Walleij
2010-10-16 18:32 ` Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).