X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=kernel%2Fpanic.c;h=3c1581eb65bd24fdf2581e63f1f9469b707f2cef;hb=f9296eb00ed30209424102d3c920e69617eea853;hp=37f3e82def52e34a78ebde925277437563bbd7bd;hpb=a91482bdcc2e0f6035702e46f1b99043a0893346;p=linux-2.6.git diff --git a/kernel/panic.c b/kernel/panic.c index 37f3e82de..3c1581eb6 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -19,17 +19,12 @@ #include #include #include -#ifdef CONFIG_KEXEC -#include -#endif -int panic_timeout = 900; -int panic_on_oops = 1; +int panic_timeout; +int panic_on_oops; int tainted; -void (*dump_function_ptr)(const char *, const struct pt_regs *) = 0; EXPORT_SYMBOL(panic_timeout); -EXPORT_SYMBOL(dump_function_ptr); struct notifier_block *panic_notifier_list; @@ -42,9 +37,6 @@ static int __init panic_setup(char *str) } __setup("panic=", panic_setup); -int netdump_mode = 0; -EXPORT_SYMBOL_GPL(netdump_mode); - /** * panic - halt the system * @fmt: The text string to print @@ -67,10 +59,7 @@ NORET_TYPE void panic(const char * fmt, ...) va_start(args, fmt); vsnprintf(buf, sizeof(buf), fmt, args); va_end(args); - printk(KERN_EMERG "Kernel panic: %s\n",buf); - if (netdump_func) - BUG(); if (in_interrupt()) printk(KERN_EMERG "In interrupt handler - not syncing\n"); else if (!current->pid) @@ -79,30 +68,20 @@ NORET_TYPE void panic(const char * fmt, ...) sys_sync(); bust_spinlocks(0); - notifier_call_chain(&panic_notifier_list, 0, buf); - #ifdef CONFIG_SMP smp_send_stop(); #endif - if (panic_timeout > 0) { + notifier_call_chain(&panic_notifier_list, 0, buf); + + if (panic_timeout > 0) + { int i; /* * Delay timeout seconds before rebooting the machine. * We can't use the "normal" timers since we just panicked.. */ printk(KERN_EMERG "Rebooting in %d seconds..",panic_timeout); -#ifdef CONFIG_KEXEC -{ - struct kimage *image; - image = xchg(&kexec_image, 0); - if (image) { - printk(KERN_EMERG "by starting a new kernel ..\n"); - mdelay(panic_timeout*1000); - machine_kexec(image); - } - } -#endif for (i = 0; i < panic_timeout; i++) { touch_nmi_watchdog(); mdelay(1000);