2015-04-09 18:26:40

by Mike Travis

[permalink] [raw]
Subject: [PATCH 1/3] X86, UV: Update UV APIC OEM check

Optimize the first "SGI" OEM check to return faster if the system is
not an SGI or UV system.

Signed-off-by: Mike Travis <[email protected]>
Acked-by: Hedi Berriche <[email protected]>
Acked-by: Dimitri Sivanich <[email protected]>
---
arch/x86/kernel/apic/x2apic_uv_x.c | 3 +++
1 file changed, 3 insertions(+)

--- linux.orig/arch/x86/kernel/apic/x2apic_uv_x.c
+++ linux/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -146,6 +146,9 @@ static int __init uv_acpi_madt_oem_check
{
int pnodeid, is_uv1, is_uv2, is_uv3;

+ if (strncmp(oem_id, "SGI", 3) != 0)
+ return 0;
+
is_uv1 = !strcmp(oem_id, "SGI");
is_uv2 = !strcmp(oem_id, "SGI2");
is_uv3 = !strncmp(oem_id, "SGI3", 4); /* there are varieties of UV3 */

--


Subject: [tip:x86/apic] x86/apic/uv: Update the APIC UV OEM check

Commit-ID: 7a4e017041136de05527722b97e0c1f8702a5cbe
Gitweb: http://git.kernel.org/tip/7a4e017041136de05527722b97e0c1f8702a5cbe
Author: Mike Travis <[email protected]>
AuthorDate: Thu, 9 Apr 2015 13:26:29 -0500
Committer: Ingo Molnar <[email protected]>
CommitDate: Fri, 10 Apr 2015 10:16:07 +0200

x86/apic/uv: Update the APIC UV OEM check

Optimize the first "SGI" OEM check to return faster if the
system is not an SGI or UV system.

Signed-off-by: Mike Travis <[email protected]>
Acked-by: Hedi Berriche <[email protected]>
Acked-by: Dimitri Sivanich <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
---
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 8e9dcfd..2a739a9 100644
--- a/arch/x86/kernel/apic/x2apic_uv_x.c
+++ b/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -146,6 +146,9 @@ static int __init uv_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
{
int pnodeid, is_uv1, is_uv2, is_uv3;

+ if (strncmp(oem_id, "SGI", 3) != 0)
+ return 0;
+
is_uv1 = !strcmp(oem_id, "SGI");
is_uv2 = !strcmp(oem_id, "SGI2");
is_uv3 = !strncmp(oem_id, "SGI3", 4); /* there are varieties of UV3 */