From: Andi Kleen <ak@suse.de>
To: "Yinghai Lu" <yhlu.kernel@gmail.com>
Cc: "Andrew Morton" <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, joachim.deguara@amd.com
Subject: Re: [PATCH 3/3] x86_64: offset apicid_to_node before use it before init_cpu_to_node
Date: Sun, 22 Jul 2007 14:52:26 +0200 [thread overview]
Message-ID: <200707221452.27002.ak@suse.de> (raw)
In-Reply-To: <86802c440707211749x3258891fhbb72a155dc484e86@mail.gmail.com>
On Sunday 22 July 2007 02:49:41 Yinghai Lu wrote:
> [PATCH 3/3] x86_64: offset apicid_to_node before use it before init_cpu_to_node
>
> When acpi=off or there is no SRAT defined, apicid_to_node is got from K8
> Northbridge PCI configuration space in k8_scan_nodes() in
> arch/x86_64/mm/k8toplogy.c.
> The problem is that it assumes bsp apic id is 0 at that point.
> For four socket system with Quad core cpus installed, all cpus apic id
> is offset by 4, and bsp apic id is 4.
> For eight socket system with dual core cpus installed, all cpus apic id
> is offset by 2, and bsp apic id is 2.
> We need offset apicid_to_node array according to boot_cpu_id.--- bsp apic id.
> before we use apicid_to_node array.
> boot_cpu_id is only valid init_apic_mappings.
<rant>
This thing is getting more and more messy. If it gets any more complicated
I promise I'll rip out the non ACPI support for quad core NUMA completely
and let it require ACPI. Even the people who have a religious problem
with ACPI will need to eventually get over it and LinuxBIOS just has
to create proper tables, not pile hacks over hacks. It probably was a mistake in
the first place to add it.
</rant>
I don't think you can mess with apicid_to_node[] unconditionally here.
e.g. for the ACPI case or for the Intel NUMA case you'll just break everything.
What you should do is split init_apic_mappings() up and do a early
call that just checks if the CPU has an APIC and maps it using the
fixmap and reads boot_cpu_id. Then you can use that information
in k8topology.c to create correct tables.
-Andi
next prev parent reply other threads:[~2007-07-22 12:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-22 0:49 [PATCH 3/3] x86_64: offset apicid_to_node before use it before init_cpu_to_node Yinghai Lu
2007-07-22 8:05 ` David Rientjes
2007-07-22 8:17 ` Yinghai Lu
2007-07-22 12:52 ` Andi Kleen [this message]
2007-07-22 22:54 ` Yinghai Lu
2007-07-23 0:29 ` Andi Kleen
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=200707221452.27002.ak@suse.de \
--to=ak@suse.de \
--cc=akpm@linux-foundation.org \
--cc=joachim.deguara@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=yhlu.kernel@gmail.com \
/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 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.