All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] x86/platform/uv: UV5 Update Fixes
@ 2020-11-05 22:27 Mike Travis
  2020-11-05 22:27 ` [PATCH 1/3] x86/platform/uv: Fix missing OEM_TABLE_ID Mike Travis
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Mike Travis @ 2020-11-05 22:27 UTC (permalink / raw)
  To: Borislav Petkov, Thomas Gleixner, Ingo Molnar, Steve Wahl,
	H. Peter Anvin, x86
  Cc: Mike Travis, Dimitri Sivanich, Russ Anderson, linux-kernel


Fixes for UV5 updates found in testing:

* Fix missing oem_table ids.

* Fix oem/oem_table ids with trailing spaces.

* Fix H3/UV5 hubless not being recognized.


Mike Travis (3):
  x86/platform/uv: Fix missing OEM_TABLE_ID
  x86/platform/uv: Remove spaces from OEM IDs
  x86/platform/uv: Recognize UV5 hubless system identifier

 arch/x86/kernel/apic/x2apic_uv_x.c | 23 ++++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)

-- 
2.21.0


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

* [PATCH 1/3] x86/platform/uv: Fix missing OEM_TABLE_ID
  2020-11-05 22:27 [PATCH 0/3] x86/platform/uv: UV5 Update Fixes Mike Travis
@ 2020-11-05 22:27 ` Mike Travis
  2020-11-07 10:18   ` [tip: x86/urgent] " tip-bot2 for Mike Travis
  2020-11-05 22:27 ` [PATCH 2/3] x86/platform/uv: Remove spaces from OEM IDs Mike Travis
  2020-11-05 22:27 ` [PATCH 3/3] x86/platform/uv: Recognize UV5 hubless system identifier Mike Travis
  2 siblings, 1 reply; 7+ messages in thread
From: Mike Travis @ 2020-11-05 22:27 UTC (permalink / raw)
  To: Borislav Petkov, Thomas Gleixner, Ingo Molnar, Steve Wahl,
	H. Peter Anvin, x86
  Cc: Mike Travis, Dimitri Sivanich, Russ Anderson, linux-kernel

Testing shows a problem in that the OEM_TABLE_ID was missing for
hubless systems.  This is used to determine the APIC type (legacy or
extended).  Add the OEM_TABLE_ID to the early hubless processing.

Fixes: 1e61f5a95f191 ("Add and decode Arch Type in UVsystab")

Signed-off-by: Mike Travis <mike.travis@hpe.com>
---
 arch/x86/kernel/apic/x2apic_uv_x.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c
index 714233cee0b5..a5794794ea59 100644
--- a/arch/x86/kernel/apic/x2apic_uv_x.c
+++ b/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -366,7 +366,7 @@ static int __init early_get_arch_type(void)
 	return ret;
 }
 
-static int __init uv_set_system_type(char *_oem_id)
+static int __init uv_set_system_type(char *_oem_id, char *_oem_table_id)
 {
 	/* Save OEM_ID passed from ACPI MADT */
 	uv_stringify(sizeof(oem_id), oem_id, _oem_id);
@@ -394,6 +394,9 @@ static int __init uv_set_system_type(char *_oem_id)
 		else
 			uv_hubless_system = 0x9;
 
+		/* Copy APIC type */
+		uv_stringify(sizeof(oem_table_id), oem_table_id, _oem_table_id);
+
 		pr_info("UV: OEM IDs %s/%s, SystemType %d, HUBLESS ID %x\n",
 			oem_id, oem_table_id, uv_system_type, uv_hubless_system);
 		return 0;
@@ -456,7 +459,7 @@ static int __init uv_acpi_madt_oem_check(char *_oem_id, char *_oem_table_id)
 	uv_cpu_info->p_uv_hub_info = &uv_hub_info_node0;
 
 	/* If not UV, return. */
-	if (likely(uv_set_system_type(_oem_id) == 0))
+	if (uv_set_system_type(_oem_id, _oem_table_id) == 0)
 		return 0;
 
 	/* Save and Decode OEM Table ID */
-- 
2.21.0


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

* [PATCH 2/3] x86/platform/uv: Remove spaces from OEM IDs
  2020-11-05 22:27 [PATCH 0/3] x86/platform/uv: UV5 Update Fixes Mike Travis
  2020-11-05 22:27 ` [PATCH 1/3] x86/platform/uv: Fix missing OEM_TABLE_ID Mike Travis
@ 2020-11-05 22:27 ` Mike Travis
  2020-11-07 10:18   ` [tip: x86/urgent] " tip-bot2 for Mike Travis
  2020-11-05 22:27 ` [PATCH 3/3] x86/platform/uv: Recognize UV5 hubless system identifier Mike Travis
  2 siblings, 1 reply; 7+ messages in thread
From: Mike Travis @ 2020-11-05 22:27 UTC (permalink / raw)
  To: Borislav Petkov, Thomas Gleixner, Ingo Molnar, Steve Wahl,
	H. Peter Anvin, x86
  Cc: Mike Travis, Dimitri Sivanich, Russ Anderson, linux-kernel

Testing shows that trailing spaces caused problems with the OEM_ID and
the OEM_TABLE_ID.  One being that the OEM_ID would not string compare
correctly.  Another the OEM_ID and OEM_TABLE_ID would be concatenated
in the printout.  Remove any trailing spaces.

Fixes: 1e61f5a95f191 ("Add and decode Arch Type in UVsystab")

Signed-off-by: Mike Travis <mike.travis@hpe.com>
---
 arch/x86/kernel/apic/x2apic_uv_x.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c
index a5794794ea59..0f848d6dddc9 100644
--- a/arch/x86/kernel/apic/x2apic_uv_x.c
+++ b/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -290,6 +290,9 @@ static void __init uv_stringify(int len, char *to, char *from)
 {
 	/* Relies on 'to' being NULL chars so result will be NULL terminated */
 	strncpy(to, from, len-1);
+
+	/* Trim trailing spaces */
+	(void)strim(to);
 }
 
 /* Find UV arch type entry in UVsystab */
-- 
2.21.0


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

* [PATCH 3/3] x86/platform/uv: Recognize UV5 hubless system identifier
  2020-11-05 22:27 [PATCH 0/3] x86/platform/uv: UV5 Update Fixes Mike Travis
  2020-11-05 22:27 ` [PATCH 1/3] x86/platform/uv: Fix missing OEM_TABLE_ID Mike Travis
  2020-11-05 22:27 ` [PATCH 2/3] x86/platform/uv: Remove spaces from OEM IDs Mike Travis
@ 2020-11-05 22:27 ` Mike Travis
  2020-11-07 10:18   ` [tip: x86/urgent] " tip-bot2 for Mike Travis
  2 siblings, 1 reply; 7+ messages in thread
From: Mike Travis @ 2020-11-05 22:27 UTC (permalink / raw)
  To: Borislav Petkov, Thomas Gleixner, Ingo Molnar, Steve Wahl,
	H. Peter Anvin, x86
  Cc: Mike Travis, Dimitri Sivanich, Russ Anderson, linux-kernel

Testing shows a problem in that UV5 hubless systems were not being
recognized.  Add them to the list of OEM IDs checked.

Fixes: 6c7794423a998 ("Add UV5 direct references")

Signed-off-by: Mike Travis <mike.travis@hpe.com>
---
 arch/x86/kernel/apic/x2apic_uv_x.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c
index 0f848d6dddc9..3115caa7d7d0 100644
--- a/arch/x86/kernel/apic/x2apic_uv_x.c
+++ b/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -389,13 +389,20 @@ static int __init uv_set_system_type(char *_oem_id, char *_oem_table_id)
 			/* (Not hubless), not a UV */
 			return 0;
 
+		/* Is UV hubless system */
+		uv_hubless_system = 0x01;
+
+		/* UV5 Hubless */
+		if (strncmp(uv_archtype, "NSGI5", 5) == 0)
+			uv_hubless_system |= 0x20;
+
 		/* UV4 Hubless: CH */
-		if (strncmp(uv_archtype, "NSGI4", 5) == 0)
-			uv_hubless_system = 0x11;
+		else if (strncmp(uv_archtype, "NSGI4", 5) == 0)
+			uv_hubless_system |= 0x10;
 
 		/* UV3 Hubless: UV300/MC990X w/o hub */
 		else
-			uv_hubless_system = 0x9;
+			uv_hubless_system |= 0x8;
 
 		/* Copy APIC type */
 		uv_stringify(sizeof(oem_table_id), oem_table_id, _oem_table_id);
-- 
2.21.0


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

* [tip: x86/urgent] x86/platform/uv: Recognize UV5 hubless system identifier
  2020-11-05 22:27 ` [PATCH 3/3] x86/platform/uv: Recognize UV5 hubless system identifier Mike Travis
@ 2020-11-07 10:18   ` tip-bot2 for Mike Travis
  0 siblings, 0 replies; 7+ messages in thread
From: tip-bot2 for Mike Travis @ 2020-11-07 10:18 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Mike Travis, Thomas Gleixner, x86, LKML

The following commit has been merged into the x86/urgent branch of tip:

Commit-ID:     801284f9737883a2b2639bd494455a72c82fdedf
Gitweb:        https://git.kernel.org/tip/801284f9737883a2b2639bd494455a72c82fdedf
Author:        Mike Travis <mike.travis@hpe.com>
AuthorDate:    Thu, 05 Nov 2020 16:27:41 -06:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Sat, 07 Nov 2020 11:17:39 +01:00

x86/platform/uv: Recognize UV5 hubless system identifier

Testing shows a problem in that UV5 hubless systems were not being
recognized.  Add them to the list of OEM IDs checked.

Fixes: 6c7794423a998 ("Add UV5 direct references")
Signed-off-by: Mike Travis <mike.travis@hpe.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20201105222741.157029-4-mike.travis@hpe.com


---
 arch/x86/kernel/apic/x2apic_uv_x.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c
index 0f848d6..3115caa 100644
--- a/arch/x86/kernel/apic/x2apic_uv_x.c
+++ b/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -389,13 +389,20 @@ static int __init uv_set_system_type(char *_oem_id, char *_oem_table_id)
 			/* (Not hubless), not a UV */
 			return 0;
 
+		/* Is UV hubless system */
+		uv_hubless_system = 0x01;
+
+		/* UV5 Hubless */
+		if (strncmp(uv_archtype, "NSGI5", 5) == 0)
+			uv_hubless_system |= 0x20;
+
 		/* UV4 Hubless: CH */
-		if (strncmp(uv_archtype, "NSGI4", 5) == 0)
-			uv_hubless_system = 0x11;
+		else if (strncmp(uv_archtype, "NSGI4", 5) == 0)
+			uv_hubless_system |= 0x10;
 
 		/* UV3 Hubless: UV300/MC990X w/o hub */
 		else
-			uv_hubless_system = 0x9;
+			uv_hubless_system |= 0x8;
 
 		/* Copy APIC type */
 		uv_stringify(sizeof(oem_table_id), oem_table_id, _oem_table_id);

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

* [tip: x86/urgent] x86/platform/uv: Remove spaces from OEM IDs
  2020-11-05 22:27 ` [PATCH 2/3] x86/platform/uv: Remove spaces from OEM IDs Mike Travis
@ 2020-11-07 10:18   ` tip-bot2 for Mike Travis
  0 siblings, 0 replies; 7+ messages in thread
From: tip-bot2 for Mike Travis @ 2020-11-07 10:18 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Mike Travis, Thomas Gleixner, x86, LKML

The following commit has been merged into the x86/urgent branch of tip:

Commit-ID:     1aee505e0171fc38fd5ed70c7f0dcbb7398c759f
Gitweb:        https://git.kernel.org/tip/1aee505e0171fc38fd5ed70c7f0dcbb7398c759f
Author:        Mike Travis <mike.travis@hpe.com>
AuthorDate:    Thu, 05 Nov 2020 16:27:40 -06:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Sat, 07 Nov 2020 11:17:39 +01:00

x86/platform/uv: Remove spaces from OEM IDs

Testing shows that trailing spaces caused problems with the OEM_ID and
the OEM_TABLE_ID.  One being that the OEM_ID would not string compare
correctly.  Another the OEM_ID and OEM_TABLE_ID would be concatenated
in the printout.  Remove any trailing spaces.

Fixes: 1e61f5a95f191 ("Add and decode Arch Type in UVsystab")
Signed-off-by: Mike Travis <mike.travis@hpe.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20201105222741.157029-3-mike.travis@hpe.com


---
 arch/x86/kernel/apic/x2apic_uv_x.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c
index a579479..0f848d6 100644
--- a/arch/x86/kernel/apic/x2apic_uv_x.c
+++ b/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -290,6 +290,9 @@ static void __init uv_stringify(int len, char *to, char *from)
 {
 	/* Relies on 'to' being NULL chars so result will be NULL terminated */
 	strncpy(to, from, len-1);
+
+	/* Trim trailing spaces */
+	(void)strim(to);
 }
 
 /* Find UV arch type entry in UVsystab */

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

* [tip: x86/urgent] x86/platform/uv: Fix missing OEM_TABLE_ID
  2020-11-05 22:27 ` [PATCH 1/3] x86/platform/uv: Fix missing OEM_TABLE_ID Mike Travis
@ 2020-11-07 10:18   ` tip-bot2 for Mike Travis
  0 siblings, 0 replies; 7+ messages in thread
From: tip-bot2 for Mike Travis @ 2020-11-07 10:18 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Mike Travis, Thomas Gleixner, x86, LKML

The following commit has been merged into the x86/urgent branch of tip:

Commit-ID:     1aec69ae56be28b5fd3c9daead5f3840c30153c8
Gitweb:        https://git.kernel.org/tip/1aec69ae56be28b5fd3c9daead5f3840c30153c8
Author:        Mike Travis <mike.travis@hpe.com>
AuthorDate:    Thu, 05 Nov 2020 16:27:39 -06:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Sat, 07 Nov 2020 11:17:39 +01:00

x86/platform/uv: Fix missing OEM_TABLE_ID

Testing shows a problem in that the OEM_TABLE_ID was missing for
hubless systems.  This is used to determine the APIC type (legacy or
extended).  Add the OEM_TABLE_ID to the early hubless processing.

Fixes: 1e61f5a95f191 ("Add and decode Arch Type in UVsystab")
Signed-off-by: Mike Travis <mike.travis@hpe.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20201105222741.157029-2-mike.travis@hpe.com
---
 arch/x86/kernel/apic/x2apic_uv_x.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c
index 714233c..a579479 100644
--- a/arch/x86/kernel/apic/x2apic_uv_x.c
+++ b/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -366,7 +366,7 @@ static int __init early_get_arch_type(void)
 	return ret;
 }
 
-static int __init uv_set_system_type(char *_oem_id)
+static int __init uv_set_system_type(char *_oem_id, char *_oem_table_id)
 {
 	/* Save OEM_ID passed from ACPI MADT */
 	uv_stringify(sizeof(oem_id), oem_id, _oem_id);
@@ -394,6 +394,9 @@ static int __init uv_set_system_type(char *_oem_id)
 		else
 			uv_hubless_system = 0x9;
 
+		/* Copy APIC type */
+		uv_stringify(sizeof(oem_table_id), oem_table_id, _oem_table_id);
+
 		pr_info("UV: OEM IDs %s/%s, SystemType %d, HUBLESS ID %x\n",
 			oem_id, oem_table_id, uv_system_type, uv_hubless_system);
 		return 0;
@@ -456,7 +459,7 @@ static int __init uv_acpi_madt_oem_check(char *_oem_id, char *_oem_table_id)
 	uv_cpu_info->p_uv_hub_info = &uv_hub_info_node0;
 
 	/* If not UV, return. */
-	if (likely(uv_set_system_type(_oem_id) == 0))
+	if (uv_set_system_type(_oem_id, _oem_table_id) == 0)
 		return 0;
 
 	/* Save and Decode OEM Table ID */

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

end of thread, other threads:[~2020-11-07 10:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-05 22:27 [PATCH 0/3] x86/platform/uv: UV5 Update Fixes Mike Travis
2020-11-05 22:27 ` [PATCH 1/3] x86/platform/uv: Fix missing OEM_TABLE_ID Mike Travis
2020-11-07 10:18   ` [tip: x86/urgent] " tip-bot2 for Mike Travis
2020-11-05 22:27 ` [PATCH 2/3] x86/platform/uv: Remove spaces from OEM IDs Mike Travis
2020-11-07 10:18   ` [tip: x86/urgent] " tip-bot2 for Mike Travis
2020-11-05 22:27 ` [PATCH 3/3] x86/platform/uv: Recognize UV5 hubless system identifier Mike Travis
2020-11-07 10:18   ` [tip: x86/urgent] " tip-bot2 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.