All of lore.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Mike Travis <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: athorlton@sgi.com, mingo@kernel.org,
	torvalds@linux-foundation.org, travis@sgi.com, rja@hpe.com,
	sivanich@hpe.com, peterz@infradead.org, hpa@zytor.com,
	linux-kernel@vger.kernel.org, tglx@linutronix.de
Subject: [tip:x86/platform] x86/platform/UV: Fix panic with missing UVsystab support
Date: Sat, 14 Jan 2017 01:57:25 -0800	[thread overview]
Message-ID: <tip-eee5715efd8c268724b14c956de6af5d4931f470@git.kernel.org> (raw)
In-Reply-To: <20170113152111.118886202@asylum.americas.sgi.com>

Commit-ID:  eee5715efd8c268724b14c956de6af5d4931f470
Gitweb:     http://git.kernel.org/tip/eee5715efd8c268724b14c956de6af5d4931f470
Author:     Mike Travis <travis@sgi.com>
AuthorDate: Fri, 13 Jan 2017 09:21:11 -0600
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Sat, 14 Jan 2017 09:26:35 +0100

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: Mike Travis <travis@sgi.com>
Reviewed-by: Russ Anderson <rja@hpe.com>
Reviewed-by: Alex Thorlton <athorlton@sgi.com>
Acked-by: Dimitri 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.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/kernel/apic/x2apic_uv_x.c | 24 ++++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c
index 35690a1..4393078 100644
--- a/arch/x86/kernel/apic/x2apic_uv_x.c
+++ b/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -1172,19 +1172,25 @@ static void __init decode_gam_rng_tbl(unsigned long ptr)
 		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;
 	int i;
 
+	if (uv_hub_info->hub_revision < UV4_HUB_REVISION_BASE)
+		return 0;	/* No extended UVsystab required */
+
 	st = uv_systab;
-	if ((!st || st->revision < UV_SYSTAB_VERSION_UV4) && !is_uv4_hub())
-		return;
-	if (st->revision != UV_SYSTAB_VERSION_UV4_LATEST) {
-		pr_crit(
+	if ((!st) || (st->revision < UV_SYSTAB_VERSION_UV4_LATEST)) {
+		int rev = st ? st->revision : 0;
+
+		pr_err(
 		"UV: BIOS UVsystab version(%x) mismatch, expecting(%x)\n",
-			st->revision, UV_SYSTAB_VERSION_UV4_LATEST);
-		BUG();
+			rev, UV_SYSTAB_VERSION_UV4_LATEST);
+		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++) {
@@ -1205,6 +1211,7 @@ static void __init decode_uv_systab(void)
 			break;
 		}
 	}
+	return 0;
 }
 
 /*
@@ -1373,7 +1380,8 @@ void __init uv_system_init(void)
 	map_low_mmrs();
 
 	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_uv_gr_table();
 	uv_init_hub_info(&hub_info);

  reply	other threads:[~2017-01-14  9:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-13 15:21 [PATCH 0/8] x86/platform/UV: UV Update PatchSet 2 Mike Travis
2017-01-13 15:21 ` [PATCH 1/8] x86/platform/UV: Fix panic with missing UVsystab support Mike Travis
2017-01-14  9:57   ` tip-bot for Mike Travis [this message]
2017-01-13 15:21 ` [PATCH 2/8] x86/platform/UV: Fix 2 socket config problem Mike Travis
2017-01-14  9:58   ` [tip:x86/platform] " tip-bot for Mike Travis
2017-01-13 15:21 ` [PATCH 3/8] x86/platform/UV: Add Support for UV4 Hubless systems Mike Travis
2017-01-13 15:21 ` [PATCH 4/8] x86/platform/UV: Add Support for UV4 Hubless NMIs Mike Travis
2017-01-14  7:52   ` Ingo Molnar
2017-01-14  8:26     ` [PATCH] x86/platform/UV: Clean up the UV APIC code Ingo Molnar
2017-01-14 13:11       ` Joe Perches
2017-02-01 10:09       ` [tip:x86/platform] " tip-bot for Ingo Molnar
2017-01-13 15:21 ` [PATCH 5/8] x86/platform/UV: Add basic CPU NMI health check Mike Travis
2017-01-13 15:21 ` [PATCH 6/8] x86/platform/UV: Verify NMI action is valid, default is standard Mike Travis
2017-01-13 15:21 ` [PATCH 7/8] x86/platform/UV: Initialize PCH GPP_D_0 NMI Pin to be NMI source Mike Travis
2017-01-13 15:21 ` [PATCH 8/8] x86/platform/UV: Insure uv_system_init is called when necessary Mike Travis

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-eee5715efd8c268724b14c956de6af5d4931f470@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=athorlton@sgi.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rja@hpe.com \
    --cc=sivanich@hpe.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=travis@sgi.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.