Skip to content

Commit b71d47c

Browse files
almostivanIngo Molnar
authored andcommitted
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>
1 parent 7972e96 commit b71d47c

File tree

5 files changed

+6
-7
lines changed

5 files changed

+6
-7
lines changed

arch/powerpc/Kconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ config EARLY_PRINTK
147147
bool
148148
default y
149149

150+
config PANIC_TIMEOUT
151+
int
152+
default 180
153+
150154
config COMPAT
151155
bool
152156
default y if PPC64

arch/powerpc/include/asm/setup.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ extern void reloc_got2(unsigned long);
2626
void check_for_initrd(void);
2727
void do_init_bootmem(void);
2828
void setup_panic(void);
29+
#define ARCH_PANIC_TIMEOUT 180
2930

3031
#endif /* !__ASSEMBLY__ */
3132

arch/powerpc/kernel/setup_32.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,6 @@ void __init setup_arch(char **cmdline_p)
296296
if (cpu_has_feature(CPU_FTR_UNIFIED_ID_CACHE))
297297
ucache_bsize = icache_bsize = dcache_bsize;
298298

299-
/* reboot on panic */
300-
panic_timeout = 180;
301-
302299
if (ppc_md.panic)
303300
setup_panic();
304301

arch/powerpc/kernel/setup_64.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -588,9 +588,6 @@ void __init setup_arch(char **cmdline_p)
588588
dcache_bsize = ppc64_caches.dline_size;
589589
icache_bsize = ppc64_caches.iline_size;
590590

591-
/* reboot on panic */
592-
panic_timeout = 180;
593-
594591
if (ppc_md.panic)
595592
setup_panic();
596593

arch/powerpc/platforms/pseries/setup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ static long pseries_little_endian_exceptions(void)
470470

471471
static void __init pSeries_setup_arch(void)
472472
{
473-
panic_timeout = 10;
473+
set_arch_panic_timeout(10, ARCH_PANIC_TIMEOUT);
474474

475475
/* Discover PIC type and setup ppc_md accordingly */
476476
pseries_discover_pic();

0 commit comments

Comments
 (0)