diff options
author | Jason Baron <jbaron@akamai.com> | 2013-11-25 18:23:11 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-11-26 06:12:28 -0500 |
commit | b71d47c14fba6270c0b5a0d56639bf042017025b (patch) | |
tree | 36fda52afb261fdcb6da5396179663cf2b2bafc7 | |
parent | 7972e966b032939afe63d8db22975240879dfd2a (diff) |
powerpc: Clean up panic_timeout usage
Default CONFIG_PANIC_TIMEOUT to 180 seconds on powerpc. The
pSeries continue to set the timeout to 10 seconds at run-time.
Thus, there's a small window where we don't have the correct
value on pSeries, but if this is only run-time discoverable we
don't have a better option. In any case, if the user changes the
default setting of 180 seconds, we honor that user setting.
Signed-off-by: Jason Baron <jbaron@akamai.com>
Cc: benh@kernel.crashing.org
Cc: paulus@samba.org
Cc: ralf@linux-mips.org
Cc: mpe@ellerman.id.au
Cc: felipe.contreras@gmail.com
Cc: linuxppc-dev@lists.ozlabs.org
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/705bbe0f70fb20759151642ba0176a6414ec9f7a.1385418410.git.jbaron@akamai.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-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 |
5 files changed, 6 insertions, 7 deletions
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(); |