aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc
diff options
context:
space:
mode:
authorJakub Bogusz <qboosh@pld-linux.org>2005-06-21 20:15:29 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-21 21:46:25 -0400
commita70d439345875d476ede258094356e2acd09b1a1 (patch)
tree0c5d63edbc020104cac05e444c4527d8bc78e857 /arch/ppc
parentba8c6d534a0144375f910e764ec965d5e8059f7a (diff)
[PATCH] ppc32: don't recursively crash in die() on CHRP/PReP machines
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. Signed-off-by: Jakub Bogusz <qboosh@pld-linux.org> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/ppc')
-rw-r--r--arch/ppc/kernel/traps.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/ppc/kernel/traps.c b/arch/ppc/kernel/traps.c
index c65731e8bc65..2ca8ecfeefd9 100644
--- a/arch/ppc/kernel/traps.c
+++ b/arch/ppc/kernel/traps.c
@@ -81,8 +81,10 @@ void die(const char * str, struct pt_regs * fp, long err)
81 console_verbose(); 81 console_verbose();
82 spin_lock_irq(&die_lock); 82 spin_lock_irq(&die_lock);
83#ifdef CONFIG_PMAC_BACKLIGHT 83#ifdef CONFIG_PMAC_BACKLIGHT
84 set_backlight_enable(1); 84 if (_machine == _MACH_Pmac) {
85 set_backlight_level(BACKLIGHT_MAX); 85 set_backlight_enable(1);
86 set_backlight_level(BACKLIGHT_MAX);
87 }
86#endif 88#endif
87 printk("Oops: %s, sig: %ld [#%d]\n", str, err, ++die_counter); 89 printk("Oops: %s, sig: %ld [#%d]\n", str, err, ++die_counter);
88#ifdef CONFIG_PREEMPT 90#ifdef CONFIG_PREEMPT