powerpc: Clean up panic_timeout usage
authorJason Baron <jbaron@akamai.com>
Mon, 25 Nov 2013 23:23:11 +0000 (23:23 +0000)
committerIngo Molnar <mingo@kernel.org>
Tue, 26 Nov 2013 11:12:28 +0000 (12:12 +0100)
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>
arch/powerpc/Kconfig
arch/powerpc/include/asm/setup.h
arch/powerpc/kernel/setup_32.c
arch/powerpc/kernel/setup_64.c
arch/powerpc/platforms/pseries/setup.c

index b44b52c0a8f07d2854d5a21ca6fb2ecf409409c1..b2be8e8cb5c71471864e9fafebf6a475cab67bec 100644 (file)
@@ -147,6 +147,10 @@ config EARLY_PRINTK
        bool
        default y
 
+config PANIC_TIMEOUT
+       int
+       default 180
+
 config COMPAT
        bool
        default y if PPC64
index 703a8412dac28e2a567b4d1b4da5586ae890c34a..11ba86e176315e4ef260c8eb740ba52ca347c192 100644 (file)
@@ -26,6 +26,7 @@ extern void reloc_got2(unsigned long);
 void check_for_initrd(void);
 void do_init_bootmem(void);
 void setup_panic(void);
+#define ARCH_PANIC_TIMEOUT 180
 
 #endif /* !__ASSEMBLY__ */
 
index b903dc5cf944aee99fc36629fdb974f3e26b6888..2b0da27eaee4242f156d37bfbb4efa06bad334df 100644 (file)
@@ -296,9 +296,6 @@ void __init setup_arch(char **cmdline_p)
        if (cpu_has_feature(CPU_FTR_UNIFIED_ID_CACHE))
                ucache_bsize = icache_bsize = dcache_bsize;
 
-       /* reboot on panic */
-       panic_timeout = 180;
-
        if (ppc_md.panic)
                setup_panic();
 
index 4085aaa9478fd90eff1f1ce149d661bc7488284f..856dd4e99bfe459cdb430f5cba6fbc0b3229be89 100644 (file)
@@ -588,9 +588,6 @@ void __init setup_arch(char **cmdline_p)
        dcache_bsize = ppc64_caches.dline_size;
        icache_bsize = ppc64_caches.iline_size;
 
-       /* reboot on panic */
-       panic_timeout = 180;
-
        if (ppc_md.panic)
                setup_panic();
 
index c1f1908587011d6d131dd56bdf2e1cb283c41128..6f76ae417f47e561bbf7e8b01c588a8e73f6374d 100644 (file)
@@ -470,7 +470,7 @@ static long pseries_little_endian_exceptions(void)
 
 static void __init pSeries_setup_arch(void)
 {
-       panic_timeout = 10;
+       set_arch_panic_timeout(10, ARCH_PANIC_TIMEOUT);
 
        /* Discover PIC type and setup ppc_md accordingly */
        pseries_discover_pic();
This page took 0.039175 seconds and 5 git commands to generate.