[PATCH 2.6][PPC32] RESEND: don't recursively crash in die() on CHRP/PReP machines

Jakub Bogusz qboosh at pld-linux.org
Wed Jun 15 05:38:26 EST 2005

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:
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

Signed-off-by: Jakub Bogusz <qboosh at 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 @@
-	set_backlight_enable(1);
-	set_backlight_level(BACKLIGHT_MAX);
+	if (_machine == _MACH_Pmac) {
+		set_backlight_enable(1);
+		set_backlight_level(BACKLIGHT_MAX);
+	}
 	printk("Oops: %s, sig: %ld\n", str, err);

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

More information about the Linuxppc-dev mailing list