Skip to content

Commit

Permalink
powerpc: Clean up panic_timeout usage
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: Linus Torvalds <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Link: http://lkml.kernel.org/r/705bbe0f70fb20759151642ba0176a6414ec9f7a.1385418410.git.jbaron@akamai.com
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
almostivan authored and Ingo Molnar committed Nov 26, 2013
1 parent 7972e96 commit b71d47c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
4 changes: 4 additions & 0 deletions arch/powerpc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ config EARLY_PRINTK
bool
default y

config PANIC_TIMEOUT
int
default 180

config COMPAT
bool
default y if PPC64
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/include/asm/setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__ */

Expand Down
3 changes: 0 additions & 3 deletions arch/powerpc/kernel/setup_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
3 changes: 0 additions & 3 deletions arch/powerpc/kernel/setup_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/platforms/pseries/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit b71d47c

Please sign in to comment.