From: Prasad Sodagudi <psodagud@codeaurora.org>
To: sudeep.holla@arm.com, julien.thierry@arm.com,
will.deacon@arm.com, catalin.marinas@arm.com,
mark.rutland@arm.com, lorenzo.pieralisi@arm.com,
akpm@linux-foundation.org
Cc: Prasad Sodagudi <psodagud@codeaurora.org>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH] kernel/panic: Use SYSTEM_RESET2 command for warm reset
Date: Wed, 8 May 2019 18:47:12 -0700 [thread overview]
Message-ID: <1557366432-352469-1-git-send-email-psodagud@codeaurora.org> (raw)
In-Reply-To: <ce0b66f5d00e760f87ddeeacbc40b956@codeaurora.org>
Some platforms may need warm reboot support when kernel crashed
for post mortem analysis instead of cold reboot. So use config
CONFIG_WARM_REBOOT_ON_PANIC and SYSTEM_RESET2 psci command
support for warm reset.
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
---
kernel/panic.c | 4 ++++
lib/Kconfig.debug | 10 ++++++++++
2 files changed, 14 insertions(+)
diff --git a/kernel/panic.c b/kernel/panic.c
index c1fcaad..6ab6675 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -198,6 +198,10 @@ void panic(const char *fmt, ...)
console_verbose();
bust_spinlocks(1);
+#ifdef CONFIG_WARM_REBOOT_ON_PANIC
+ /* Configure for warm reboot instead of cold reboot. */
+ reboot_mode = REBOOT_WARM;
+#endif
va_start(args, fmt);
len = vscnprintf(buf, sizeof(buf), fmt, args);
va_end(args);
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index d695ec1..2a727d8 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -1000,6 +1000,16 @@ config PANIC_TIMEOUT
value n > 0 will wait n seconds before rebooting, while a timeout
value n < 0 will reboot immediately.
+config WARM_REBOOT_ON_PANIC
+ bool "Warm reboot instead of cold reboot for panic"
+ default n
+ help
+ Some vendor platform may need warm reboot instead of cold reboot
+ for debugging. Before vendor specific power off driver is
+ probed, platform always gets cold reset. By setting Y here and
+ support for PSCI V1.1 is present from firmware, platform would
+ get warm reset instead of cold reset.
+
config SCHED_DEBUG
bool "Collect scheduler debugging info"
depends on DEBUG_KERNEL && PROC_FS
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,\na Linux Foundation Collaborative Project
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-05-09 1:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-30 21:44 PSCI version 1.1 and SYSTEM_RESET2 Sodagudi Prasad
2019-05-01 0:07 ` Sodagudi Prasad
2019-05-01 9:49 ` Sudeep Holla
2019-05-01 18:43 ` Sodagudi Prasad
2019-05-02 9:05 ` Sudeep Holla
2019-05-09 1:38 ` Sodagudi Prasad
2019-05-09 1:47 ` Prasad Sodagudi [this message]
2019-05-09 9:40 ` [PATCH] kernel/panic: Use SYSTEM_RESET2 command for warm reset Sudeep Holla
2019-05-16 18:29 ` Aaro Koskinen
2019-05-17 18:03 ` Sodagudi Prasad
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=1557366432-352469-1-git-send-email-psodagud@codeaurora.org \
--to=psodagud@codeaurora.org \
--cc=akpm@linux-foundation.org \
--cc=catalin.marinas@arm.com \
--cc=julien.thierry@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=mark.rutland@arm.com \
--cc=sudeep.holla@arm.com \
--cc=will.deacon@arm.com \
/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;
as well as URLs for NNTP newsgroup(s).