]>
Commit | Line | Data |
---|---|---|
00e5a55c BS |
1 | From: Kurt Garloff <garloff@suse.de> |
2 | Subject: Use SRAT table rev to use 8bit or 16/32bit PXM fields (ia64) | |
3 | References: bnc#503038 | |
4 | ||
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. | |
8 | ||
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. | |
12 | ||
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. | |
15 | ||
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 | |
18 | enough. | |
19 | ||
20 | This is patch 3/3. | |
21 | ||
22 | Signed-off-by: Kurt Garloff <garloff@suse.de> | |
23 | ||
24 | --- | |
25 | arch/ia64/kernel/acpi.c | 10 ++++++---- | |
26 | 1 file changed, 6 insertions(+), 4 deletions(-) | |
27 | ||
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; | |
33 | ||
34 | -static int get_processor_proximity_domain(struct acpi_srat_cpu_affinity *pa) | |
35 | +static int __init | |
36 | +get_processor_proximity_domain(struct acpi_srat_cpu_affinity *pa) | |
37 | { | |
38 | int pxm; | |
39 | ||
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; | |
44 | return pxm; | |
45 | } | |
46 | ||
47 | -static int get_memory_proximity_domain(struct acpi_srat_mem_affinity *ma) | |
48 | +static int __init | |
49 | +get_memory_proximity_domain(struct acpi_srat_mem_affinity *ma) | |
50 | { | |
51 | int pxm; | |
52 | ||
53 | pxm = ma->proximity_domain; | |
54 | - if (!ia64_platform_is("sn2")) | |
55 | + if (!ia64_platform_is("sn2") && acpi_srat_revision <= 1) | |
56 | pxm &= 0xff; | |
57 | ||
58 | return pxm; |