traps.c (97f2aab6698f3ab2552c41c1024a65ffd0763a6d) | traps.c (cc53291521701f9c7c7265bbb3c140563174d8b2) |
---|---|
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 * --- 17 unchanged lines hidden (view full) --- 26#include <linux/user.h> 27#include <linux/a.out.h> 28#include <linux/interrupt.h> 29#include <linux/init.h> 30#include <linux/module.h> 31#include <linux/prctl.h> 32#include <linux/delay.h> 33#include <linux/kprobes.h> | 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 * --- 17 unchanged lines hidden (view full) --- 26#include <linux/user.h> 27#include <linux/a.out.h> 28#include <linux/interrupt.h> 29#include <linux/init.h> 30#include <linux/module.h> 31#include <linux/prctl.h> 32#include <linux/delay.h> 33#include <linux/kprobes.h> |
34#include <linux/kexec.h> |
|
34 35#include <asm/kdebug.h> 36#include <asm/pgtable.h> 37#include <asm/uaccess.h> 38#include <asm/system.h> 39#include <asm/io.h> 40#include <asm/machdep.h> 41#include <asm/rtas.h> --- 48 unchanged lines hidden (view full) --- 90/* 91 * Trap & Exception support 92 */ 93 94static DEFINE_SPINLOCK(die_lock); 95 96int die(const char *str, struct pt_regs *regs, long err) 97{ | 35 36#include <asm/kdebug.h> 37#include <asm/pgtable.h> 38#include <asm/uaccess.h> 39#include <asm/system.h> 40#include <asm/io.h> 41#include <asm/machdep.h> 42#include <asm/rtas.h> --- 48 unchanged lines hidden (view full) --- 91/* 92 * Trap & Exception support 93 */ 94 95static DEFINE_SPINLOCK(die_lock); 96 97int die(const char *str, struct pt_regs *regs, long err) 98{ |
98 static int die_counter; | 99 static int die_counter, crash_dump_start = 0; |
99 int nl = 0; 100 101 if (debugger(regs)) 102 return 1; 103 104 console_verbose(); 105 spin_lock_irq(&die_lock); 106 bust_spinlocks(1); --- 44 unchanged lines hidden (view full) --- 151 break; 152 } 153#endif 154 if (nl) 155 printk("\n"); 156 print_modules(); 157 show_regs(regs); 158 bust_spinlocks(0); | 100 int nl = 0; 101 102 if (debugger(regs)) 103 return 1; 104 105 console_verbose(); 106 spin_lock_irq(&die_lock); 107 bust_spinlocks(1); --- 44 unchanged lines hidden (view full) --- 152 break; 153 } 154#endif 155 if (nl) 156 printk("\n"); 157 print_modules(); 158 show_regs(regs); 159 bust_spinlocks(0); |
160 161 if (!crash_dump_start && kexec_should_crash(current)) { 162 crash_dump_start = 1; 163 spin_unlock_irq(&die_lock); 164 crash_kexec(regs); 165 /* NOTREACHED */ 166 } |
|
159 spin_unlock_irq(&die_lock); | 167 spin_unlock_irq(&die_lock); |
168 if (crash_dump_start) 169 /* 170 * Only for soft-reset: Other CPUs will be responded to an IPI 171 * sent by first kexec CPU. 172 */ 173 for(;;) 174 ; |
|
160 161 if (in_interrupt()) 162 panic("Fatal exception in interrupt"); 163 164 if (panic_on_oops) { 165#ifdef CONFIG_PPC64 166 printk(KERN_EMERG "Fatal exception: panic in 5 seconds\n"); 167 ssleep(5); --- 918 unchanged lines hidden --- | 175 176 if (in_interrupt()) 177 panic("Fatal exception in interrupt"); 178 179 if (panic_on_oops) { 180#ifdef CONFIG_PPC64 181 printk(KERN_EMERG "Fatal exception: panic in 5 seconds\n"); 182 ssleep(5); --- 918 unchanged lines hidden --- |