aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKurt Garloff <kurt@garloff.de>2012-01-17 04:18:02 -0500
committerHerton Ronaldo Krzesinski <herton.krzesinski@canonical.com>2012-02-13 15:14:57 -0500
commitece758a0a0c499561524c62faa9c984a888a823f (patch)
treec8e471ab2472fcba0f624b3d4039825bfbbd09d0
parent2941cad5908176a4777f5a32b8c9effedfe69cd0 (diff)
ACPI: Store SRAT table revision
BugLink: http://bugs.launchpad.net/bugs/922799 commit 8df0eb7c9d96f9e82f233ee8b74e0f0c8471f868 upstream. 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. In order to know whether or not, we must know what version the SRAT table has. This patch stores the SRAT table revision for later consumption by arch specific __init functions. Signed-off-by: Kurt Garloff <kurt@garloff.de> Signed-off-by: Len Brown <len.brown@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/acpi/numa.c6
-rw-r--r--include/acpi/acpi_numa.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c
index 3b5c3189fd9..e56f3be7b07 100644
--- a/drivers/acpi/numa.c
+++ b/drivers/acpi/numa.c
@@ -45,6 +45,8 @@ static int pxm_to_node_map[MAX_PXM_DOMAINS]
45static int node_to_pxm_map[MAX_NUMNODES] 45static int node_to_pxm_map[MAX_NUMNODES]
46 = { [0 ... MAX_NUMNODES - 1] = PXM_INVAL }; 46 = { [0 ... MAX_NUMNODES - 1] = PXM_INVAL };
47 47
48unsigned char acpi_srat_revision __initdata;
49
48int pxm_to_node(int pxm) 50int pxm_to_node(int pxm)
49{ 51{
50 if (pxm < 0) 52 if (pxm < 0)
@@ -255,9 +257,13 @@ acpi_parse_memory_affinity(struct acpi_subtable_header * header,
255 257
256static int __init acpi_parse_srat(struct acpi_table_header *table) 258static int __init acpi_parse_srat(struct acpi_table_header *table)
257{ 259{
260 struct acpi_table_srat *srat;
258 if (!table) 261 if (!table)
259 return -EINVAL; 262 return -EINVAL;
260 263
264 srat = (struct acpi_table_srat *)table;
265 acpi_srat_revision = srat->header.revision;
266
261 /* Real work done in acpi_table_parse_srat below. */ 267 /* Real work done in acpi_table_parse_srat below. */
262 268
263 return 0; 269 return 0;
diff --git a/include/acpi/acpi_numa.h b/include/acpi/acpi_numa.h
index 17397267217..451823cb883 100644
--- a/include/acpi/acpi_numa.h
+++ b/include/acpi/acpi_numa.h
@@ -15,6 +15,7 @@ extern int pxm_to_node(int);
15extern int node_to_pxm(int); 15extern int node_to_pxm(int);
16extern void __acpi_map_pxm_to_node(int, int); 16extern void __acpi_map_pxm_to_node(int, int);
17extern int acpi_map_pxm_to_node(int); 17extern int acpi_map_pxm_to_node(int);
18extern unsigned char acpi_srat_revision;
18 19
19#endif /* CONFIG_ACPI_NUMA */ 20#endif /* CONFIG_ACPI_NUMA */
20#endif /* __ACP_NUMA_H */ 21#endif /* __ACP_NUMA_H */