mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 0/3] x86/platform/uv: UV Kernel support for UV5
@ 2022-03-18 22:43 Mike Travis
  2022-03-18 22:43 ` [PATCH v3 1/3] x86/platform/uv: Update NMI Handler " Mike Travis
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Mike Travis @ 2022-03-18 22:43 UTC (permalink / raw)
  To: Borislav Petkov, Ingo Molnar, Thomas Gleixner, Steve Wahl, x86
  Cc: Mike Travis, Andy Shevchenko, Darren Hart, Dimitri Sivanich,
	H. Peter Anvin, Russ Anderson, linux-kernel, platform-driver-x86

v2: Delete patch to remove SCRATCH 5 NMI support check mainly for
    UV2 and UV3k systems with old NMI support function.

v3: Fix check BIOS NMI support mistake in Patch 1.

    Update NMI setup for UV5
	Update NMI handler to interface with UV5 hardware. This involves
	changing the EVENT_OCCURRED MMR used by the hardware and removes
	the check for which NMI function is supported by UV BIOS.  The
	newer NMI function is assumed supported on UV5 and above.

    Update TSC sync check for UV5
	Update TSC to not check TSC sync state for uv5+ as it is not
	available.  It is assumed that TSC will always be in sync for
	multiple chassis and will pass the tests for the kernel to
	accept it as the clocksource.  To disable this check use the
	kernel start options tsc=reliable clocksource=tsc.

    Log gap hole end size
	Show value of gap end in the kernel log which equates to number
	of physical address bits used by system.  The end address of
	the gap holds PA bits 56:26 which gives the range up to 64PB
	max size with 64MB of granularity.

Mike Travis (3):
  x86/platform/uv: Update NMI Handler for UV5
  x86/platform/uv: Update TSC sync state for UV5
  x86/platform/uv: Log gap hole end size

 arch/x86/kernel/apic/x2apic_uv_x.c | 20 +++++++++++++++-----
 arch/x86/platform/uv/uv_nmi.c      | 21 +++++++++++----------
 2 files changed, 26 insertions(+), 15 deletions(-)

-- 
2.26.2


^ permalink raw reply	[flat|nested] 9+ messages in thread
* [PATCH v4 1/3] x86/platform/uv: Update NMI Handler for UV5
@ 2022-04-06 19:51 Steve Wahl
  2022-04-07 15:48 ` [tip: x86/platform] " tip-bot2 for Mike Travis
  0 siblings, 1 reply; 9+ messages in thread
From: Steve Wahl @ 2022-04-06 19:51 UTC (permalink / raw)
  To: Borislav Petkov, Ingo Molnar, Thomas Gleixner, x86
  Cc: Mike Travis, Steve Wahl, Andy Shevchenko, Darren Hart,
	Dimitri Sivanich, H . Peter Anvin, Russ Anderson, linux-kernel,
	platform-driver-x86

From: Mike Travis <mike.travis@hpe.com>

Update NMI handler for UV5 hardware. A platform register changed, and
UV5 only uses one of the two NMI methods used on previous hardware.

Signed-off-by: Mike Travis <mike.travis@hpe.com>
Signed-off-by: Steve Wahl <steve.wahl@hpe.com>
Reviewed-by: Dimitri Sivanich <dimitri.sivanich@hpe.com>
---
v4: Clarify comments, change variable name to better convey what's happening
v3: Fix mistake in UVH_EXTIO_INT0_BROADCAST check.
    Use true/false in setting bool flag.
v2: Use bool flag to assume NMI support for UV5 and above.
---
 arch/x86/platform/uv/uv_nmi.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/arch/x86/platform/uv/uv_nmi.c b/arch/x86/platform/uv/uv_nmi.c
index 1e9ff28bc2e0..50fdd1a77f02 100644
--- a/arch/x86/platform/uv/uv_nmi.c
+++ b/arch/x86/platform/uv/uv_nmi.c
@@ -244,8 +244,10 @@ static inline bool uv_nmi_action_is(const char *action)
 /* Setup which NMI support is present in system */
 static void uv_nmi_setup_mmrs(void)
 {
+	bool new_nmi_method_only = false;
+
 	/* First determine arch specific MMRs to handshake with BIOS */
-	if (UVH_EVENT_OCCURRED0_EXTIO_INT0_MASK) {
+	if (UVH_EVENT_OCCURRED0_EXTIO_INT0_MASK) {	/* UV2,3,4 setup */
 		uvh_nmi_mmrx = UVH_EVENT_OCCURRED0;
 		uvh_nmi_mmrx_clear = UVH_EVENT_OCCURRED0_ALIAS;
 		uvh_nmi_mmrx_shift = UVH_EVENT_OCCURRED0_EXTIO_INT0_SHFT;
@@ -255,26 +257,25 @@ static void uv_nmi_setup_mmrs(void)
 		uvh_nmi_mmrx_req = UVH_BIOS_KERNEL_MMR_ALIAS_2;
 		uvh_nmi_mmrx_req_shift = 62;
 
-	} else if (UVH_EVENT_OCCURRED1_EXTIO_INT0_MASK) {
+	} else if (UVH_EVENT_OCCURRED1_EXTIO_INT0_MASK) { /* UV5+ setup */
 		uvh_nmi_mmrx = UVH_EVENT_OCCURRED1;
 		uvh_nmi_mmrx_clear = UVH_EVENT_OCCURRED1_ALIAS;
 		uvh_nmi_mmrx_shift = UVH_EVENT_OCCURRED1_EXTIO_INT0_SHFT;
 		uvh_nmi_mmrx_type = "OCRD1-EXTIO_INT0";
 
-		uvh_nmi_mmrx_supported = UVH_EXTIO_INT0_BROADCAST;
-		uvh_nmi_mmrx_req = UVH_BIOS_KERNEL_MMR_ALIAS_2;
-		uvh_nmi_mmrx_req_shift = 62;
+		new_nmi_method_only = true;		/* Newer nmi always valid on UV5+ */
+		uvh_nmi_mmrx_req = 0;			/* no request bit to clear */
 
 	} else {
-		pr_err("UV:%s:cannot find EVENT_OCCURRED*_EXTIO_INT0\n",
-			__func__);
+		pr_err("UV:%s:NMI support not available on this system\n", __func__);
 		return;
 	}
 
 	/* Then find out if new NMI is supported */
-	if (likely(uv_read_local_mmr(uvh_nmi_mmrx_supported))) {
-		uv_write_local_mmr(uvh_nmi_mmrx_req,
-					1UL << uvh_nmi_mmrx_req_shift);
+	if (new_nmi_method_only || uv_read_local_mmr(uvh_nmi_mmrx_supported)) {
+		if (uvh_nmi_mmrx_req)
+			uv_write_local_mmr(uvh_nmi_mmrx_req,
+						1UL << uvh_nmi_mmrx_req_shift);
 		nmi_mmr = uvh_nmi_mmrx;
 		nmi_mmr_clear = uvh_nmi_mmrx_clear;
 		nmi_mmr_pending = 1UL << uvh_nmi_mmrx_shift;
-- 
2.26.2


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-04-07 15:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-18 22:43 [PATCH v3 0/3] x86/platform/uv: UV Kernel support for UV5 Mike Travis
2022-03-18 22:43 ` [PATCH v3 1/3] x86/platform/uv: Update NMI Handler " Mike Travis
2022-04-04 20:19   ` [tip: x86/platform] " tip-bot2 for Mike Travis
2022-03-18 22:43 ` [PATCH v3 2/3] x86/platform/uv: Update TSC sync state " Mike Travis
2022-04-04 20:19   ` [tip: x86/platform] " tip-bot2 for Mike Travis
2022-03-18 22:43 ` [PATCH v3 3/3] x86/platform/uv: Log gap hole end size Mike Travis
2022-04-04 20:19   ` [tip: x86/platform] " tip-bot2 for Mike Travis
2022-04-05  8:50 ` [PATCH v3 0/3] x86/platform/uv: UV Kernel support for UV5 Borislav Petkov
2022-04-06 19:51 [PATCH v4 1/3] x86/platform/uv: Update NMI Handler " Steve Wahl
2022-04-07 15:48 ` [tip: x86/platform] " tip-bot2 for Mike Travis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®