25 #include <linux/module.h>
27 #include <linux/kernel.h>
28 #include <linux/types.h>
29 #include <linux/errno.h>
34 #define PREFIX "ACPI: "
36 #define ACPI_NUMA 0x80000000
37 #define _COMPONENT ACPI_NUMA
43 static int pxm_to_node_map[MAX_PXM_DOMAINS]
54 return pxm_to_node_map[pxm];
61 return node_to_pxm_map[
node];
66 if (pxm_to_node_map[pxm] ==
NUMA_NO_NODE || node < pxm_to_node_map[pxm])
67 pxm_to_node_map[pxm] =
node;
68 if (node_to_pxm_map[node] == PXM_INVAL || pxm < node_to_pxm_map[node])
69 node_to_pxm_map[
node] = pxm;
74 int node = pxm_to_node_map[pxm];
96 switch (header->
type) {
99 #ifdef ACPI_DEBUG_OUTPUT
104 "SRAT Processor (id[0x%02x] eid[0x%02x]) in proximity domain %d %s\n",
108 "enabled" :
"disabled"));
114 #ifdef ACPI_DEBUG_OUTPUT
119 "SRAT Memory (0x%lx length 0x%lx) in proximity domain %d %s%s\n",
124 "enabled" :
"disabled",
126 " hot-pluggable" :
""));
132 #ifdef ACPI_DEBUG_OUTPUT
137 "SRAT Processor (x2apicid[0x%08x]) in"
138 " proximity domain %d %s\n",
142 "enabled" :
"disabled"));
148 "Found unsupported SRAT entry (type = 0x%x)\n",
164 for (i = 0; i <
d; i++) {
165 for (j = 0; j <
d; j++) {
186 if (!slit_valid(slit)) {
199 "Found unsupported x2apic [0x%08x] SRAT entry\n", pa->apic_id);
206 const unsigned long end)
211 if (!processor_affinity)
214 acpi_table_print_srat_entry(header);
224 const unsigned long end)
229 if (!processor_affinity)
232 acpi_table_print_srat_entry(header);
244 const unsigned long end)
249 if (!memory_affinity)
252 acpi_table_print_srat_entry(header);
256 parsed_numa_memblks++;
267 acpi_srat_revision = srat->
header.revision;
276 acpi_table_entry_handler handler,
unsigned int max_entries)
280 handler, max_entries);
296 acpi_parse_x2apic_affinity, 0);
298 acpi_parse_processor_affinity, 0);
300 acpi_parse_memory_affinity,
311 else if (!parsed_numa_memblks)
318 unsigned long long pxm;
338 if (pxm >= 0 && pxm < MAX_PXM_DOMAINS)