linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.6][PPC32] RESEND: don't recursively crash in die() on CHRP/PReP machines
@ 2005-06-14 19:38 Jakub Bogusz
  2005-06-14 23:11 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 2+ messages in thread
From: Jakub Bogusz @ 2005-06-14 19:38 UTC (permalink / raw)
  To: linux-kernel, linuxppc-dev

This patch avoids recursive crash (leading to kernel stack overflow) in
die() on CHRP/PReP machines when CONFIG_PMAC_BACKLIGHT=y.
set_backlight_* functions are placed in pmac section, which is discarded
when _machine != _MACH_Pmac.

I already posted this patch to LKML few months ago:
http://www.ussg.iu.edu/hypermail/linux/kernel/0412.0/0300.html
and it has been applied to linux-2.4 tree, but still not 2.6.
(patch was made against 2.4.27, but still applies cleanly against
kernels up to 2.6.11.12)

Signed-off-by: Jakub Bogusz <qboosh@pld-linux.org>

--- linux-2.4.27/arch/ppc/kernel/traps.c.orig	Wed Apr 14 15:05:27 2004
+++ linux-2.4.27/arch/ppc/kernel/traps.c	Mon Nov 29 19:05:28 2004
@@ -88,8 +88,10 @@
 	console_verbose();
 	spin_lock_irq(&die_lock);
 #ifdef CONFIG_PMAC_BACKLIGHT
-	set_backlight_enable(1);
-	set_backlight_level(BACKLIGHT_MAX);
+	if (_machine == _MACH_Pmac) {
+		set_backlight_enable(1);
+		set_backlight_level(BACKLIGHT_MAX);
+	}
 #endif
 	printk("Oops: %s, sig: %ld\n", str, err);
 	show_regs(fp);


-- 
Jakub Bogusz    http://qboosh.cs.net.pl/

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

* Re: [PATCH 2.6][PPC32] RESEND: don't recursively crash in die() on CHRP/PReP machines
  2005-06-14 19:38 [PATCH 2.6][PPC32] RESEND: don't recursively crash in die() on CHRP/PReP machines Jakub Bogusz
@ 2005-06-14 23:11 ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Herrenschmidt @ 2005-06-14 23:11 UTC (permalink / raw)
  To: Jakub Bogusz; +Cc: Andrew Morton, linuxppc-dev, linux-kernel

On Tue, 2005-06-14 at 21:38 +0200, Jakub Bogusz wrote:
> This patch avoids recursive crash (leading to kernel stack overflow) in
> die() on CHRP/PReP machines when CONFIG_PMAC_BACKLIGHT=y.
> set_backlight_* functions are placed in pmac section, which is discarded
> when _machine != _MACH_Pmac.
> 
> I already posted this patch to LKML few months ago:
> http://www.ussg.iu.edu/hypermail/linux/kernel/0412.0/0300.html
> and it has been applied to linux-2.4 tree, but still not 2.6.
> (patch was made against 2.4.27, but still applies cleanly against
> kernels up to 2.6.11.12)
> 
> Signed-off-by: Jakub Bogusz <qboosh@pld-linux.org>

Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

> --- linux-2.4.27/arch/ppc/kernel/traps.c.orig	Wed Apr 14 15:05:27 2004
> +++ linux-2.4.27/arch/ppc/kernel/traps.c	Mon Nov 29 19:05:28 2004
> @@ -88,8 +88,10 @@
>  	console_verbose();
>  	spin_lock_irq(&die_lock);
>  #ifdef CONFIG_PMAC_BACKLIGHT
> -	set_backlight_enable(1);
> -	set_backlight_level(BACKLIGHT_MAX);
> +	if (_machine == _MACH_Pmac) {
> +		set_backlight_enable(1);
> +		set_backlight_level(BACKLIGHT_MAX);
> +	}
>  #endif
>  	printk("Oops: %s, sig: %ld\n", str, err);
>  	show_regs(fp);
> 
> 

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

end of thread, other threads:[~2005-06-14 23:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-14 19:38 [PATCH 2.6][PPC32] RESEND: don't recursively crash in die() on CHRP/PReP machines Jakub Bogusz
2005-06-14 23:11 ` Benjamin Herrenschmidt

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