From: Kurt Garloff <garloff@suse.de>
To: Linux kernel list <linux-kernel@vger.kernel.org>
Subject: [PATCH 2/3] Resend: x86-64: Handle SRAT v1 and v2 consistently
Date: Tue, 14 Jul 2009 18:58:30 +0200 [thread overview]
Message-ID: <20090714165830.GF31657@tpkurt2.suse.de> (raw)
In-Reply-To: <20090714165508.GD31657@tpkurt2.suse.de>
[-- Attachment #1.1: Type: text/plain, Size: 595 bytes --]
Hi,
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 disregard 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>
--
Kurt Garloff, VP OPS Partner Engineering -- Novell Inc.
[-- Attachment #1.2: 02_srat-pxm-rev-x86-64.diff --]
[-- Type: text/x-patch, Size: 1413 bytes --]
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 disregard 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>
diff -r a28eb89d1fe1 arch/x86/mm/srat_64.c
--- a/arch/x86/mm/srat_64.c Tue Jul 14 02:00:45 2009 +0000
+++ b/arch/x86/mm/srat_64.c Tue Jul 14 16:44:35 2009 +0200
@@ -154,6 +154,8 @@
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 @@
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");
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2009-07-14 16:57 UTC|newest]
Thread overview: 14+ 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
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 ` Kurt Garloff [this message]
2009-07-17 22:10 ` [PATCH 2/3] Resend: x86-64: Handle SRAT v1 and v2 consistently 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
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=20090714165830.GF31657@tpkurt2.suse.de \
--to=garloff@suse.de \
--cc=linux-kernel@vger.kernel.org \
/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