aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86_64/kernel/pci-dma.c4
-rw-r--r--arch/x86_64/kernel/setup.c2
-rw-r--r--arch/x86_64/mm/srat.c4
3 files changed, 8 insertions, 2 deletions
diff --git a/arch/x86_64/kernel/pci-dma.c b/arch/x86_64/kernel/pci-dma.c
index af035ede70cd..a9275c9557cf 100644
--- a/arch/x86_64/kernel/pci-dma.c
+++ b/arch/x86_64/kernel/pci-dma.c
@@ -54,6 +54,10 @@ dma_alloc_pages(struct device *dev, gfp_t gfp, unsigned order)
54 else 54 else
55#endif 55#endif
56 node = numa_node_id(); 56 node = numa_node_id();
57
58 if (node < first_node(node_online_map))
59 node = first_node(node_online_map);
60
57 page = alloc_pages_node(node, gfp, order); 61 page = alloc_pages_node(node, gfp, order);
58 return page ? page_address(page) : NULL; 62 return page ? page_address(page) : NULL;
59} 63}
diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c
index f0870bef24d1..655b9192eeb3 100644
--- a/arch/x86_64/kernel/setup.c
+++ b/arch/x86_64/kernel/setup.c
@@ -1051,7 +1051,7 @@ static void srat_detect_node(void)
1051 for now. */ 1051 for now. */
1052 node = apicid_to_node[hard_smp_processor_id()]; 1052 node = apicid_to_node[hard_smp_processor_id()];
1053 if (node == NUMA_NO_NODE) 1053 if (node == NUMA_NO_NODE)
1054 node = 0; 1054 node = first_node(node_online_map);
1055 numa_set_node(cpu, node); 1055 numa_set_node(cpu, node);
1056 1056
1057 if (acpi_numa > 0) 1057 if (acpi_numa > 0)
diff --git a/arch/x86_64/mm/srat.c b/arch/x86_64/mm/srat.c
index e1513532df29..474df22c6ed2 100644
--- a/arch/x86_64/mm/srat.c
+++ b/arch/x86_64/mm/srat.c
@@ -399,8 +399,10 @@ int __init acpi_scan_nodes(unsigned long start, unsigned long end)
399 /* First clean up the node list */ 399 /* First clean up the node list */
400 for (i = 0; i < MAX_NUMNODES; i++) { 400 for (i = 0; i < MAX_NUMNODES; i++) {
401 cutoff_node(i, start, end); 401 cutoff_node(i, start, end);
402 if ((nodes[i].end - nodes[i].start) < NODE_MIN_SIZE) 402 if ((nodes[i].end - nodes[i].start) < NODE_MIN_SIZE) {
403 unparse_node(i); 403 unparse_node(i);
404 node_set_offline(i);
405 }
404 } 406 }
405 407
406 if (acpi_numa <= 0) 408 if (acpi_numa <= 0)