1 From: Kurt Garloff <garloff@suse.de>
2 Subject: Use SRAT table rev to use 8bit or 16/32bit PXM fields (ia64)
5 In SRAT v1, we had 8bit proximity domain (PXM) fields; SRAT v2 provides
6 32bits for these. The new fields were reserved before.
7 According to the ACPI spec, the OS must disregrard reserved fields.
9 ia64 did handle the PXM fields almost consistently, but depending on
10 sgi's sn2 platform. This patch leaves the sn2 logic in, but does also
11 use 16/32 bits for PXM if the SRAT has rev 2 or higher.
13 The patch also adds __init to the two pxm accessor functions, as they
14 access __initdata now and are called from an __init function only anyway.
16 Note that the code only uses 16 bits for the PXM field in the processor
17 proximity field; the patch does not address this as 16 bits are more than
22 Signed-off-by: Kurt Garloff <garloff@suse.de>
25 arch/ia64/kernel/acpi.c | 10 ++++++----
26 1 file changed, 6 insertions(+), 4 deletions(-)
28 --- a/arch/ia64/kernel/acpi.c
29 +++ b/arch/ia64/kernel/acpi.c
30 @@ -430,22 +430,24 @@ static u32 __devinitdata pxm_flag[PXM_FL
31 static struct acpi_table_slit __initdata *slit_table;
32 cpumask_t early_cpu_possible_map = CPU_MASK_NONE;
34 -static int get_processor_proximity_domain(struct acpi_srat_cpu_affinity *pa)
36 +get_processor_proximity_domain(struct acpi_srat_cpu_affinity *pa)
40 pxm = pa->proximity_domain_lo;
41 - if (ia64_platform_is("sn2"))
42 + if (ia64_platform_is("sn2") || acpi_srat_revision >= 2)
43 pxm += pa->proximity_domain_hi[0] << 8;
47 -static int get_memory_proximity_domain(struct acpi_srat_mem_affinity *ma)
49 +get_memory_proximity_domain(struct acpi_srat_mem_affinity *ma)
53 pxm = ma->proximity_domain;
54 - if (!ia64_platform_is("sn2"))
55 + if (!ia64_platform_is("sn2") && acpi_srat_revision <= 1)