diff options
| -rw-r--r-- | arch/mips/ar7/setup.c | 1 | ||||
| -rw-r--r-- | arch/mips/emma/markeins/setup.c | 3 | ||||
| -rw-r--r-- | arch/mips/netlogic/xlp/setup.c | 1 | ||||
| -rw-r--r-- | arch/mips/netlogic/xlr/setup.c | 1 | ||||
| -rw-r--r-- | arch/mips/sibyte/swarm/setup.c | 2 | ||||
| -rw-r--r-- | arch/powerpc/Kconfig | 4 | ||||
| -rw-r--r-- | arch/powerpc/include/asm/setup.h | 1 | ||||
| -rw-r--r-- | arch/powerpc/kernel/setup_32.c | 3 | ||||
| -rw-r--r-- | arch/powerpc/kernel/setup_64.c | 3 | ||||
| -rw-r--r-- | arch/powerpc/platforms/pseries/setup.c | 2 | ||||
| -rw-r--r-- | include/linux/kernel.h | 9 | ||||
| -rw-r--r-- | kernel/panic.c | 2 | ||||
| -rw-r--r-- | lib/Kconfig.debug | 9 |
13 files changed, 25 insertions, 16 deletions
diff --git a/arch/mips/ar7/setup.c b/arch/mips/ar7/setup.c index 9a357fffcfbe..820b7a313d9b 100644 --- a/arch/mips/ar7/setup.c +++ b/arch/mips/ar7/setup.c | |||
| @@ -92,7 +92,6 @@ void __init plat_mem_setup(void) | |||
| 92 | _machine_restart = ar7_machine_restart; | 92 | _machine_restart = ar7_machine_restart; |
| 93 | _machine_halt = ar7_machine_halt; | 93 | _machine_halt = ar7_machine_halt; |
| 94 | pm_power_off = ar7_machine_power_off; | 94 | pm_power_off = ar7_machine_power_off; |
| 95 | panic_timeout = 3; | ||
| 96 | 95 | ||
| 97 | io_base = (unsigned long)ioremap(AR7_REGS_BASE, 0x10000); | 96 | io_base = (unsigned long)ioremap(AR7_REGS_BASE, 0x10000); |
| 98 | if (!io_base) | 97 | if (!io_base) |
diff --git a/arch/mips/emma/markeins/setup.c b/arch/mips/emma/markeins/setup.c index d71005835c00..9100122e5cef 100644 --- a/arch/mips/emma/markeins/setup.c +++ b/arch/mips/emma/markeins/setup.c | |||
| @@ -111,9 +111,6 @@ void __init plat_mem_setup(void) | |||
| 111 | iomem_resource.start = EMMA2RH_IO_BASE; | 111 | iomem_resource.start = EMMA2RH_IO_BASE; |
| 112 | iomem_resource.end = EMMA2RH_ROM_BASE - 1; | 112 | iomem_resource.end = EMMA2RH_ROM_BASE - 1; |
| 113 | 113 | ||
| 114 | /* Reboot on panic */ | ||
| 115 | panic_timeout = 180; | ||
| 116 | |||
| 117 | markeins_sio_setup(); | 114 | markeins_sio_setup(); |
| 118 | } | 115 | } |
| 119 | 116 | ||
diff --git a/arch/mips/netlogic/xlp/setup.c b/arch/mips/netlogic/xlp/setup.c index 6d981bb337ec..54e75c77184b 100644 --- a/arch/mips/netlogic/xlp/setup.c +++ b/arch/mips/netlogic/xlp/setup.c | |||
| @@ -92,7 +92,6 @@ static void __init xlp_init_mem_from_bars(void) | |||
| 92 | 92 | ||
| 93 | void __init plat_mem_setup(void) | 93 | void __init plat_mem_setup(void) |
| 94 | { | 94 | { |
| 95 | panic_timeout = 5; | ||
| 96 | _machine_restart = (void (*)(char *))nlm_linux_exit; | 95 | _machine_restart = (void (*)(char *))nlm_linux_exit; |
| 97 | _machine_halt = nlm_linux_exit; | 96 | _machine_halt = nlm_linux_exit; |
| 98 | pm_power_off = nlm_linux_exit; | 97 | pm_power_off = nlm_linux_exit; |
diff --git a/arch/mips/netlogic/xlr/setup.c b/arch/mips/netlogic/xlr/setup.c index 214d123b79fa..921be5f77797 100644 --- a/arch/mips/netlogic/xlr/setup.c +++ b/arch/mips/netlogic/xlr/setup.c | |||
| @@ -92,7 +92,6 @@ static void nlm_linux_exit(void) | |||
| 92 | 92 | ||
| 93 | void __init plat_mem_setup(void) | 93 | void __init plat_mem_setup(void) |
| 94 | { | 94 | { |
| 95 | panic_timeout = 5; | ||
| 96 | _machine_restart = (void (*)(char *))nlm_linux_exit; | 95 | _machine_restart = (void (*)(char *))nlm_linux_exit; |
| 97 | _machine_halt = nlm_linux_exit; | 96 | _machine_halt = nlm_linux_exit; |
| 98 | pm_power_off = nlm_linux_exit; | 97 | pm_power_off = nlm_linux_exit; |
diff --git a/arch/mips/sibyte/swarm/setup.c b/arch/mips/sibyte/swarm/setup.c index 41707a245dea..3462c831d0ea 100644 --- a/arch/mips/sibyte/swarm/setup.c +++ b/arch/mips/sibyte/swarm/setup.c | |||
| @@ -134,8 +134,6 @@ void __init plat_mem_setup(void) | |||
| 134 | #error invalid SiByte board configuration | 134 | #error invalid SiByte board configuration |
| 135 | #endif | 135 | #endif |
| 136 | 136 | ||
| 137 | panic_timeout = 5; /* For debug. */ | ||
| 138 | |||
| 139 | board_be_handler = swarm_be_handler; | 137 | board_be_handler = swarm_be_handler; |
| 140 | 138 | ||
| 141 | if (xicor_probe()) | 139 | if (xicor_probe()) |
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index b44b52c0a8f0..b2be8e8cb5c7 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
| @@ -147,6 +147,10 @@ config EARLY_PRINTK | |||
| 147 | bool | 147 | bool |
| 148 | default y | 148 | default y |
| 149 | 149 | ||
| 150 | config PANIC_TIMEOUT | ||
| 151 | int | ||
| 152 | default 180 | ||
| 153 | |||
| 150 | config COMPAT | 154 | config COMPAT |
| 151 | bool | 155 | bool |
| 152 | default y if PPC64 | 156 | default y if PPC64 |
diff --git a/arch/powerpc/include/asm/setup.h b/arch/powerpc/include/asm/setup.h index 703a8412dac2..11ba86e17631 100644 --- a/arch/powerpc/include/asm/setup.h +++ b/arch/powerpc/include/asm/setup.h | |||
| @@ -26,6 +26,7 @@ extern void reloc_got2(unsigned long); | |||
| 26 | void check_for_initrd(void); | 26 | void check_for_initrd(void); |
| 27 | void do_init_bootmem(void); | 27 | void do_init_bootmem(void); |
| 28 | void setup_panic(void); | 28 | void setup_panic(void); |
| 29 | #define ARCH_PANIC_TIMEOUT 180 | ||
| 29 | 30 | ||
| 30 | #endif /* !__ASSEMBLY__ */ | 31 | #endif /* !__ASSEMBLY__ */ |
| 31 | 32 | ||
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index b903dc5cf944..2b0da27eaee4 100644 --- a/arch/powerpc/kernel/setup_32.c +++ b/arch/powerpc/kernel/setup_32.c | |||
| @@ -296,9 +296,6 @@ void __init setup_arch(char **cmdline_p) | |||
| 296 | if (cpu_has_feature(CPU_FTR_UNIFIED_ID_CACHE)) | 296 | if (cpu_has_feature(CPU_FTR_UNIFIED_ID_CACHE)) |
| 297 | ucache_bsize = icache_bsize = dcache_bsize; | 297 | ucache_bsize = icache_bsize = dcache_bsize; |
| 298 | 298 | ||
| 299 | /* reboot on panic */ | ||
| 300 | panic_timeout = 180; | ||
| 301 | |||
| 302 | if (ppc_md.panic) | 299 | if (ppc_md.panic) |
| 303 | setup_panic(); | 300 | setup_panic(); |
| 304 | 301 | ||
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index 4085aaa9478f..856dd4e99bfe 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c | |||
| @@ -588,9 +588,6 @@ void __init setup_arch(char **cmdline_p) | |||
| 588 | dcache_bsize = ppc64_caches.dline_size; | 588 | dcache_bsize = ppc64_caches.dline_size; |
| 589 | icache_bsize = ppc64_caches.iline_size; | 589 | icache_bsize = ppc64_caches.iline_size; |
| 590 | 590 | ||
| 591 | /* reboot on panic */ | ||
| 592 | panic_timeout = 180; | ||
| 593 | |||
| 594 | if (ppc_md.panic) | 591 | if (ppc_md.panic) |
| 595 | setup_panic(); | 592 | setup_panic(); |
| 596 | 593 | ||
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index c1f190858701..6f76ae417f47 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c | |||
| @@ -470,7 +470,7 @@ static long pseries_little_endian_exceptions(void) | |||
| 470 | 470 | ||
| 471 | static void __init pSeries_setup_arch(void) | 471 | static void __init pSeries_setup_arch(void) |
| 472 | { | 472 | { |
| 473 | panic_timeout = 10; | 473 | set_arch_panic_timeout(10, ARCH_PANIC_TIMEOUT); |
| 474 | 474 | ||
| 475 | /* Discover PIC type and setup ppc_md accordingly */ | 475 | /* Discover PIC type and setup ppc_md accordingly */ |
| 476 | pseries_discover_pic(); | 476 | pseries_discover_pic(); |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index ecb87544cc5d..2aa3d4b000e6 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -394,6 +394,15 @@ extern int panic_on_oops; | |||
| 394 | extern int panic_on_unrecovered_nmi; | 394 | extern int panic_on_unrecovered_nmi; |
| 395 | extern int panic_on_io_nmi; | 395 | extern int panic_on_io_nmi; |
| 396 | extern int sysctl_panic_on_stackoverflow; | 396 | extern int sysctl_panic_on_stackoverflow; |
| 397 | /* | ||
| 398 | * Only to be used by arch init code. If the user over-wrote the default | ||
| 399 | * CONFIG_PANIC_TIMEOUT, honor it. | ||
| 400 | */ | ||
| 401 | static inline void set_arch_panic_timeout(int timeout, int arch_default_timeout) | ||
| 402 | { | ||
| 403 | if (panic_timeout == arch_default_timeout) | ||
| 404 | panic_timeout = timeout; | ||
| 405 | } | ||
| 397 | extern const char *print_tainted(void); | 406 | extern const char *print_tainted(void); |
| 398 | enum lockdep_ok { | 407 | enum lockdep_ok { |
| 399 | LOCKDEP_STILL_OK, | 408 | LOCKDEP_STILL_OK, |
diff --git a/kernel/panic.c b/kernel/panic.c index c00b4ceb39e8..6d6300375090 100644 --- a/kernel/panic.c +++ b/kernel/panic.c | |||
| @@ -33,7 +33,7 @@ static int pause_on_oops; | |||
| 33 | static int pause_on_oops_flag; | 33 | static int pause_on_oops_flag; |
| 34 | static DEFINE_SPINLOCK(pause_on_oops_lock); | 34 | static DEFINE_SPINLOCK(pause_on_oops_lock); |
| 35 | 35 | ||
| 36 | int panic_timeout; | 36 | int panic_timeout = CONFIG_PANIC_TIMEOUT; |
| 37 | EXPORT_SYMBOL_GPL(panic_timeout); | 37 | EXPORT_SYMBOL_GPL(panic_timeout); |
| 38 | 38 | ||
| 39 | ATOMIC_NOTIFIER_HEAD(panic_notifier_list); | 39 | ATOMIC_NOTIFIER_HEAD(panic_notifier_list); |
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index db25707aa41b..6982094a7e74 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
| @@ -761,6 +761,15 @@ config PANIC_ON_OOPS_VALUE | |||
| 761 | default 0 if !PANIC_ON_OOPS | 761 | default 0 if !PANIC_ON_OOPS |
| 762 | default 1 if PANIC_ON_OOPS | 762 | default 1 if PANIC_ON_OOPS |
| 763 | 763 | ||
| 764 | config PANIC_TIMEOUT | ||
| 765 | int "panic timeout" | ||
| 766 | default 0 | ||
| 767 | help | ||
| 768 | Set the timeout value (in seconds) until a reboot occurs when the | ||
| 769 | the kernel panics. If n = 0, then we wait forever. A timeout | ||
| 770 | value n > 0 will wait n seconds before rebooting, while a timeout | ||
| 771 | value n < 0 will reboot immediately. | ||
| 772 | |||
| 764 | config SCHED_DEBUG | 773 | config SCHED_DEBUG |
| 765 | bool "Collect scheduler debugging info" | 774 | bool "Collect scheduler debugging info" |
| 766 | depends on DEBUG_KERNEL && PROC_FS | 775 | depends on DEBUG_KERNEL && PROC_FS |
