aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm
diff options
context:
space:
mode:
authorKurt Garloff <kurt@garloff.de>2012-01-17 04:20:31 -0500
committerLen Brown <len.brown@intel.com>2012-01-17 04:20:31 -0500
commitcd298f60a2451a16e0f077404bf69b62ec868733 (patch)
treeaf8d374fb7e953c1cb6fb567f8d6385c3af03a3f /arch/x86/mm
parent8df0eb7c9d96f9e82f233ee8b74e0f0c8471f868 (diff)
ACPI, x86: Use SRAT table rev to use 8bit or 32bit PXM fields (x86/x86-64)
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/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). cc: x86@kernel.org Signed-off-by: Kurt Garloff <kurt@garloff.de> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'arch/x86/mm')
-rw-r--r--arch/x86/mm/srat.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/mm/srat.c b/arch/x86/mm/srat.c
index 81dbfdeb080d..7efd0c615d58 100644
--- a/arch/x86/mm/srat.c
+++ b/arch/x86/mm/srat.c
@@ -104,6 +104,8 @@ acpi_numa_processor_affinity_init(struct acpi_srat_cpu_affinity *pa)
104 if ((pa->flags & ACPI_SRAT_CPU_ENABLED) == 0) 104 if ((pa->flags & ACPI_SRAT_CPU_ENABLED) == 0)
105 return; 105 return;
106 pxm = pa->proximity_domain_lo; 106 pxm = pa->proximity_domain_lo;
107 if (acpi_srat_revision >= 2)
108 pxm |= *((unsigned int*)pa->proximity_domain_hi) << 8;
107 node = setup_node(pxm); 109 node = setup_node(pxm);
108 if (node < 0) { 110 if (node < 0) {
109 printk(KERN_ERR "SRAT: Too many proximity domains %x\n", pxm); 111 printk(KERN_ERR "SRAT: Too many proximity domains %x\n", pxm);
@@ -155,6 +157,8 @@ acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma)
155 start = ma->base_address; 157 start = ma->base_address;
156 end = start + ma->length; 158 end = start + ma->length;
157 pxm = ma->proximity_domain; 159 pxm = ma->proximity_domain;
160 if (acpi_srat_revision <= 1)
161 pxm &= 0xff;
158 node = setup_node(pxm); 162 node = setup_node(pxm);
159 if (node < 0) { 163 if (node < 0) {
160 printk(KERN_ERR "SRAT: Too many proximity domains.\n"); 164 printk(KERN_ERR "SRAT: Too many proximity domains.\n");