From: Jack Steiner <steiner@sgi.com>
To: mingo@elte.hu, tglx@linutronix.de
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] - Earlier detection of system type (UV or non-UV)
Date: Wed, 9 Jul 2008 11:36:02 -0500 [thread overview]
Message-ID: <20080709163602.GA12543@sgi.com> (raw)
A patch is coming that requires earlier detection of system type (UV or non-UV)
Move the logic that detects whether running on UV to acpi_boot_table_init().
Signed-off-by: Jack Steiner <steiner@sgi.com>
---
arch/x86/kernel/acpi/boot.c | 4 ++++
arch/x86/kernel/genapic_64.c | 15 ++++++++++-----
arch/x86/mm/srat_64.c | 2 +-
include/asm-x86/genapic_64.h | 3 +++
4 files changed, 18 insertions(+), 6 deletions(-)
Index: linux/arch/x86/kernel/acpi/boot.c
===================================================================
--- linux.orig/arch/x86/kernel/acpi/boot.c 2008-07-09 11:14:03.000000000 -0500
+++ linux/arch/x86/kernel/acpi/boot.c 2008-07-09 11:14:33.000000000 -0500
@@ -1712,6 +1712,10 @@ int __init acpi_boot_table_init(void)
return error;
}
+#ifdef CONFIG_X86_64
+ acpi_table_parse(ACPI_SIG_MADT, acpi_early_madt_oem_check);
+#endif
+
acpi_table_parse(ACPI_SIG_BOOT, acpi_parse_sbf);
/*
Index: linux/arch/x86/kernel/genapic_64.c
===================================================================
--- linux.orig/arch/x86/kernel/genapic_64.c 2008-07-09 11:14:03.000000000 -0500
+++ linux/arch/x86/kernel/genapic_64.c 2008-07-09 11:14:33.000000000 -0500
@@ -66,19 +66,24 @@ void send_IPI_self(int vector)
__send_IPI_shortcut(APIC_DEST_SELF, vector, APIC_DEST_PHYSICAL);
}
-int __init acpi_madt_oem_check(char *oem_id, char *oem_table_id)
+int __init acpi_early_madt_oem_check(struct acpi_table_header *table)
{
- if (!strcmp(oem_id, "SGI")) {
- if (!strcmp(oem_table_id, "UVL"))
+ if (!strcmp(table->oem_id, "SGI")) {
+ if (!strcmp(table->oem_table_id, "UVL"))
uv_system_type = UV_LEGACY_APIC;
- else if (!strcmp(oem_table_id, "UVX"))
+ else if (!strcmp(table->oem_table_id, "UVX"))
uv_system_type = UV_X2APIC;
- else if (!strcmp(oem_table_id, "UVH"))
+ else if (!strcmp(table->oem_table_id, "UVH"))
uv_system_type = UV_NON_UNIQUE_APIC;
}
return 0;
}
+int __init acpi_madt_oem_check(char *oem_id, char *oem_table_id)
+{
+ return 0;
+}
+
unsigned int read_apic_id(void)
{
unsigned int id;
Index: linux/include/asm-x86/genapic_64.h
===================================================================
--- linux.orig/include/asm-x86/genapic_64.h 2008-07-09 11:14:03.000000000 -0500
+++ linux/include/asm-x86/genapic_64.h 2008-07-09 11:14:33.000000000 -0500
@@ -39,6 +39,9 @@ enum uv_system_type {UV_NONE, UV_LEGACY_
extern enum uv_system_type get_uv_system_type(void);
extern int is_uv_system(void);
+struct acpi_table_header;
+extern int acpi_early_madt_oem_check(struct acpi_table_header *);
+
extern struct genapic apic_x2apic_uv_x;
DECLARE_PER_CPU(int, x2apic_extra_bits);
extern void uv_cpu_init(void);
Index: linux/arch/x86/mm/srat_64.c
===================================================================
--- linux.orig/arch/x86/mm/srat_64.c 2008-07-09 11:14:02.000000000 -0500
+++ linux/arch/x86/mm/srat_64.c 2008-07-09 11:14:33.000000000 -0500
@@ -126,7 +126,7 @@ acpi_numa_processor_affinity_init(struct
return;
}
- if (is_uv_system())
+ if (get_uv_system_type() >= UV_X2APIC)
apic_id = (pa->apic_id << 8) | pa->local_sapic_eid;
else
apic_id = pa->apic_id;
next reply other threads:[~2008-07-09 16:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-09 16:36 Jack Steiner [this message]
2008-07-18 17:13 ` [PATCH] - Earlier detection of system type (UV or non-UV) Ingo Molnar
2008-07-18 17:49 ` Ingo Molnar
2008-07-18 18:38 ` Jack Steiner
2008-07-18 20:13 ` Ingo Molnar
2008-07-18 21:28 ` Jack Steiner
2008-07-20 9:00 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080709163602.GA12543@sgi.com \
--to=steiner@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox