traps.c (293e4688fe2fec87fccf84a3b1100b27191424e9) traps.c (6031d9d9ad905b514bf45572bd1877fe6b5145ab)
1/*
2 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 *

--- 76 unchanged lines hidden (view full) ---

85 return atomic_notifier_chain_unregister(&powerpc_die_chain, nb);
86}
87EXPORT_SYMBOL(unregister_die_notifier);
88
89/*
90 * Trap & Exception support
91 */
92
1/*
2 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 *

--- 76 unchanged lines hidden (view full) ---

85 return atomic_notifier_chain_unregister(&powerpc_die_chain, nb);
86}
87EXPORT_SYMBOL(unregister_die_notifier);
88
89/*
90 * Trap & Exception support
91 */
92
93#ifdef CONFIG_PMAC_BACKLIGHT
94static void pmac_backlight_unblank(void)
95{
96 mutex_lock(&pmac_backlight_mutex);
97 if (pmac_backlight) {
98 struct backlight_properties *props;
99
100 props = &pmac_backlight->props;
101 props->brightness = props->max_brightness;
102 props->power = FB_BLANK_UNBLANK;
103 backlight_update_status(pmac_backlight);
104 }
105 mutex_unlock(&pmac_backlight_mutex);
106}
107#else
108static inline void pmac_backlight_unblank(void) { }
109#endif
110
93static DEFINE_SPINLOCK(die_lock);
94
95int die(const char *str, struct pt_regs *regs, long err)
96{
97 static int die_counter;
98
99 if (debugger(regs))
100 return 1;
101
102 oops_enter();
103
104 console_verbose();
105 spin_lock_irq(&die_lock);
106 bust_spinlocks(1);
111static DEFINE_SPINLOCK(die_lock);
112
113int die(const char *str, struct pt_regs *regs, long err)
114{
115 static int die_counter;
116
117 if (debugger(regs))
118 return 1;
119
120 oops_enter();
121
122 console_verbose();
123 spin_lock_irq(&die_lock);
124 bust_spinlocks(1);
107#ifdef CONFIG_PMAC_BACKLIGHT
108 mutex_lock(&pmac_backlight_mutex);
109 if (machine_is(powermac) && pmac_backlight) {
110 struct backlight_properties *props;
125 if (machine_is(powermac))
126 pmac_backlight_unblank();
111
127
112 props = &pmac_backlight->props;
113 props->brightness = props->max_brightness;
114 props->power = FB_BLANK_UNBLANK;
115 backlight_update_status(pmac_backlight);
116 }
117 mutex_unlock(&pmac_backlight_mutex);
118#endif
119 printk("Oops: %s, sig: %ld [#%d]\n", str, err, ++die_counter);
120#ifdef CONFIG_PREEMPT
121 printk("PREEMPT ");
122#endif
123#ifdef CONFIG_SMP
124 printk("SMP NR_CPUS=%d ", NR_CPUS);
125#endif
126#ifdef CONFIG_DEBUG_PAGEALLOC

--- 981 unchanged lines hidden ---
128 printk("Oops: %s, sig: %ld [#%d]\n", str, err, ++die_counter);
129#ifdef CONFIG_PREEMPT
130 printk("PREEMPT ");
131#endif
132#ifdef CONFIG_SMP
133 printk("SMP NR_CPUS=%d ", NR_CPUS);
134#endif
135#ifdef CONFIG_DEBUG_PAGEALLOC

--- 981 unchanged lines hidden ---