All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] x86/platform/UV: SGI UV4 Kernel Fixes
@ 2016-08-01 18:40 Mike Travis
  2016-08-01 18:40 ` [PATCH 1/4] x86/platform/UV: Fix problem with UV4 Socket IDs not being contiguous Mike Travis
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Mike Travis @ 2016-08-01 18:40 UTC (permalink / raw)
  To: Ingo Molnar, H. Peter Anvin, Thomas Gleixner, Andrew Morton,
	Dimitri Sivanich
  Cc: Russ Anderson, John Estabrook, Andrew Banman, Nathan Zimmer,
	Alex Thorlton, x86, linux-kernel


A few problems have been found as the UV4 BIOS and hardware is being
developed and tested.  These patches fix those problems.

Patch1: uv4_fix_gam_range_lookup_table
  - Fixes a problem with building the UV4 GAM range table

Patch2: uv4_fix_bios_init_error
  - Fixes a panic associated with the UV4 system table

Patch3: uv4_remove_uvsystab_pxm
  - Fixes a problem with incorrect data from UV4 BIOS

Patch4: uv4_disable_is_uv_system
  - Fixes a panic using the RHEL7 kdump kernel

-- 

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

* [PATCH 1/4] x86/platform/UV: Fix problem with UV4 Socket IDs not being contiguous
  2016-08-01 18:40 [PATCH 0/4] x86/platform/UV: SGI UV4 Kernel Fixes Mike Travis
@ 2016-08-01 18:40 ` Mike Travis
  2016-08-10 18:11   ` [tip:x86/urgent] " tip-bot for Mike Travis
  2016-08-01 18:40 ` [PATCH 2/4] x86/platform/UV: Fix problem with iounmap UV4 EFI System Table causing panic Mike Travis
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Mike Travis @ 2016-08-01 18:40 UTC (permalink / raw)
  To: Ingo Molnar, H. Peter Anvin, Thomas Gleixner, Andrew Morton,
	Dimitri Sivanich
  Cc: Russ Anderson, John Estabrook, Andrew Banman, Nathan Zimmer,
	Alex Thorlton, x86, linux-kernel

[-- Attachment #1: uv4_fix_gam_range_lookup_table --]
[-- Type: text/plain, Size: 1680 bytes --]

The UV4 Socket IDs are not guaranteed to equate to Node values which
can cause the GAM (Global Addressable Memory) table lookups to fail.
Fix this by using an independent index into the GAM table instead of
the Socket ID to reference the base address.

Reviewed-by: Dimitri Sivanich <sivanich@sgi.com>
Reviewed-by: Nathan Zimmer <nzimmer@sgi.com>
Tested-by: Frank Ramsay <framsay@sgi.com>
Tested-by: John Estabrook <estabrook@sgi.com>
Signed-off-by: Mike Travis <travis@sgi.com>
---
 arch/x86/kernel/apic/x2apic_uv_x.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

--- linux-3.12.orig/arch/x86/kernel/apic/x2apic_uv_x.c
+++ linux-3.12/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -325,7 +325,7 @@ static __init void build_uv_gr_table(voi
 	struct uv_gam_range_entry *gre = uv_gre_table;
 	struct uv_gam_range_s *grt;
 	unsigned long last_limit = 0, ram_limit = 0;
-	int bytes, i, sid, lsid = -1;
+	int bytes, i, sid, lsid = -1, indx = 0, lindx = -1;
 
 	if (!gre)
 		return;
@@ -356,11 +356,12 @@ static __init void build_uv_gr_table(voi
 		}
 		sid = gre->sockid - _min_socket;
 		if (lsid < sid) {		/* new range */
-			grt = &_gr_table[sid];
-			grt->base = lsid;
+			grt = &_gr_table[indx];
+			grt->base = lindx;
 			grt->nasid = gre->nasid;
 			grt->limit = last_limit = gre->limit;
 			lsid = sid;
+			lindx = indx++;
 			continue;
 		}
 		if (lsid == sid && !ram_limit) {	/* update range */
@@ -371,7 +372,7 @@ static __init void build_uv_gr_table(voi
 		}
 		if (!ram_limit) {		/* non-contiguous ram range */
 			grt++;
-			grt->base = sid - 1;
+			grt->base = lindx;
 			grt->nasid = gre->nasid;
 			grt->limit = last_limit = gre->limit;
 			continue;

-- 

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

* [PATCH 2/4] x86/platform/UV: Fix problem with iounmap UV4 EFI System Table causing panic
  2016-08-01 18:40 [PATCH 0/4] x86/platform/UV: SGI UV4 Kernel Fixes Mike Travis
  2016-08-01 18:40 ` [PATCH 1/4] x86/platform/UV: Fix problem with UV4 Socket IDs not being contiguous Mike Travis
@ 2016-08-01 18:40 ` Mike Travis
  2016-08-10 18:11   ` [tip:x86/urgent] x86/platform/UV: Fix bug with iounmap() of the UV4 EFI System Table causing a crash tip-bot for Mike Travis
  2016-08-01 18:40 ` [PATCH 3/4] x86/platform/UV: Fix problem with UV4 BIOS providing incorrect PXM values Mike Travis
  2016-08-01 18:40 ` [PATCH 4/4] x86/platform/UV: Fix kernel panic running RHEL kdump kernel on UV Mike Travis
  3 siblings, 1 reply; 9+ messages in thread
From: Mike Travis @ 2016-08-01 18:40 UTC (permalink / raw)
  To: Ingo Molnar, H. Peter Anvin, Thomas Gleixner, Andrew Morton,
	Dimitri Sivanich
  Cc: Russ Anderson, John Estabrook, Andrew Banman, Nathan Zimmer,
	Alex Thorlton, x86, linux-kernel

[-- Attachment #1: uv4_fix_bios_init_error --]
[-- Type: text/plain, Size: 1095 bytes --]

Save the size field from the uv_systab struct before doing the iounmap
of the struct pointer, to avoid a null dereference error.

Reviewed-by: Dimitri Sivanich <sivanich@sgi.com>
Reviewed-by: Nathan Zimmer <nzimmer@sgi.com>
Tested-by: Frank Ramsay <framsay@sgi.com>
Tested-by: John Estabrook <estabrook@sgi.com>
Signed-off-by: Mike Travis <travis@sgi.com>
---
v2: modify description and changelog.
---
 arch/x86/platform/uv/bios_uv.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

--- linux.orig/arch/x86/platform/uv/bios_uv.c
+++ linux/arch/x86/platform/uv/bios_uv.c
@@ -200,12 +200,14 @@ void uv_bios_init(void)
 		return;
 	}
 
+	/* Starting with UV4 the UV systab size is variable */
 	if (uv_systab->revision >= UV_SYSTAB_VERSION_UV4) {
+		int size = uv_systab->size;
+
 		iounmap(uv_systab);
-		uv_systab = ioremap(efi.uv_systab, uv_systab->size);
+		uv_systab = ioremap(efi.uv_systab, size);
 		if (!uv_systab) {
-			pr_err("UV: UVsystab: ioremap(%d) failed!\n",
-				uv_systab->size);
+			pr_err("UV: UVsystab: ioremap(%d) failed!\n", size);
 			return;
 		}
 	}

-- 

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

* [PATCH 3/4] x86/platform/UV: Fix problem with UV4 BIOS providing incorrect PXM values.
  2016-08-01 18:40 [PATCH 0/4] x86/platform/UV: SGI UV4 Kernel Fixes Mike Travis
  2016-08-01 18:40 ` [PATCH 1/4] x86/platform/UV: Fix problem with UV4 Socket IDs not being contiguous Mike Travis
  2016-08-01 18:40 ` [PATCH 2/4] x86/platform/UV: Fix problem with iounmap UV4 EFI System Table causing panic Mike Travis
@ 2016-08-01 18:40 ` Mike Travis
  2016-08-10 18:12   ` [tip:x86/urgent] " tip-bot for Mike Travis
  2016-08-01 18:40 ` [PATCH 4/4] x86/platform/UV: Fix kernel panic running RHEL kdump kernel on UV Mike Travis
  3 siblings, 1 reply; 9+ messages in thread
From: Mike Travis @ 2016-08-01 18:40 UTC (permalink / raw)
  To: Ingo Molnar, H. Peter Anvin, Thomas Gleixner, Andrew Morton,
	Dimitri Sivanich
  Cc: Russ Anderson, John Estabrook, Andrew Banman, Nathan Zimmer,
	Alex Thorlton, x86, linux-kernel

[-- Attachment #1: uv4_remove_uvsystab_pxm --]
[-- Type: text/plain, Size: 4373 bytes --]

There are some circumstances where the UV4 BIOS cannot provide the
correct Proximity Node values to associate with specific Sockets and
Physical Nodes.  The decision was made to remove these values from BIOS
and for the kernel to get these values from the standard ACPI tables.

Reviewed-by: Dimitri Sivanich <sivanich@sgi.com>
Reviewed-by: Nathan Zimmer <nzimmer@sgi.com>
Tested-by: Frank Ramsay <framsay@sgi.com>
Tested-by: John Estabrook <estabrook@sgi.com>
Signed-off-by: Mike Travis <travis@sgi.com>
---
 arch/x86/include/asm/uv/bios.h     |    5 +++--
 arch/x86/kernel/apic/x2apic_uv_x.c |   28 ++++++++++------------------
 2 files changed, 13 insertions(+), 20 deletions(-)

--- linux.orig/arch/x86/include/asm/uv/bios.h
+++ linux/arch/x86/include/asm/uv/bios.h
@@ -79,7 +79,7 @@ struct uv_gam_range_entry {
 	u16	nasid;		/* HNasid */
 	u16	sockid;		/* Socket ID, high bits of APIC ID */
 	u16	pnode;		/* Index to MMR and GRU spaces */
-	u32	pxm;		/* ACPI proximity domain number */
+	u32	unused2;
 	u32	limit;		/* PA bits 56:26 (UV_GAM_RANGE_SHFT) */
 };
 
@@ -88,7 +88,8 @@ struct uv_gam_range_entry {
 #define	UV_SYSTAB_VERSION_UV4		0x400	/* UV4 BIOS base version */
 #define	UV_SYSTAB_VERSION_UV4_1		0x401	/* + gpa_shift */
 #define	UV_SYSTAB_VERSION_UV4_2		0x402	/* + TYPE_NVRAM/WINDOW/MBOX */
-#define	UV_SYSTAB_VERSION_UV4_LATEST	UV_SYSTAB_VERSION_UV4_2
+#define	UV_SYSTAB_VERSION_UV4_3		0x403	/* - GAM Range PXM Value */
+#define	UV_SYSTAB_VERSION_UV4_LATEST	UV_SYSTAB_VERSION_UV4_3
 
 #define	UV_SYSTAB_TYPE_UNUSED		0	/* End of table (offset == 0) */
 #define	UV_SYSTAB_TYPE_GAM_PARAMS	1	/* GAM PARAM conversions */
--- linux.orig/arch/x86/kernel/apic/x2apic_uv_x.c
+++ linux/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -1157,19 +1157,18 @@ static void __init decode_gam_rng_tbl(un
 	for (; gre->type != UV_GAM_RANGE_TYPE_UNUSED; gre++) {
 		if (!index) {
 			pr_info("UV: GAM Range Table...\n");
-			pr_info("UV:  # %20s %14s %5s %4s %5s %3s %2s %3s\n",
+			pr_info("UV:  # %20s %14s %5s %4s %5s %3s %2s\n",
 				"Range", "", "Size", "Type", "NASID",
-				"SID", "PN", "PXM");
+				"SID", "PN");
 		}
 		pr_info(
-		"UV: %2d: 0x%014lx-0x%014lx %5luG %3d   %04x  %02x %02x %3d\n",
+		"UV: %2d: 0x%014lx-0x%014lx %5luG %3d   %04x  %02x %02x\n",
 			index++,
 			(unsigned long)lgre << UV_GAM_RANGE_SHFT,
 			(unsigned long)gre->limit << UV_GAM_RANGE_SHFT,
 			((unsigned long)(gre->limit - lgre)) >>
 				(30 - UV_GAM_RANGE_SHFT), /* 64M -> 1G */
-			gre->type, gre->nasid, gre->sockid,
-			gre->pnode, gre->pxm);
+			gre->type, gre->nasid, gre->sockid, gre->pnode);
 
 		lgre = gre->limit;
 		if (sock_min > gre->sockid)
@@ -1288,7 +1287,7 @@ static void __init build_socket_tables(v
 		_pnode_to_socket[i] = SOCK_EMPTY;
 
 	/* fill in pnode/node/addr conversion list values */
-	pr_info("UV: GAM Building socket/pnode/pxm conversion tables\n");
+	pr_info("UV: GAM Building socket/pnode conversion tables\n");
 	for (; gre->type != UV_GAM_RANGE_TYPE_UNUSED; gre++) {
 		if (gre->type == UV_GAM_RANGE_TYPE_HOLE)
 			continue;
@@ -1296,20 +1295,18 @@ static void __init build_socket_tables(v
 		if (_socket_to_pnode[i] != SOCK_EMPTY)
 			continue;	/* duplicate */
 		_socket_to_pnode[i] = gre->pnode;
-		_socket_to_node[i] = gre->pxm;
 
 		i = gre->pnode - minpnode;
 		_pnode_to_socket[i] = gre->sockid;
 
 		pr_info(
-		"UV: sid:%02x type:%d nasid:%04x pn:%02x pxm:%2d pn2s:%2x\n",
+		"UV: sid:%02x type:%d nasid:%04x pn:%02x pn2s:%2x\n",
 			gre->sockid, gre->type, gre->nasid,
 			_socket_to_pnode[gre->sockid - minsock],
-			_socket_to_node[gre->sockid - minsock],
 			_pnode_to_socket[gre->pnode - minpnode]);
 	}
 
-	/* check socket -> node values */
+	/* Set socket -> node values */
 	lnid = -1;
 	for_each_present_cpu(cpu) {
 		int nid = cpu_to_node(cpu);
@@ -1320,14 +1317,9 @@ static void __init build_socket_tables(v
 		lnid = nid;
 		apicid = per_cpu(x86_cpu_to_apicid, cpu);
 		sockid = apicid >> uv_cpuid.socketid_shift;
-		i = sockid - minsock;
-
-		if (nid != _socket_to_node[i]) {
-			pr_warn(
-			"UV: %02x: type:%d socket:%02x PXM:%02x != node:%2d\n",
-				i, sockid, gre->type, _socket_to_node[i], nid);
-			_socket_to_node[i] = nid;
-		}
+		_socket_to_node[sockid - minsock] = nid;
+		pr_info("UV: sid:%02x: apicid:%04x node:%2d\n",
+			sockid, apicid, nid);
 	}
 
 	/* Setup physical blade to pnode translation from GAM Range Table */

-- 

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

* [PATCH 4/4] x86/platform/UV: Fix kernel panic running RHEL kdump kernel on UV
  2016-08-01 18:40 [PATCH 0/4] x86/platform/UV: SGI UV4 Kernel Fixes Mike Travis
                   ` (2 preceding siblings ...)
  2016-08-01 18:40 ` [PATCH 3/4] x86/platform/UV: Fix problem with UV4 BIOS providing incorrect PXM values Mike Travis
@ 2016-08-01 18:40 ` Mike Travis
  2016-08-10 18:12   ` [tip:x86/urgent] x86/platform/UV: Fix kernel panic running RHEL kdump kernel on UV systems tip-bot for Mike Travis
  3 siblings, 1 reply; 9+ messages in thread
From: Mike Travis @ 2016-08-01 18:40 UTC (permalink / raw)
  To: Ingo Molnar, H. Peter Anvin, Thomas Gleixner, Andrew Morton,
	Dimitri Sivanich
  Cc: Russ Anderson, John Estabrook, Andrew Banman, Nathan Zimmer,
	Alex Thorlton, x86, linux-kernel

[-- Attachment #1: uv4_disable_is_uv_system --]
[-- Type: text/plain, Size: 912 bytes --]

The latest UV kernel support panics when RHEL7 kexec's the kdump kernel
to make a dumpfile.  This patch fixes the problem by turning off all UV
support if NUMA is off.

Reviewed-by: Dimitri Sivanich <sivanich@sgi.com>
Reviewed-by: Nathan Zimmer <nzimmer@sgi.com>
Tested-by: Frank Ramsay <framsay@sgi.com>
Tested-by: John Estabrook <estabrook@sgi.com>
Signed-off-by: Mike Travis <travis@sgi.com>
---
 arch/x86/kernel/apic/x2apic_uv_x.c |    5 +++++
 1 file changed, 5 insertions(+)

--- linux-3.12.orig/arch/x86/kernel/apic/x2apic_uv_x.c
+++ linux-3.12/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -223,6 +223,11 @@ static int __init uv_acpi_madt_oem_check
 	if (strncmp(oem_id, "SGI", 3) != 0)
 		return 0;
 
+	if (numa_off) {
+		pr_err("UV: NUMA is off, disabling UV support\n");
+		return 0;
+	}
+
 	/* Setup early hub type field in uv_hub_info for Node 0 */
 	uv_cpu_info->p_uv_hub_info = &uv_hub_info_node0;
 

-- 

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

* [tip:x86/urgent] x86/platform/UV: Fix problem with UV4 Socket IDs not being contiguous
  2016-08-01 18:40 ` [PATCH 1/4] x86/platform/UV: Fix problem with UV4 Socket IDs not being contiguous Mike Travis
@ 2016-08-10 18:11   ` tip-bot for Mike Travis
  0 siblings, 0 replies; 9+ messages in thread
From: tip-bot for Mike Travis @ 2016-08-10 18:11 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: peterz, linux-kernel, nzimmer, rja, akpm, travis, torvalds,
	framsay, abanman, estabrook, athorlton, mingo, hpa, tglx,
	sivanich

Commit-ID:  054f621fd5b1c7245710f5d3935c94ce6ae4b3b7
Gitweb:     http://git.kernel.org/tip/054f621fd5b1c7245710f5d3935c94ce6ae4b3b7
Author:     Mike Travis <travis@sgi.com>
AuthorDate: Mon, 1 Aug 2016 13:40:50 -0500
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 10 Aug 2016 15:55:38 +0200

x86/platform/UV: Fix problem with UV4 Socket IDs not being contiguous

The UV4 Socket IDs are not guaranteed to equate to Node values which
can cause the GAM (Global Addressable Memory) table lookups to fail.
Fix this by using an independent index into the GAM table instead of
the Socket ID to reference the base address.

Tested-by: Frank Ramsay <framsay@sgi.com>
Tested-by: John Estabrook <estabrook@sgi.com>
Signed-off-by: Mike Travis <travis@sgi.com>
Reviewed-by: Dimitri Sivanich <sivanich@sgi.com>
Reviewed-by: Nathan Zimmer <nzimmer@sgi.com>
Cc: Alex Thorlton <athorlton@sgi.com>
Cc: Andrew Banman <abanman@sgi.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Russ Anderson <rja@sgi.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20160801184050.048755337@asylum.americas.sgi.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/kernel/apic/x2apic_uv_x.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c
index 09b59ad..d918733 100644
--- a/arch/x86/kernel/apic/x2apic_uv_x.c
+++ b/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -325,7 +325,7 @@ static __init void build_uv_gr_table(void)
 	struct uv_gam_range_entry *gre = uv_gre_table;
 	struct uv_gam_range_s *grt;
 	unsigned long last_limit = 0, ram_limit = 0;
-	int bytes, i, sid, lsid = -1;
+	int bytes, i, sid, lsid = -1, indx = 0, lindx = -1;
 
 	if (!gre)
 		return;
@@ -356,11 +356,12 @@ static __init void build_uv_gr_table(void)
 		}
 		sid = gre->sockid - _min_socket;
 		if (lsid < sid) {		/* new range */
-			grt = &_gr_table[sid];
-			grt->base = lsid;
+			grt = &_gr_table[indx];
+			grt->base = lindx;
 			grt->nasid = gre->nasid;
 			grt->limit = last_limit = gre->limit;
 			lsid = sid;
+			lindx = indx++;
 			continue;
 		}
 		if (lsid == sid && !ram_limit) {	/* update range */
@@ -371,7 +372,7 @@ static __init void build_uv_gr_table(void)
 		}
 		if (!ram_limit) {		/* non-contiguous ram range */
 			grt++;
-			grt->base = sid - 1;
+			grt->base = lindx;
 			grt->nasid = gre->nasid;
 			grt->limit = last_limit = gre->limit;
 			continue;

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

* [tip:x86/urgent] x86/platform/UV: Fix bug with iounmap() of the UV4 EFI System Table causing a crash
  2016-08-01 18:40 ` [PATCH 2/4] x86/platform/UV: Fix problem with iounmap UV4 EFI System Table causing panic Mike Travis
@ 2016-08-10 18:11   ` tip-bot for Mike Travis
  0 siblings, 0 replies; 9+ messages in thread
From: tip-bot for Mike Travis @ 2016-08-10 18:11 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: akpm, rja, mingo, estabrook, linux-kernel, peterz, hpa, nzimmer,
	athorlton, abanman, sivanich, tglx, framsay, travis, torvalds

Commit-ID:  e363d24c2b997c421476c6aa00547edadf678efe
Gitweb:     http://git.kernel.org/tip/e363d24c2b997c421476c6aa00547edadf678efe
Author:     Mike Travis <travis@sgi.com>
AuthorDate: Mon, 1 Aug 2016 13:40:51 -0500
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 10 Aug 2016 15:55:38 +0200

x86/platform/UV: Fix bug with iounmap() of the UV4 EFI System Table causing a crash

Save the uv_systab::size field before doing the iounmap()
of the struct pointer, to avoid a NULL dereference crash.

Tested-by: Frank Ramsay <framsay@sgi.com>
Tested-by: John Estabrook <estabrook@sgi.com>
Signed-off-by: Mike Travis <travis@sgi.com>
Reviewed-by: Dimitri Sivanich <sivanich@sgi.com>
Reviewed-by: Nathan Zimmer <nzimmer@sgi.com>
Cc: Alex Thorlton <athorlton@sgi.com>
Cc: Andrew Banman <abanman@sgi.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Russ Anderson <rja@sgi.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20160801184050.250424783@asylum.americas.sgi.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/platform/uv/bios_uv.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/x86/platform/uv/bios_uv.c b/arch/x86/platform/uv/bios_uv.c
index 66b2166..4e9fd13 100644
--- a/arch/x86/platform/uv/bios_uv.c
+++ b/arch/x86/platform/uv/bios_uv.c
@@ -199,12 +199,14 @@ void uv_bios_init(void)
 		return;
 	}
 
+	/* Starting with UV4 the UV systab size is variable */
 	if (uv_systab->revision >= UV_SYSTAB_VERSION_UV4) {
+		int size = uv_systab->size;
+
 		iounmap(uv_systab);
-		uv_systab = ioremap(efi.uv_systab, uv_systab->size);
+		uv_systab = ioremap(efi.uv_systab, size);
 		if (!uv_systab) {
-			pr_err("UV: UVsystab: ioremap(%d) failed!\n",
-				uv_systab->size);
+			pr_err("UV: UVsystab: ioremap(%d) failed!\n", size);
 			return;
 		}
 	}

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

* [tip:x86/urgent] x86/platform/UV: Fix problem with UV4 BIOS providing incorrect PXM values
  2016-08-01 18:40 ` [PATCH 3/4] x86/platform/UV: Fix problem with UV4 BIOS providing incorrect PXM values Mike Travis
@ 2016-08-10 18:12   ` tip-bot for Mike Travis
  0 siblings, 0 replies; 9+ messages in thread
From: tip-bot for Mike Travis @ 2016-08-10 18:12 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: athorlton, abanman, travis, nzimmer, estabrook, mingo, tglx,
	akpm, torvalds, rja, framsay, peterz, sivanich, linux-kernel,
	hpa

Commit-ID:  22ac2bca92f2d92c6495248d65ff648182df428d
Gitweb:     http://git.kernel.org/tip/22ac2bca92f2d92c6495248d65ff648182df428d
Author:     Mike Travis <travis@sgi.com>
AuthorDate: Mon, 1 Aug 2016 13:40:52 -0500
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 10 Aug 2016 15:55:38 +0200

x86/platform/UV: Fix problem with UV4 BIOS providing incorrect PXM values

There are some circumstances where the UV4 BIOS cannot provide the
correct Proximity Node values to associate with specific Sockets and
Physical Nodes.  The decision was made to remove these values from BIOS
and for the kernel to get these values from the standard ACPI tables.

Tested-by: Frank Ramsay <framsay@sgi.com>
Tested-by: John Estabrook <estabrook@sgi.com>
Signed-off-by: Mike Travis <travis@sgi.com>
Reviewed-by: Dimitri Sivanich <sivanich@sgi.com>
Reviewed-by: Nathan Zimmer <nzimmer@sgi.com>
Cc: Alex Thorlton <athorlton@sgi.com>
Cc: Andrew Banman <abanman@sgi.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Russ Anderson <rja@sgi.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20160801184050.414210079@asylum.americas.sgi.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/include/asm/uv/bios.h     |  5 +++--
 arch/x86/kernel/apic/x2apic_uv_x.c | 28 ++++++++++------------------
 2 files changed, 13 insertions(+), 20 deletions(-)

diff --git a/arch/x86/include/asm/uv/bios.h b/arch/x86/include/asm/uv/bios.h
index c852590..e652a7c 100644
--- a/arch/x86/include/asm/uv/bios.h
+++ b/arch/x86/include/asm/uv/bios.h
@@ -79,7 +79,7 @@ struct uv_gam_range_entry {
 	u16	nasid;		/* HNasid */
 	u16	sockid;		/* Socket ID, high bits of APIC ID */
 	u16	pnode;		/* Index to MMR and GRU spaces */
-	u32	pxm;		/* ACPI proximity domain number */
+	u32	unused2;
 	u32	limit;		/* PA bits 56:26 (UV_GAM_RANGE_SHFT) */
 };
 
@@ -88,7 +88,8 @@ struct uv_gam_range_entry {
 #define	UV_SYSTAB_VERSION_UV4		0x400	/* UV4 BIOS base version */
 #define	UV_SYSTAB_VERSION_UV4_1		0x401	/* + gpa_shift */
 #define	UV_SYSTAB_VERSION_UV4_2		0x402	/* + TYPE_NVRAM/WINDOW/MBOX */
-#define	UV_SYSTAB_VERSION_UV4_LATEST	UV_SYSTAB_VERSION_UV4_2
+#define	UV_SYSTAB_VERSION_UV4_3		0x403	/* - GAM Range PXM Value */
+#define	UV_SYSTAB_VERSION_UV4_LATEST	UV_SYSTAB_VERSION_UV4_3
 
 #define	UV_SYSTAB_TYPE_UNUSED		0	/* End of table (offset == 0) */
 #define	UV_SYSTAB_TYPE_GAM_PARAMS	1	/* GAM PARAM conversions */
diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c
index d918733..6aa0545 100644
--- a/arch/x86/kernel/apic/x2apic_uv_x.c
+++ b/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -1156,19 +1156,18 @@ static void __init decode_gam_rng_tbl(unsigned long ptr)
 	for (; gre->type != UV_GAM_RANGE_TYPE_UNUSED; gre++) {
 		if (!index) {
 			pr_info("UV: GAM Range Table...\n");
-			pr_info("UV:  # %20s %14s %5s %4s %5s %3s %2s %3s\n",
+			pr_info("UV:  # %20s %14s %5s %4s %5s %3s %2s\n",
 				"Range", "", "Size", "Type", "NASID",
-				"SID", "PN", "PXM");
+				"SID", "PN");
 		}
 		pr_info(
-		"UV: %2d: 0x%014lx-0x%014lx %5luG %3d   %04x  %02x %02x %3d\n",
+		"UV: %2d: 0x%014lx-0x%014lx %5luG %3d   %04x  %02x %02x\n",
 			index++,
 			(unsigned long)lgre << UV_GAM_RANGE_SHFT,
 			(unsigned long)gre->limit << UV_GAM_RANGE_SHFT,
 			((unsigned long)(gre->limit - lgre)) >>
 				(30 - UV_GAM_RANGE_SHFT), /* 64M -> 1G */
-			gre->type, gre->nasid, gre->sockid,
-			gre->pnode, gre->pxm);
+			gre->type, gre->nasid, gre->sockid, gre->pnode);
 
 		lgre = gre->limit;
 		if (sock_min > gre->sockid)
@@ -1287,7 +1286,7 @@ static void __init build_socket_tables(void)
 		_pnode_to_socket[i] = SOCK_EMPTY;
 
 	/* fill in pnode/node/addr conversion list values */
-	pr_info("UV: GAM Building socket/pnode/pxm conversion tables\n");
+	pr_info("UV: GAM Building socket/pnode conversion tables\n");
 	for (; gre->type != UV_GAM_RANGE_TYPE_UNUSED; gre++) {
 		if (gre->type == UV_GAM_RANGE_TYPE_HOLE)
 			continue;
@@ -1295,20 +1294,18 @@ static void __init build_socket_tables(void)
 		if (_socket_to_pnode[i] != SOCK_EMPTY)
 			continue;	/* duplicate */
 		_socket_to_pnode[i] = gre->pnode;
-		_socket_to_node[i] = gre->pxm;
 
 		i = gre->pnode - minpnode;
 		_pnode_to_socket[i] = gre->sockid;
 
 		pr_info(
-		"UV: sid:%02x type:%d nasid:%04x pn:%02x pxm:%2d pn2s:%2x\n",
+		"UV: sid:%02x type:%d nasid:%04x pn:%02x pn2s:%2x\n",
 			gre->sockid, gre->type, gre->nasid,
 			_socket_to_pnode[gre->sockid - minsock],
-			_socket_to_node[gre->sockid - minsock],
 			_pnode_to_socket[gre->pnode - minpnode]);
 	}
 
-	/* check socket -> node values */
+	/* Set socket -> node values */
 	lnid = -1;
 	for_each_present_cpu(cpu) {
 		int nid = cpu_to_node(cpu);
@@ -1319,14 +1316,9 @@ static void __init build_socket_tables(void)
 		lnid = nid;
 		apicid = per_cpu(x86_cpu_to_apicid, cpu);
 		sockid = apicid >> uv_cpuid.socketid_shift;
-		i = sockid - minsock;
-
-		if (nid != _socket_to_node[i]) {
-			pr_warn(
-			"UV: %02x: type:%d socket:%02x PXM:%02x != node:%2d\n",
-				i, sockid, gre->type, _socket_to_node[i], nid);
-			_socket_to_node[i] = nid;
-		}
+		_socket_to_node[sockid - minsock] = nid;
+		pr_info("UV: sid:%02x: apicid:%04x node:%2d\n",
+			sockid, apicid, nid);
 	}
 
 	/* Setup physical blade to pnode translation from GAM Range Table */

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

* [tip:x86/urgent] x86/platform/UV: Fix kernel panic running RHEL kdump kernel on UV systems
  2016-08-01 18:40 ` [PATCH 4/4] x86/platform/UV: Fix kernel panic running RHEL kdump kernel on UV Mike Travis
@ 2016-08-10 18:12   ` tip-bot for Mike Travis
  0 siblings, 0 replies; 9+ messages in thread
From: tip-bot for Mike Travis @ 2016-08-10 18:12 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: sivanich, travis, abanman, estabrook, torvalds, tglx, peterz,
	akpm, framsay, rja, hpa, athorlton, linux-kernel, mingo, nzimmer

Commit-ID:  5a52e8f822374bebc702bb2688ed8b5515bbb55b
Gitweb:     http://git.kernel.org/tip/5a52e8f822374bebc702bb2688ed8b5515bbb55b
Author:     Mike Travis <travis@sgi.com>
AuthorDate: Mon, 1 Aug 2016 13:40:53 -0500
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 10 Aug 2016 15:55:39 +0200

x86/platform/UV: Fix kernel panic running RHEL kdump kernel on UV systems

The latest UV kernel support panics when RHEL7 kexec's the kdump kernel
to make a dumpfile.  This patch fixes the problem by turning off all UV
support if NUMA is off.

Tested-by: Frank Ramsay <framsay@sgi.com>
Tested-by: John Estabrook <estabrook@sgi.com>
Signed-off-by: Mike Travis <travis@sgi.com>
Reviewed-by: Dimitri Sivanich <sivanich@sgi.com>
Reviewed-by: Nathan Zimmer <nzimmer@sgi.com>
Cc: Alex Thorlton <athorlton@sgi.com>
Cc: Andrew Banman <abanman@sgi.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Russ Anderson <rja@sgi.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20160801184050.577755634@asylum.americas.sgi.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/kernel/apic/x2apic_uv_x.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c
index 6aa0545..cb0673c 100644
--- a/arch/x86/kernel/apic/x2apic_uv_x.c
+++ b/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -223,6 +223,11 @@ static int __init uv_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
 	if (strncmp(oem_id, "SGI", 3) != 0)
 		return 0;
 
+	if (numa_off) {
+		pr_err("UV: NUMA is off, disabling UV support\n");
+		return 0;
+	}
+
 	/* Setup early hub type field in uv_hub_info for Node 0 */
 	uv_cpu_info->p_uv_hub_info = &uv_hub_info_node0;
 

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

end of thread, other threads:[~2016-08-10 18:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-01 18:40 [PATCH 0/4] x86/platform/UV: SGI UV4 Kernel Fixes Mike Travis
2016-08-01 18:40 ` [PATCH 1/4] x86/platform/UV: Fix problem with UV4 Socket IDs not being contiguous Mike Travis
2016-08-10 18:11   ` [tip:x86/urgent] " tip-bot for Mike Travis
2016-08-01 18:40 ` [PATCH 2/4] x86/platform/UV: Fix problem with iounmap UV4 EFI System Table causing panic Mike Travis
2016-08-10 18:11   ` [tip:x86/urgent] x86/platform/UV: Fix bug with iounmap() of the UV4 EFI System Table causing a crash tip-bot for Mike Travis
2016-08-01 18:40 ` [PATCH 3/4] x86/platform/UV: Fix problem with UV4 BIOS providing incorrect PXM values Mike Travis
2016-08-10 18:12   ` [tip:x86/urgent] " tip-bot for Mike Travis
2016-08-01 18:40 ` [PATCH 4/4] x86/platform/UV: Fix kernel panic running RHEL kdump kernel on UV Mike Travis
2016-08-10 18:12   ` [tip:x86/urgent] x86/platform/UV: Fix kernel panic running RHEL kdump kernel on UV systems tip-bot for Mike Travis

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.