* [PATCH] x86/platform/uv: Add more to secondary cpu kdump info
@ 2021-03-11 15:10 Mike Travis
2021-04-12 17:48 ` [tip: x86/platform] x86/platform/uv: Add more to secondary CPU " tip-bot2 for Georges Aureau
2021-04-16 10:56 ` tip-bot2 for Georges Aureau
0 siblings, 2 replies; 4+ messages in thread
From: Mike Travis @ 2021-03-11 15:10 UTC (permalink / raw)
To: Borislav_Petkov_, Thomas_Gleixner_, Ingo_Molnar_, Steve_Wahl_, x86
Cc: Georges Aureau, Mike Travis, Dimitri_Sivanich_, Russ_Anderson_,
Darren_Hart_, Andy_Shevchenko_, H._Peter_Anvin_,
platform-driver-x86, linux-kernel
From: Georges Aureau <georges.aureau@hpe.com>
Add call to run_crash_ipi_callback() to gather more info of what the
secondary cpus were doing to help with failure analysis.
Excerpt from Georges:
'It is only changing where crash secondaries will be stalling after having
taken care of properly laying down "crash note regs". Please note that
"crash note regs" are a key piece of data used by crash dump debuggers
to provide a reliable backtrace of running processors.'
Secondary change pursuant to a5f526ec:
change master/slave to main/secondary
Signed-off-by: Georges Aureau <georges.aureau@hpe.com>
Signed-off-by: Mike Travis <mike.travis@hpe.com>
Reviewed-by: Steve Wahl <steve.wahl@hpe.com>
---
arch/x86/platform/uv/uv_nmi.c | 39 +++++++++++++++++++++--------------
1 file changed, 24 insertions(+), 15 deletions(-)
diff --git a/arch/x86/platform/uv/uv_nmi.c b/arch/x86/platform/uv/uv_nmi.c
index eafc530c8767..f83810f7bcc2 100644
--- a/arch/x86/platform/uv/uv_nmi.c
+++ b/arch/x86/platform/uv/uv_nmi.c
@@ -24,6 +24,7 @@
#include <asm/kdebug.h>
#include <asm/local64.h>
#include <asm/nmi.h>
+#include <asm/reboot.h>
#include <asm/traps.h>
#include <asm/uv/uv.h>
#include <asm/uv/uv_hub.h>
@@ -834,34 +835,42 @@ static void uv_nmi_touch_watchdogs(void)
touch_nmi_watchdog();
}
-static atomic_t uv_nmi_kexec_failed;
-
#if defined(CONFIG_KEXEC_CORE)
-static void uv_nmi_kdump(int cpu, int master, struct pt_regs *regs)
+static atomic_t uv_nmi_kexec_failed;
+static void uv_nmi_kdump(int cpu, int main, struct pt_regs *regs)
{
+ /* Check if kdump kernel loaded for both main and secondary CPUs */
+ if (!kexec_crash_image) {
+ if (main)
+ pr_err("UV: NMI error: kdump kernel not loaded\n");
+ return;
+ }
+
/* Call crash to dump system state */
- if (master) {
+ if (main) {
pr_emerg("UV: NMI executing crash_kexec on CPU%d\n", cpu);
crash_kexec(regs);
- pr_emerg("UV: crash_kexec unexpectedly returned, ");
+ pr_emerg("UV: crash_kexec unexpectedly returned\n");
atomic_set(&uv_nmi_kexec_failed, 1);
- if (!kexec_crash_image) {
- pr_cont("crash kernel not loaded\n");
- return;
+
+ } else { /* secondary */
+
+ /* If kdump kernel fails, secondaries will exit this loop */
+ while (atomic_read(&uv_nmi_kexec_failed) == 0) {
+
+ /* Once shootdown cpus starts, they do not return */
+ run_crash_ipi_callback(regs);
+
+ mdelay(10);
}
- pr_cont("kexec busy, stalling cpus while waiting\n");
}
-
- /* If crash exec fails the slaves should return, otherwise stall */
- while (atomic_read(&uv_nmi_kexec_failed) == 0)
- mdelay(10);
}
#else /* !CONFIG_KEXEC_CORE */
-static inline void uv_nmi_kdump(int cpu, int master, struct pt_regs *regs)
+static inline void uv_nmi_kdump(int cpu, int main, struct pt_regs *regs)
{
- if (master)
+ if (main)
pr_err("UV: NMI kdump: KEXEC not supported in this kernel\n");
atomic_set(&uv_nmi_kexec_failed, 1);
}
--
2.21.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [tip: x86/platform] x86/platform/uv: Add more to secondary CPU kdump info
2021-03-11 15:10 [PATCH] x86/platform/uv: Add more to secondary cpu kdump info Mike Travis
@ 2021-04-12 17:48 ` tip-bot2 for Georges Aureau
2021-04-16 10:56 ` tip-bot2 for Georges Aureau
1 sibling, 0 replies; 4+ messages in thread
From: tip-bot2 for Georges Aureau @ 2021-04-12 17:48 UTC (permalink / raw)
To: linux-tip-commits
Cc: Georges Aureau, Mike Travis, Borislav Petkov, Steve Wahl, x86,
linux-kernel
The following commit has been merged into the x86/platform branch of tip:
Commit-ID: 8f2aca40dd077f74e62982cd2669845f41ed0ac6
Gitweb: https://git.kernel.org/tip/8f2aca40dd077f74e62982cd2669845f41ed0ac6
Author: Georges Aureau <georges.aureau@hpe.com>
AuthorDate: Thu, 11 Mar 2021 09:10:28 -06:00
Committer: Borislav Petkov <bp@suse.de>
CommitterDate: Mon, 12 Apr 2021 19:42:10 +02:00
x86/platform/uv: Add more to secondary CPU kdump info
Add call to run_crash_ipi_callback() to gather more info of what the
secondary CPUs were doing to help with failure analysis.
Excerpt from Georges:
'It is only changing where crash secondaries will be stalling after
having taken care of properly laying down "crash note regs". Please
note that "crash note regs" are a key piece of data used by crash dump
debuggers to provide a reliable backtrace of running processors.'
Secondary change pursuant to
a5f526ecb075 ("CodingStyle: Inclusive Terminology"):
change master/slave to main/secondary.
[ bp: Massage commit message. ]
Signed-off-by: Georges Aureau <georges.aureau@hpe.com>
Signed-off-by: Mike Travis <mike.travis@hpe.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Steve Wahl <steve.wahl@hpe.com>
Link: https://lkml.kernel.org/r/20210311151028.82678-1-mike.travis@hpe.com
---
arch/x86/platform/uv/uv_nmi.c | 39 ++++++++++++++++++++--------------
1 file changed, 24 insertions(+), 15 deletions(-)
diff --git a/arch/x86/platform/uv/uv_nmi.c b/arch/x86/platform/uv/uv_nmi.c
index eafc530..f83810f 100644
--- a/arch/x86/platform/uv/uv_nmi.c
+++ b/arch/x86/platform/uv/uv_nmi.c
@@ -24,6 +24,7 @@
#include <asm/kdebug.h>
#include <asm/local64.h>
#include <asm/nmi.h>
+#include <asm/reboot.h>
#include <asm/traps.h>
#include <asm/uv/uv.h>
#include <asm/uv/uv_hub.h>
@@ -834,34 +835,42 @@ static void uv_nmi_touch_watchdogs(void)
touch_nmi_watchdog();
}
-static atomic_t uv_nmi_kexec_failed;
-
#if defined(CONFIG_KEXEC_CORE)
-static void uv_nmi_kdump(int cpu, int master, struct pt_regs *regs)
+static atomic_t uv_nmi_kexec_failed;
+static void uv_nmi_kdump(int cpu, int main, struct pt_regs *regs)
{
+ /* Check if kdump kernel loaded for both main and secondary CPUs */
+ if (!kexec_crash_image) {
+ if (main)
+ pr_err("UV: NMI error: kdump kernel not loaded\n");
+ return;
+ }
+
/* Call crash to dump system state */
- if (master) {
+ if (main) {
pr_emerg("UV: NMI executing crash_kexec on CPU%d\n", cpu);
crash_kexec(regs);
- pr_emerg("UV: crash_kexec unexpectedly returned, ");
+ pr_emerg("UV: crash_kexec unexpectedly returned\n");
atomic_set(&uv_nmi_kexec_failed, 1);
- if (!kexec_crash_image) {
- pr_cont("crash kernel not loaded\n");
- return;
+
+ } else { /* secondary */
+
+ /* If kdump kernel fails, secondaries will exit this loop */
+ while (atomic_read(&uv_nmi_kexec_failed) == 0) {
+
+ /* Once shootdown cpus starts, they do not return */
+ run_crash_ipi_callback(regs);
+
+ mdelay(10);
}
- pr_cont("kexec busy, stalling cpus while waiting\n");
}
-
- /* If crash exec fails the slaves should return, otherwise stall */
- while (atomic_read(&uv_nmi_kexec_failed) == 0)
- mdelay(10);
}
#else /* !CONFIG_KEXEC_CORE */
-static inline void uv_nmi_kdump(int cpu, int master, struct pt_regs *regs)
+static inline void uv_nmi_kdump(int cpu, int main, struct pt_regs *regs)
{
- if (master)
+ if (main)
pr_err("UV: NMI kdump: KEXEC not supported in this kernel\n");
atomic_set(&uv_nmi_kexec_failed, 1);
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [tip: x86/platform] x86/platform/uv: Add more to secondary CPU kdump info
2021-03-11 15:10 [PATCH] x86/platform/uv: Add more to secondary cpu kdump info Mike Travis
2021-04-12 17:48 ` [tip: x86/platform] x86/platform/uv: Add more to secondary CPU " tip-bot2 for Georges Aureau
@ 2021-04-16 10:56 ` tip-bot2 for Georges Aureau
1 sibling, 0 replies; 4+ messages in thread
From: tip-bot2 for Georges Aureau @ 2021-04-16 10:56 UTC (permalink / raw)
To: linux-tip-commits
Cc: Georges Aureau, Mike Travis, Borislav Petkov, Steve Wahl, x86,
linux-kernel
The following commit has been merged into the x86/platform branch of tip:
Commit-ID: 0b45143b4b9440579e7fa889708cfc4bc7fdb9a3
Gitweb: https://git.kernel.org/tip/0b45143b4b9440579e7fa889708cfc4bc7fdb9a3
Author: Georges Aureau <georges.aureau@hpe.com>
AuthorDate: Thu, 11 Mar 2021 09:10:28 -06:00
Committer: Borislav Petkov <bp@suse.de>
CommitterDate: Fri, 16 Apr 2021 12:51:41 +02:00
x86/platform/uv: Add more to secondary CPU kdump info
Add call to run_crash_ipi_callback() to gather more info of what the
secondary CPUs were doing to help with failure analysis.
Excerpt from Georges:
'It is only changing where crash secondaries will be stalling after
having taken care of properly laying down "crash note regs". Please
note that "crash note regs" are a key piece of data used by crash dump
debuggers to provide a reliable backtrace of running processors.'
Secondary change pursuant to
a5f526ecb075 ("CodingStyle: Inclusive Terminology"):
change master/slave to main/secondary.
[ bp: Massage commit message. ]
Signed-off-by: Georges Aureau <georges.aureau@hpe.com>
Signed-off-by: Mike Travis <mike.travis@hpe.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Steve Wahl <steve.wahl@hpe.com>
Link: https://lkml.kernel.org/r/20210311151028.82678-1-mike.travis@hpe.com
---
arch/x86/platform/uv/uv_nmi.c | 39 ++++++++++++++++++++--------------
1 file changed, 24 insertions(+), 15 deletions(-)
diff --git a/arch/x86/platform/uv/uv_nmi.c b/arch/x86/platform/uv/uv_nmi.c
index eafc530..f83810f 100644
--- a/arch/x86/platform/uv/uv_nmi.c
+++ b/arch/x86/platform/uv/uv_nmi.c
@@ -24,6 +24,7 @@
#include <asm/kdebug.h>
#include <asm/local64.h>
#include <asm/nmi.h>
+#include <asm/reboot.h>
#include <asm/traps.h>
#include <asm/uv/uv.h>
#include <asm/uv/uv_hub.h>
@@ -834,34 +835,42 @@ static void uv_nmi_touch_watchdogs(void)
touch_nmi_watchdog();
}
-static atomic_t uv_nmi_kexec_failed;
-
#if defined(CONFIG_KEXEC_CORE)
-static void uv_nmi_kdump(int cpu, int master, struct pt_regs *regs)
+static atomic_t uv_nmi_kexec_failed;
+static void uv_nmi_kdump(int cpu, int main, struct pt_regs *regs)
{
+ /* Check if kdump kernel loaded for both main and secondary CPUs */
+ if (!kexec_crash_image) {
+ if (main)
+ pr_err("UV: NMI error: kdump kernel not loaded\n");
+ return;
+ }
+
/* Call crash to dump system state */
- if (master) {
+ if (main) {
pr_emerg("UV: NMI executing crash_kexec on CPU%d\n", cpu);
crash_kexec(regs);
- pr_emerg("UV: crash_kexec unexpectedly returned, ");
+ pr_emerg("UV: crash_kexec unexpectedly returned\n");
atomic_set(&uv_nmi_kexec_failed, 1);
- if (!kexec_crash_image) {
- pr_cont("crash kernel not loaded\n");
- return;
+
+ } else { /* secondary */
+
+ /* If kdump kernel fails, secondaries will exit this loop */
+ while (atomic_read(&uv_nmi_kexec_failed) == 0) {
+
+ /* Once shootdown cpus starts, they do not return */
+ run_crash_ipi_callback(regs);
+
+ mdelay(10);
}
- pr_cont("kexec busy, stalling cpus while waiting\n");
}
-
- /* If crash exec fails the slaves should return, otherwise stall */
- while (atomic_read(&uv_nmi_kexec_failed) == 0)
- mdelay(10);
}
#else /* !CONFIG_KEXEC_CORE */
-static inline void uv_nmi_kdump(int cpu, int master, struct pt_regs *regs)
+static inline void uv_nmi_kdump(int cpu, int main, struct pt_regs *regs)
{
- if (master)
+ if (main)
pr_err("UV: NMI kdump: KEXEC not supported in this kernel\n");
atomic_set(&uv_nmi_kexec_failed, 1);
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] x86/platform/uv: Add more to secondary cpu kdump info
@ 2021-02-02 14:27 Mike Travis
0 siblings, 0 replies; 4+ messages in thread
From: Mike Travis @ 2021-02-02 14:27 UTC (permalink / raw)
To: Borislav_Petkov_, Thomas_Gleixner_, Ingo_Molnar_, Steve_Wahl_, x86
Cc: Georges Aureau, Mike Travis, Dimitri_Sivanich_, Russ_Anderson_,
Darren_Hart_, Andy_Shevchenko_, H._Peter_Anvin_,
platform-driver-x86, linux-kernel
From: Georges Aureau <georges.aureau@hpe.com>
Add call to run_crash_ipi_callback() to gather more info of what the
secondary cpus were doing to help with failure analysis.
Excerpt from Georges:
'It is only changing where crash secondaries will be stalling after having
taken care of properly laying down "crash note regs". Please note that
"crash note regs" are a key piece of data used by crash dump debuggers
to provide a reliable backtrace of running processors.'
Secondary change pursuant to a5f526ec:
change master/slave to main/secondary
Signed-off-by: Georges Aureau <georges.aureau@hpe.com>
Signed-off-by: Mike Travis <mike.travis@hpe.com>
Reviewed-by: Steve Wahl <steve.wahl@hpe.com>
---
arch/x86/platform/uv/uv_nmi.c | 39 +++++++++++++++++++++--------------
1 file changed, 24 insertions(+), 15 deletions(-)
diff --git a/arch/x86/platform/uv/uv_nmi.c b/arch/x86/platform/uv/uv_nmi.c
index eafc530c8767..f83810f7bcc2 100644
--- a/arch/x86/platform/uv/uv_nmi.c
+++ b/arch/x86/platform/uv/uv_nmi.c
@@ -24,6 +24,7 @@
#include <asm/kdebug.h>
#include <asm/local64.h>
#include <asm/nmi.h>
+#include <asm/reboot.h>
#include <asm/traps.h>
#include <asm/uv/uv.h>
#include <asm/uv/uv_hub.h>
@@ -834,34 +835,42 @@ static void uv_nmi_touch_watchdogs(void)
touch_nmi_watchdog();
}
-static atomic_t uv_nmi_kexec_failed;
-
#if defined(CONFIG_KEXEC_CORE)
-static void uv_nmi_kdump(int cpu, int master, struct pt_regs *regs)
+static atomic_t uv_nmi_kexec_failed;
+static void uv_nmi_kdump(int cpu, int main, struct pt_regs *regs)
{
+ /* Check if kdump kernel loaded for both main and secondary CPUs */
+ if (!kexec_crash_image) {
+ if (main)
+ pr_err("UV: NMI error: kdump kernel not loaded\n");
+ return;
+ }
+
/* Call crash to dump system state */
- if (master) {
+ if (main) {
pr_emerg("UV: NMI executing crash_kexec on CPU%d\n", cpu);
crash_kexec(regs);
- pr_emerg("UV: crash_kexec unexpectedly returned, ");
+ pr_emerg("UV: crash_kexec unexpectedly returned\n");
atomic_set(&uv_nmi_kexec_failed, 1);
- if (!kexec_crash_image) {
- pr_cont("crash kernel not loaded\n");
- return;
+
+ } else { /* secondary */
+
+ /* If kdump kernel fails, secondaries will exit this loop */
+ while (atomic_read(&uv_nmi_kexec_failed) == 0) {
+
+ /* Once shootdown cpus starts, they do not return */
+ run_crash_ipi_callback(regs);
+
+ mdelay(10);
}
- pr_cont("kexec busy, stalling cpus while waiting\n");
}
-
- /* If crash exec fails the slaves should return, otherwise stall */
- while (atomic_read(&uv_nmi_kexec_failed) == 0)
- mdelay(10);
}
#else /* !CONFIG_KEXEC_CORE */
-static inline void uv_nmi_kdump(int cpu, int master, struct pt_regs *regs)
+static inline void uv_nmi_kdump(int cpu, int main, struct pt_regs *regs)
{
- if (master)
+ if (main)
pr_err("UV: NMI kdump: KEXEC not supported in this kernel\n");
atomic_set(&uv_nmi_kexec_failed, 1);
}
--
2.21.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-04-16 10:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-11 15:10 [PATCH] x86/platform/uv: Add more to secondary cpu kdump info Mike Travis
2021-04-12 17:48 ` [tip: x86/platform] x86/platform/uv: Add more to secondary CPU " tip-bot2 for Georges Aureau
2021-04-16 10:56 ` tip-bot2 for Georges Aureau
-- strict thread matches above, loose matches on Subject: below --
2021-02-02 14:27 [PATCH] x86/platform/uv: Add more to secondary cpu " Mike Travis
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).