mirror of
https://github.com/torvalds/linux.git
synced 2024-11-16 09:02:00 +00:00
x86, mce: Improve timeout error messages
There are four different possible types of timeouts. Distinguish them in the logs to help debug them. Signed-off-by: Andy Lutomirski <luto@amacapital.net> Link: http://lkml.kernel.org/r/0fa6d2653a54a01c48b43a3583caf950ea99606e.1419178397.git.luto@amacapital.net Signed-off-by: Borislav Petkov <bp@suse.de>
This commit is contained in:
parent
97bf6af1f9
commit
6c80f87ed4
@ -311,7 +311,7 @@ static void wait_for_panic(void)
|
||||
panic("Panicing machine check CPU died");
|
||||
}
|
||||
|
||||
static void mce_panic(char *msg, struct mce *final, char *exp)
|
||||
static void mce_panic(const char *msg, struct mce *final, char *exp)
|
||||
{
|
||||
int i, apei_err = 0;
|
||||
|
||||
@ -735,7 +735,7 @@ static atomic_t mce_callin;
|
||||
/*
|
||||
* Check if a timeout waiting for other CPUs happened.
|
||||
*/
|
||||
static int mce_timed_out(u64 *t)
|
||||
static int mce_timed_out(u64 *t, const char *msg)
|
||||
{
|
||||
/*
|
||||
* The others already did panic for some reason.
|
||||
@ -750,8 +750,7 @@ static int mce_timed_out(u64 *t)
|
||||
goto out;
|
||||
if ((s64)*t < SPINUNIT) {
|
||||
if (mca_cfg.tolerant <= 1)
|
||||
mce_panic("Timeout synchronizing machine check over CPUs",
|
||||
NULL, NULL);
|
||||
mce_panic(msg, NULL, NULL);
|
||||
cpu_missing = 1;
|
||||
return 1;
|
||||
}
|
||||
@ -867,7 +866,8 @@ static int mce_start(int *no_way_out)
|
||||
* Wait for everyone.
|
||||
*/
|
||||
while (atomic_read(&mce_callin) != cpus) {
|
||||
if (mce_timed_out(&timeout)) {
|
||||
if (mce_timed_out(&timeout,
|
||||
"Timeout: Not all CPUs entered broadcast exception handler")) {
|
||||
atomic_set(&global_nwo, 0);
|
||||
return -1;
|
||||
}
|
||||
@ -892,7 +892,8 @@ static int mce_start(int *no_way_out)
|
||||
* only seen by one CPU before cleared, avoiding duplicates.
|
||||
*/
|
||||
while (atomic_read(&mce_executing) < order) {
|
||||
if (mce_timed_out(&timeout)) {
|
||||
if (mce_timed_out(&timeout,
|
||||
"Timeout: Subject CPUs unable to finish machine check processing")) {
|
||||
atomic_set(&global_nwo, 0);
|
||||
return -1;
|
||||
}
|
||||
@ -936,7 +937,8 @@ static int mce_end(int order)
|
||||
* loops.
|
||||
*/
|
||||
while (atomic_read(&mce_executing) <= cpus) {
|
||||
if (mce_timed_out(&timeout))
|
||||
if (mce_timed_out(&timeout,
|
||||
"Timeout: Monarch CPU unable to finish machine check processing"))
|
||||
goto reset;
|
||||
ndelay(SPINUNIT);
|
||||
}
|
||||
@ -949,7 +951,8 @@ static int mce_end(int order)
|
||||
* Subject: Wait for Monarch to finish.
|
||||
*/
|
||||
while (atomic_read(&mce_executing) != 0) {
|
||||
if (mce_timed_out(&timeout))
|
||||
if (mce_timed_out(&timeout,
|
||||
"Timeout: Monarch CPU did not finish machine check processing"))
|
||||
goto reset;
|
||||
ndelay(SPINUNIT);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user