[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <157045977229.9978.6327888558896438069.tip-bot2@tip-bot2>
Date: Mon, 07 Oct 2019 14:49:32 -0000
From: "tip-bot2 for Mike Travis" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Mike Travis <mike.travis@....com>, Steve Wahl <steve.wahl@....com>,
Dimitri Sivanich <dimitri.sivanich@....com>,
Andrew Morton <akpm@...ux-foundation.org>,
Borislav Petkov <bp@...en8.de>,
Christoph Hellwig <hch@...radead.org>,
"H. Peter Anvin" <hpa@...or.com>,
Hedi Berriche <hedi.berriche@....com>,
Justin Ernst <justin.ernst@....com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Peter Zijlstra <peterz@...radead.org>,
Russ Anderson <russ.anderson@....com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...nel.org>, linux-kernel@...r.kernel.org
Subject: [tip: x86/platform] x86/platform/uv: Save OEM_ID from ACPI MADT probe
The following commit has been merged into the x86/platform branch of tip:
Commit-ID: 61e5ddca9c2a312f933bf5b12bc08484189fefe6
Gitweb: https://git.kernel.org/tip/61e5ddca9c2a312f933bf5b12bc08484189fefe6
Author: Mike Travis <mike.travis@....com>
AuthorDate: Tue, 10 Sep 2019 09:58:40 -05:00
Committer: Ingo Molnar <mingo@...nel.org>
CommitterDate: Mon, 07 Oct 2019 13:42:09 +02:00
x86/platform/uv: Save OEM_ID from ACPI MADT probe
Save the OEM_ID and OEM_TABLE_ID passed to the apic driver probe function
for later use. Also, convert the char list arg passed from the kernel
to a true null-terminated string.
Signed-off-by: Mike Travis <mike.travis@....com>
Reviewed-by: Steve Wahl <steve.wahl@....com>
Reviewed-by: Dimitri Sivanich <dimitri.sivanich@....com>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Borislav Petkov <bp@...en8.de>
Cc: Christoph Hellwig <hch@...radead.org>
Cc: H. Peter Anvin <hpa@...or.com>
Cc: Hedi Berriche <hedi.berriche@....com>
Cc: Justin Ernst <justin.ernst@....com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Russ Anderson <russ.anderson@....com>
Cc: Thomas Gleixner <tglx@...utronix.de>
Link: https://lkml.kernel.org/r/20190910145839.732237241@stormcage.eag.rdlabs.hpecorp.net
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
arch/x86/kernel/apic/x2apic_uv_x.c | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c
index e6230af..66b38a6 100644
--- a/arch/x86/kernel/apic/x2apic_uv_x.c
+++ b/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -14,6 +14,7 @@
#include <linux/memory.h>
#include <linux/export.h>
#include <linux/pci.h>
+#include <linux/acpi.h>
#include <asm/e820/api.h>
#include <asm/uv/uv_mmrs.h>
@@ -31,6 +32,10 @@ static u64 gru_dist_base, gru_first_node_paddr = -1LL, gru_last_node_paddr;
static u64 gru_dist_lmask, gru_dist_umask;
static union uvh_apicid uvh_apicid;
+/* Unpack OEM/TABLE ID's to be NULL terminated strings */
+static u8 oem_id[ACPI_OEM_ID_SIZE + 1];
+static u8 oem_table_id[ACPI_OEM_TABLE_ID_SIZE + 1];
+
/* Information derived from CPUID: */
static struct {
unsigned int apicid_shift;
@@ -248,11 +253,20 @@ static void __init uv_set_apicid_hibit(void)
}
}
-static int __init uv_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
+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);
+}
+
+static int __init uv_acpi_madt_oem_check(char *_oem_id, char *_oem_table_id)
{
int pnodeid;
int uv_apic;
+ uv_stringify(sizeof(oem_id), oem_id, _oem_id);
+ uv_stringify(sizeof(oem_table_id), oem_table_id, _oem_table_id);
+
if (strncmp(oem_id, "SGI", 3) != 0) {
if (strncmp(oem_id, "NSGI", 4) == 0) {
uv_hubless_system = true;
Powered by blists - more mailing lists