Commit eee5715e authored by Mike Travis's avatar Mike Travis Committed by Ingo Molnar

x86/platform/UV: Fix panic with missing UVsystab support

Fix the panic where KEXEC'd kernel does not have access to EFI runtime
mappings.  This may cause the extended UVsystab to not be available.
The solution is to revert to non-UV mode and continue with limited
capabilities.
Signed-off-by: default avatarMike Travis <travis@sgi.com>
Reviewed-by: default avatarRuss Anderson <rja@hpe.com>
Reviewed-by: default avatarAlex Thorlton <athorlton@sgi.com>
Acked-by: default avatarDimitri Sivanich <sivanich@hpe.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20170113152111.118886202@asylum.americas.sgi.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent de1c2540
...@@ -1172,19 +1172,25 @@ static void __init decode_gam_rng_tbl(unsigned long ptr) ...@@ -1172,19 +1172,25 @@ static void __init decode_gam_rng_tbl(unsigned long ptr)
index, _min_socket, _max_socket, _min_pnode, _max_pnode); index, _min_socket, _max_socket, _min_pnode, _max_pnode);
} }
static void __init decode_uv_systab(void) static int __init decode_uv_systab(void)
{ {
struct uv_systab *st; struct uv_systab *st;
int i; int i;
if (uv_hub_info->hub_revision < UV4_HUB_REVISION_BASE)
return 0; /* No extended UVsystab required */
st = uv_systab; st = uv_systab;
if ((!st || st->revision < UV_SYSTAB_VERSION_UV4) && !is_uv4_hub()) if ((!st) || (st->revision < UV_SYSTAB_VERSION_UV4_LATEST)) {
return; int rev = st ? st->revision : 0;
if (st->revision != UV_SYSTAB_VERSION_UV4_LATEST) {
pr_crit( pr_err(
"UV: BIOS UVsystab version(%x) mismatch, expecting(%x)\n", "UV: BIOS UVsystab version(%x) mismatch, expecting(%x)\n",
st->revision, UV_SYSTAB_VERSION_UV4_LATEST); rev, UV_SYSTAB_VERSION_UV4_LATEST);
BUG(); pr_err(
"UV: Cannot support UV operations, switching to generic PC\n");
uv_system_type = UV_NONE;
return -EINVAL;
} }
for (i = 0; st->entry[i].type != UV_SYSTAB_TYPE_UNUSED; i++) { for (i = 0; st->entry[i].type != UV_SYSTAB_TYPE_UNUSED; i++) {
...@@ -1205,6 +1211,7 @@ static void __init decode_uv_systab(void) ...@@ -1205,6 +1211,7 @@ static void __init decode_uv_systab(void)
break; break;
} }
} }
return 0;
} }
/* /*
...@@ -1373,7 +1380,8 @@ void __init uv_system_init(void) ...@@ -1373,7 +1380,8 @@ void __init uv_system_init(void)
map_low_mmrs(); map_low_mmrs();
uv_bios_init(); /* get uv_systab for decoding */ uv_bios_init(); /* get uv_systab for decoding */
decode_uv_systab(); if (decode_uv_systab() < 0)
return; /* UVsystab problem, abort UV init */
build_socket_tables(); build_socket_tables();
build_uv_gr_table(); build_uv_gr_table();
uv_init_hub_info(&hub_info); uv_init_hub_info(&hub_info);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment