From: Yinghai Lu <yhlu.kernel@gmail.com>
To: Kurt Garloff <garloff@suse.de>,
Linux kernel list <linux-kernel@vger.kernel.org>,
Norbert Eicker <N.Eicker@fz-juelich.de>,
Greg Kroah-Hartman <GregKH@suse.de>,
Alexey Starikovskiy <AStarikovskiy@suse.cz>,
Len Brown <LenB@kernel.org>, xb <xavier.bru@bull.net>
Cc: Ingo Molnar <mingo@elte.hu>, "H. Peter Anvin" <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 2/3]: x86-64: Handle SRAT v1 and v2 consistently
Date: Mon, 18 May 2009 13:04:58 -0700 [thread overview]
Message-ID: <86802c440905181304m47b2a2afx264f970a29d06930@mail.gmail.com> (raw)
In-Reply-To: <20090518094745.GF15531@tpkurt2.garloff.de>
On Mon, May 18, 2009 at 2:47 AM, Kurt Garloff <garloff@suse.de> wrote:
> Hi,
>
> x86-64 was rather inconsistent prior to this patch; it used 8 bits
> for the pxm field in cpu_affinity, but 32 bits in mem_affinity.
> This patch makes it consistent: Either use 8 bits consistently (SRAT
> rev 1 or lower) or 32 bits (SRAT rev 2 or higher).
>
> This is patch 2/3.
> --
> Kurt Garloff, VP OPS Partner Engineering -- Novell Inc.
>
From: Kurt Garloff <garloff@suse.de>
Subject: Use SRAT table rev to use 8bit or 32bit PXM fields (x86-64)
References: bnc#503038
In SRAT v1, we had 8bit proximity domain (PXM) fields; SRAT v2 provides
32bits for these. The new fields were reserved before.
According to the ACPI spec, the OS must disregrard reserved fields.
x86-64 was rather inconsistent prior to this patch; it used 8 bits
for the pxm field in cpu_affinity, but 32 bits in mem_affinity.
This patch makes it consistent: Either use 8 bits consistently (SRAT
rev 1 or lower) or 32 bits (SRAT rev 2 or higher).
This is patch 2/3.
Signed-off-by: Kurt Garloff <garloff@suse.de>
---
arch/x86/mm/srat_64.c | 4 ++++
1 file changed, 4 insertions(+)
Index: linux-2.6/arch/x86/mm/srat_64.c
===================================================================
--- linux-2.6.orig/arch/x86/mm/srat_64.c
+++ linux-2.6/arch/x86/mm/srat_64.c
@@ -154,6 +154,8 @@ acpi_numa_processor_affinity_init(struct
if ((pa->flags & ACPI_SRAT_CPU_ENABLED) == 0)
return;
pxm = pa->proximity_domain_lo;
+ if (acpi_srat_revision >= 2)
+ pxm |= *((unsigned int*)pa->proximity_domain_hi) << 8;
node = setup_node(pxm);
if (node < 0) {
printk(KERN_ERR "SRAT: Too many proximity domains %x\n", pxm);
@@ -255,6 +257,8 @@ acpi_numa_memory_affinity_init(struct ac
start = ma->base_address;
end = start + ma->length;
pxm = ma->proximity_domain;
+ if (acpi_srat_revision <= 1)
+ pxm &= 0xff;
node = setup_node(pxm);
if (node < 0) {
printk(KERN_ERR "SRAT: Too many proximity domains.\n");
Acked-by: Yinghai Lu <yinghai@kernel.org>
next prev parent reply other threads:[~2009-05-18 20:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-18 9:33 [PATCH 0/3]: Discard reserved PXM bits for SRAT v1 Kurt Garloff
2009-05-18 9:46 ` [PATCH 1/3]: Store SRAT revision Kurt Garloff
2009-05-18 9:47 ` [PATCH 2/3]: x86-64: Handle SRAT v1 and v2 consistently Kurt Garloff
2009-05-18 20:04 ` Yinghai Lu [this message]
2009-05-18 9:49 ` [PATCH 3/3]: Consider SRAT rev on ia64 Kurt Garloff
2009-05-18 15:33 ` [PATCH 0/3]: Discard reserved PXM bits for SRAT v1 Greg KH
2009-05-19 9:01 ` xb
2009-06-22 14:05 ` Erik Jacobson
2009-07-14 16:55 ` [PATCH 0/3] Resend: " Kurt Garloff
2009-07-14 16:57 ` [PATCH 1/3] Resend: [PATCH 1/3]: Store SRAT revision Kurt Garloff
2009-07-14 16:58 ` [PATCH 2/3] Resend: x86-64: Handle SRAT v1 and v2 consistently Kurt Garloff
2009-07-17 22:10 ` Yinghai Lu
2009-07-14 16:59 ` [PATCH 3/3] Resend: Consider SRAT rev on ia64 Kurt Garloff
2009-08-13 13:38 ` [PATCH 0/3]: Discard reserved PXM bits for SRAT v1 Chuck Ebbert
2012-01-15 21:30 [PATCH 0/3] ACPI SRAT: Disregard reserved PXM bits Kurt Garloff
2012-01-15 21:36 ` [PATCH 2/3]: x86-64: Handle SRAT v1 and v2 consistently Kurt Garloff
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=86802c440905181304m47b2a2afx264f970a29d06930@mail.gmail.com \
--to=yhlu.kernel@gmail.com \
--cc=AStarikovskiy@suse.cz \
--cc=GregKH@suse.de \
--cc=LenB@kernel.org \
--cc=N.Eicker@fz-juelich.de \
--cc=akpm@linux-foundation.org \
--cc=garloff@suse.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=xavier.bru@bull.net \
/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
all inboxes | Powered by JetHome®