LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* 2.6.24 patches for mips qemu target needed for stable.
@ 2008-02-25  1:36 Samuel Masham
  2008-02-25  2:08 ` Ralf Baechle
  2008-03-11  2:13 ` Samuel Masham
  0 siblings, 2 replies; 8+ messages in thread
From: Samuel Masham @ 2008-02-25  1:36 UTC (permalink / raw)
  To: stable, Linux Kernel Mailing List, linux-mips; +Cc: Ralf Baechle, Rob Landley

Hi Stable team,

The mips build for qemu (and possibly other targets) crashes when
doing any irq probe.

Specifically this happens on boot when brining up the ne driver.

This is fixed by the following two patches from linus's tree

46f4f8f665080900e865392f4b3593be463bf0d8 - IRQ_NOPROBE helper functions
24649c00ca334955ac7d8a79f5a7834fc7ea441d - MIPS: Mark all but i8259
interrupts as no-probe.

They have no impact on any other architecture so I hope are simple to
include in the stable tree.

Thanks

Samuel

ps: Included below for reference but gmail will probably mangle the
white spaces...

commit 46f4f8f665080900e865392f4b3593be463bf0d8
Author: Ralf Baechle <ralf@linux-mips.org>
Date:   Fri Feb 8 04:22:01 2008 -0800

    IRQ_NOPROBE helper functions

    Probing non-ISA interrupts using the handle_percpu_irq as their handle_irq
    method may crash the system because handle_percpu_irq does not check
    IRQ_WAITING.  This for example hits the MIPS Qemu configuration.

    This patch provides two helper functions set_irq_noprobe and
set_irq_probe to
    set rsp.  clear the IRQ_NOPROBE flag.  The only current caller is MIPS code
    but this really belongs into generic code.

    As an aside, interrupt probing these days has become a mostly
obsolete if not
    dangerous art.  I think Linux interrupts should be changed to default to
    non-probing but that's subject of this patch.

    Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
    Acked-and-tested-by: Rob Landley <rob@landley.net>
    Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
    Cc: Ingo Molnar <mingo@elte.hu>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

diff --git a/include/linux/irq.h b/include/linux/irq.h
index a19b381..bfd9efb 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -367,6 +367,9 @@ set_irq_chained_handler(unsigned int irq,
 	__set_irq_handler(irq, handle, 1, NULL);
 }

+extern void set_irq_noprobe(unsigned int irq);
+extern void set_irq_probe(unsigned int irq);
+
 /* Handle dynamic irq creation and destruction */
 extern int create_irq(void);
 extern void destroy_irq(unsigned int irq);
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index 10e0066..cc54c62 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -589,3 +589,39 @@ set_irq_chip_and_handler_name(unsigned int irq,
struct irq_chip *chip,
 	set_irq_chip(irq, chip);
 	__set_irq_handler(irq, handle, 0, name);
 }
+
+void __init set_irq_noprobe(unsigned int irq)
+{
+	struct irq_desc *desc;
+	unsigned long flags;
+
+	if (irq >= NR_IRQS) {
+		printk(KERN_ERR "Trying to mark IRQ%d non-probeable\n", irq);
+
+		return;
+	}
+
+	desc = irq_desc + irq;
+
+	spin_lock_irqsave(&desc->lock, flags);
+	desc->status |= IRQ_NOPROBE;
+	spin_unlock_irqrestore(&desc->lock, flags);
+}
+
+void __init set_irq_probe(unsigned int irq)
+{
+	struct irq_desc *desc;
+	unsigned long flags;
+
+	if (irq >= NR_IRQS) {
+		printk(KERN_ERR "Trying to mark IRQ%d probeable\n", irq);
+
+		return;
+	}
+
+	desc = irq_desc + irq;
+
+	spin_lock_irqsave(&desc->lock, flags);
+	desc->status &= ~IRQ_NOPROBE;
+	spin_unlock_irqrestore(&desc->lock, flags);
+}

commit 24649c00ca334955ac7d8a79f5a7834fc7ea441d
Author: Ralf Baechle <ralf@linux-mips.org>
Date:   Fri Feb 8 04:22:02 2008 -0800

    MIPS: Mark all but i8259 interrupts as no-probe.

    Use set_irq_noprobe() to mark all MIPS interrupts as non-probe.
Override that
    default for i8259 interrupts.

    Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
    Acked-and-tested-by: Rob Landley <rob@landley.net>
    Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
    Cc: Ingo Molnar <mingo@elte.hu>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

diff --git a/arch/mips/kernel/i8259.c b/arch/mips/kernel/i8259.c
index 197d797..413bd1d 100644
--- a/arch/mips/kernel/i8259.c
+++ b/arch/mips/kernel/i8259.c
@@ -338,8 +338,10 @@ void __init init_i8259_irqs(void)

 	init_8259A(0);

-	for (i = I8259A_IRQ_BASE; i < I8259A_IRQ_BASE + 16; i++)
+	for (i = I8259A_IRQ_BASE; i < I8259A_IRQ_BASE + 16; i++) {
 		set_irq_chip_and_handler(i, &i8259A_chip, handle_level_irq);
+		set_irq_probe(i);
+	}

 	setup_irq(I8259A_IRQ_BASE + PIC_CASCADE_IR, &irq2);
 }
diff --git a/arch/mips/kernel/irq.c b/arch/mips/kernel/irq.c
index d06e9c9..e3309ff 100644
--- a/arch/mips/kernel/irq.c
+++ b/arch/mips/kernel/irq.c
@@ -145,6 +145,11 @@ __setup("nokgdb", nokgdb);

 void __init init_IRQ(void)
 {
+	int i;
+
+	for (i = 0; i < NR_IRQS; i++)
+		set_irq_noprobe(i);
+
 	arch_init_irq();

 #ifdef CONFIG_KGDB

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

* Re: 2.6.24 patches for mips qemu target needed for stable.
  2008-02-25  1:36 2.6.24 patches for mips qemu target needed for stable Samuel Masham
@ 2008-02-25  2:08 ` Ralf Baechle
  2008-02-25  5:31   ` Rob Landley
  2008-03-11  2:13 ` Samuel Masham
  1 sibling, 1 reply; 8+ messages in thread
From: Ralf Baechle @ 2008-02-25  2:08 UTC (permalink / raw)
  To: Samuel Masham; +Cc: stable, Linux Kernel Mailing List, linux-mips, Rob Landley

On Mon, Feb 25, 2008 at 10:36:59AM +0900, Samuel Masham wrote:

> Hi Stable team,
> 
> The mips build for qemu (and possibly other targets) crashes when
> doing any irq probe.
> 
> Specifically this happens on boot when brining up the ne driver.
> 
> This is fixed by the following two patches from linus's tree
> 
> 46f4f8f665080900e865392f4b3593be463bf0d8 - IRQ_NOPROBE helper functions
> 24649c00ca334955ac7d8a79f5a7834fc7ea441d - MIPS: Mark all but i8259
> interrupts as no-probe.
> 
> They have no impact on any other architecture so I hope are simple to
> include in the stable tree.

ACK.

  Ralf

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

* Re: 2.6.24 patches for mips qemu target needed for stable.
  2008-02-25  2:08 ` Ralf Baechle
@ 2008-02-25  5:31   ` Rob Landley
  0 siblings, 0 replies; 8+ messages in thread
From: Rob Landley @ 2008-02-25  5:31 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: Samuel Masham, stable, Linux Kernel Mailing List, linux-mips

On Sunday 24 February 2008 20:08:17 Ralf Baechle wrote:
> On Mon, Feb 25, 2008 at 10:36:59AM +0900, Samuel Masham wrote:
> > Hi Stable team,
> >
> > The mips build for qemu (and possibly other targets) crashes when
> > doing any irq probe.
> >
> > Specifically this happens on boot when brining up the ne driver.
> >
> > This is fixed by the following two patches from linus's tree
> >
> > 46f4f8f665080900e865392f4b3593be463bf0d8 - IRQ_NOPROBE helper functions
> > 24649c00ca334955ac7d8a79f5a7834fc7ea441d - MIPS: Mark all but i8259
> > interrupts as no-probe.
> >
> > They have no impact on any other architecture so I hope are simple to
> > include in the stable tree.
>
> ACK.

I'm using it against 2.6.24.2 here.  It applies cleanly and Works For Me (tm).

>   Ralf

Rob
-- 
"One of my most productive days was throwing away 1000 lines of code."
  - Ken Thompson.

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

* Re: 2.6.24 patches for mips qemu target needed for stable.
  2008-02-25  1:36 2.6.24 patches for mips qemu target needed for stable Samuel Masham
  2008-02-25  2:08 ` Ralf Baechle
@ 2008-03-11  2:13 ` Samuel Masham
  2008-03-11  3:33   ` Greg KH
  1 sibling, 1 reply; 8+ messages in thread
From: Samuel Masham @ 2008-03-11  2:13 UTC (permalink / raw)
  To: stable, Linux Kernel Mailing List, linux-mips, Greg Kroah-Hartman
  Cc: Ralf Baechle, Rob Landley

Hi Stable, Greg, all,

Just a quick ping.

Still not seeing these on the stable queue? Any issue or am i just
looking in the wrong place:-

http://www.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git

2008/2/25 Samuel Masham <samuel.masham@gmail.com>:
>
>  46f4f8f665080900e865392f4b3593be463bf0d8 - IRQ_NOPROBE helper functions
>  24649c00ca334955ac7d8a79f5a7834fc7ea441d - MIPS: Mark all but i8259
>  interrupts as no-probe.
>
>  They have no impact on any other architecture so I hope are simple to
>  include in the stable tree.

thanks,

Samuel

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

* Re: 2.6.24 patches for mips qemu target needed for stable.
  2008-03-11  2:13 ` Samuel Masham
@ 2008-03-11  3:33   ` Greg KH
  2008-03-16 22:09     ` 2.6.24.3 broke "make headers_install" Rob Landley
  0 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2008-03-11  3:33 UTC (permalink / raw)
  To: Samuel Masham
  Cc: stable, Linux Kernel Mailing List, linux-mips, Ralf Baechle, Rob Landley

On Tue, Mar 11, 2008 at 11:13:02AM +0900, Samuel Masham wrote:
> Hi Stable, Greg, all,
> 
> Just a quick ping.
> 
> Still not seeing these on the stable queue? Any issue or am i just
> looking in the wrong place:-
> 
> http://www.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git

You're looking in the right place, I'm just slow these days :)

thanks,

greg k-h

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

* 2.6.24.3 broke "make headers_install".
  2008-03-11  3:33   ` Greg KH
@ 2008-03-16 22:09     ` Rob Landley
  2008-03-16 22:14       ` Randy Dunlap
  0 siblings, 1 reply; 8+ messages in thread
From: Rob Landley @ 2008-03-16 22:09 UTC (permalink / raw)
  To: Greg KH; +Cc: Samuel Masham, stable, Linux Kernel Mailing List

On Monday 10 March 2008 22:33:06 Greg KH wrote:
> On Tue, Mar 11, 2008 at 11:13:02AM +0900, Samuel Masham wrote:
> > Hi Stable, Greg, all,
> >
> > Just a quick ping.
> >
> > Still not seeing these on the stable queue? Any issue or am i just
> > looking in the wrong place:-
> >
> > http://www.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git
>
> You're looking in the right place, I'm just slow these days :)
>
> thanks,
>
> greg k-h

Speaking of the stable queue, I just tried 2.6.24.3 and "make headers_install" 
now dies with:

make[2]: *** No rule to make target 
`/home/landley/firmware/firmware/build/temp-i686/linux/include/linux/if_addrlabel.h', 
needed by 
`/home/landley/firmware/firmware/build/cross-compiler-i686/include/linux/if_addrlabel.h'.  
Stop.

I note that 2.6.24.2 didn't do that.

The problem seems t be this hunk:

diff -ru build.bak/sources/linux/include/linux/Kbuild 
build/sources/linux/includ
e/linux/Kbuild
--- build.bak/sources/linux/include/linux/Kbuild        2008-02-10 
23:51:11.0000
00000 -0600
+++ build/sources/linux/include/linux/Kbuild    2008-02-25 
18:20:20.000000000 -0
600
@@ -217,6 +217,7 @@
 unifdef-y += icmp.h
 unifdef-y += icmpv6.h
 unifdef-y += if_addr.h
+unifdef-y += if_addrlabel.h
 unifdef-y += if_arp.h
 unifdef-y += if_bridge.h
 unifdef-y += if_ec.h

The corresponding if_addrlabel.h file isn't in the 2.6.24.3 tarball, that I 
can find...

Rob
-- 
"One of my most productive days was throwing away 1000 lines of code."
  - Ken Thompson.

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

* Re: 2.6.24.3 broke "make headers_install".
  2008-03-16 22:09     ` 2.6.24.3 broke "make headers_install" Rob Landley
@ 2008-03-16 22:14       ` Randy Dunlap
  2008-03-17  4:04         ` [stable] " Chris Wright
  0 siblings, 1 reply; 8+ messages in thread
From: Randy Dunlap @ 2008-03-16 22:14 UTC (permalink / raw)
  To: Rob Landley; +Cc: Greg KH, Samuel Masham, stable, Linux Kernel Mailing List

On Sun, 16 Mar 2008 17:09:51 -0500 Rob Landley wrote:

> On Monday 10 March 2008 22:33:06 Greg KH wrote:
> > On Tue, Mar 11, 2008 at 11:13:02AM +0900, Samuel Masham wrote:
> > > Hi Stable, Greg, all,
> > >
> > > Just a quick ping.
> > >
> > > Still not seeing these on the stable queue? Any issue or am i just
> > > looking in the wrong place:-
> > >
> > > http://www.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git
> >
> > You're looking in the right place, I'm just slow these days :)
> >
> > thanks,
> >
> > greg k-h
> 
> Speaking of the stable queue, I just tried 2.6.24.3 and "make headers_install" 
> now dies with:
> 
> make[2]: *** No rule to make target 
> `/home/landley/firmware/firmware/build/temp-i686/linux/include/linux/if_addrlabel.h', 
> needed by 
> `/home/landley/firmware/firmware/build/cross-compiler-i686/include/linux/if_addrlabel.h'.  
> Stop.
> 
> I note that 2.6.24.2 didn't do that.
> 
> The problem seems t be this hunk:
> 
> diff -ru build.bak/sources/linux/include/linux/Kbuild 
> build/sources/linux/includ
> e/linux/Kbuild
> --- build.bak/sources/linux/include/linux/Kbuild        2008-02-10 
> 23:51:11.0000
> 00000 -0600
> +++ build/sources/linux/include/linux/Kbuild    2008-02-25 
> 18:20:20.000000000 -0
> 600
> @@ -217,6 +217,7 @@
>  unifdef-y += icmp.h
>  unifdef-y += icmpv6.h
>  unifdef-y += if_addr.h
> +unifdef-y += if_addrlabel.h
>  unifdef-y += if_arp.h
>  unifdef-y += if_bridge.h
>  unifdef-y += if_ec.h
> 
> The corresponding if_addrlabel.h file isn't in the 2.6.24.3 tarball, that I 
> can find...

Yes, it's been reported a few times already and should be fixed/reverted
in the next stable release.

---
~Randy

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

* Re: [stable] 2.6.24.3 broke "make headers_install".
  2008-03-16 22:14       ` Randy Dunlap
@ 2008-03-17  4:04         ` Chris Wright
  0 siblings, 0 replies; 8+ messages in thread
From: Chris Wright @ 2008-03-17  4:04 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Rob Landley, Greg KH, Samuel Masham, stable, Linux Kernel Mailing List

* Randy Dunlap (randy.dunlap@oracle.com) wrote:
> Yes, it's been reported a few times already and should be fixed/reverted
> in the next stable release.

Yup, fix is queued up.

thanks,
-chris

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

end of thread, other threads:[~2008-03-17  4:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-25  1:36 2.6.24 patches for mips qemu target needed for stable Samuel Masham
2008-02-25  2:08 ` Ralf Baechle
2008-02-25  5:31   ` Rob Landley
2008-03-11  2:13 ` Samuel Masham
2008-03-11  3:33   ` Greg KH
2008-03-16 22:09     ` 2.6.24.3 broke "make headers_install" Rob Landley
2008-03-16 22:14       ` Randy Dunlap
2008-03-17  4:04         ` [stable] " Chris Wright

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).