]>
Commit | Line | Data |
---|---|---|
00e5a55c BS |
1 | From: Kurt Garloff <garloff@suse.de> |
2 | Subject: Store SRAT table revision | |
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 | In order to know whether or not, we must know what version the SRAT | |
9 | table has. | |
10 | ||
11 | This patch stores the SRAT table revision for later consumption | |
12 | by arch specific __init functions. | |
13 | ||
14 | This is patch 1/3. | |
15 | ||
16 | Signed-off-by: Kurt Garloff <garloff@suse.de> | |
17 | ||
18 | --- | |
19 | drivers/acpi/numa.c | 3 +++ | |
20 | include/acpi/acpi_numa.h | 1 + | |
21 | 2 files changed, 4 insertions(+) | |
22 | ||
23 | --- a/drivers/acpi/numa.c | |
24 | +++ b/drivers/acpi/numa.c | |
25 | @@ -43,6 +43,8 @@ static int pxm_to_node_map[MAX_PXM_DOMAI | |
26 | static int node_to_pxm_map[MAX_NUMNODES] | |
27 | = { [0 ... MAX_NUMNODES - 1] = PXM_INVAL }; | |
28 | ||
29 | +unsigned char acpi_srat_revision __initdata; | |
30 | + | |
31 | int pxm_to_node(int pxm) | |
32 | { | |
33 | if (pxm < 0) | |
34 | @@ -225,6 +227,7 @@ static int __init acpi_parse_srat(struct | |
35 | return -EINVAL; | |
36 | ||
37 | srat = (struct acpi_table_srat *)table; | |
38 | + acpi_srat_revision = srat->header.revision; | |
39 | ||
40 | return 0; | |
41 | } | |
42 | --- a/include/acpi/acpi_numa.h | |
43 | +++ b/include/acpi/acpi_numa.h | |
44 | @@ -15,6 +15,7 @@ extern int pxm_to_node(int); | |
45 | extern int node_to_pxm(int); | |
46 | extern void __acpi_map_pxm_to_node(int, int); | |
47 | extern int acpi_map_pxm_to_node(int); | |
48 | +extern unsigned char acpi_srat_revision; | |
49 | ||
50 | #endif /* CONFIG_ACPI_NUMA */ | |
51 | #endif /* __ACP_NUMA_H */ |