From: Kurt Garloff Subject: Store SRAT table revision References: bnc#503038 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. This is patch 1/3. Signed-off-by: Kurt Garloff --- drivers/acpi/numa.c | 3 +++ include/acpi/acpi_numa.h | 1 + 2 files changed, 4 insertions(+) Index: linux-2.6.git/drivers/acpi/numa.c =================================================================== --- linux-2.6.git.orig/drivers/acpi/numa.c +++ linux-2.6.git/drivers/acpi/numa.c @@ -44,8 +44,10 @@ static int pxm_to_node_map[MAX_PXM_DOMAI = { [0 ... MAX_PXM_DOMAINS - 1] = NUMA_NO_NODE }; static int node_to_pxm_map[MAX_NUMNODES] = { [0 ... MAX_NUMNODES - 1] = PXM_INVAL }; +unsigned char acpi_srat_revision __initdata; + int pxm_to_node(int pxm) { if (pxm < 0) return NUMA_NO_NODE; @@ -254,11 +256,15 @@ acpi_parse_memory_affinity(struct acpi_s } static int __init acpi_parse_srat(struct acpi_table_header *table) { + struct acpi_table_srat *srat; if (!table) return -EINVAL; + srat = (struct acpi_table_srat *)table; + acpi_srat_revision = srat->header.revision; + /* Real work done in acpi_table_parse_srat below. */ return 0; } Index: linux-2.6.git/include/acpi/acpi_numa.h =================================================================== --- linux-2.6.git.orig/include/acpi/acpi_numa.h +++ linux-2.6.git/include/acpi/acpi_numa.h @@ -14,7 +14,8 @@ extern int pxm_to_node(int); extern int node_to_pxm(int); extern void __acpi_map_pxm_to_node(int, int); extern int acpi_map_pxm_to_node(int); +extern unsigned char acpi_srat_revision; #endif /* CONFIG_ACPI_NUMA */ #endif /* __ACP_NUMA_H */