From: tip-bot for Jason Baron <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
a.p.zijlstra@chello.nl, torvalds@linux-foundation.org,
jbaron@akamai.com, akpm@linux-foundation.org, tglx@linutronix.de
Subject: [tip:core/debug] powerpc: Clean up panic_timeout usage
Date: Tue, 26 Nov 2013 06:21:27 -0800 [thread overview]
Message-ID: <tip-b71d47c14fba6270c0b5a0d56639bf042017025b@git.kernel.org> (raw)
In-Reply-To: <705bbe0f70fb20759151642ba0176a6414ec9f7a.1385418410.git.jbaron@akamai.com>
Commit-ID: b71d47c14fba6270c0b5a0d56639bf042017025b
Gitweb: http://git.kernel.org/tip/b71d47c14fba6270c0b5a0d56639bf042017025b
Author: Jason Baron <jbaron@akamai.com>
AuthorDate: Mon, 25 Nov 2013 23:23:11 +0000
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 26 Nov 2013 12:12:28 +0100
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>
---
arch/powerpc/Kconfig | 4 ++++
arch/powerpc/include/asm/setup.h | 1 +
arch/powerpc/kernel/setup_32.c | 3 ---
arch/powerpc/kernel/setup_64.c | 3 ---
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 b44b52c..b2be8e8 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -147,6 +147,10 @@ config EARLY_PRINTK
bool
default y
+config PANIC_TIMEOUT
+ int
+ default 180
+
config COMPAT
bool
default y if PPC64
diff --git a/arch/powerpc/include/asm/setup.h b/arch/powerpc/include/asm/setup.h
index 703a841..11ba86e 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);
void check_for_initrd(void);
void do_init_bootmem(void);
void setup_panic(void);
+#define ARCH_PANIC_TIMEOUT 180
#endif /* !__ASSEMBLY__ */
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index b903dc5..2b0da27 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)
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();
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index 4085aaa..856dd4e 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)
dcache_bsize = ppc64_caches.dline_size;
icache_bsize = ppc64_caches.iline_size;
- /* reboot on panic */
- panic_timeout = 180;
-
if (ppc_md.panic)
setup_panic();
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index c1f1908..6f76ae4 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)
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();
next prev parent reply other threads:[~2013-11-26 14:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-25 23:23 [PATCH 0/3 v3] build in panic_timeout value Jason Baron
2013-11-25 23:23 ` [PATCH 1/3 v3] panic: Make panic_timeout configurable Jason Baron
2013-11-26 14:21 ` [tip:core/debug] " tip-bot for Jason Baron
2013-11-25 23:23 ` [PATCH 2/3 v3] mips: remove panic_timeout settings Jason Baron
2013-11-26 14:21 ` [tip:core/debug] MIPS: Remove " tip-bot for Ralf Baechle
2013-11-25 23:23 ` [PATCH 3/3 v3] powerpc: cleanup panic_timeout Jason Baron
2013-11-26 14:21 ` tip-bot for Jason Baron [this message]
2013-11-26 11:17 ` [PATCH 0/3 v3] build in panic_timeout value Ingo Molnar
2013-11-27 5:38 ` Felipe Contreras
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-b71d47c14fba6270c0b5a0d56639bf042017025b@git.kernel.org \
--to=tipbot@zytor.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=jbaron@akamai.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome