diff options
Diffstat (limited to 'arch/x86/mm/numa.c')
-rw-r--r-- | arch/x86/mm/numa.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c index f5510d889a22..fbeaaf416610 100644 --- a/arch/x86/mm/numa.c +++ b/arch/x86/mm/numa.c | |||
@@ -496,6 +496,7 @@ static bool __init numa_meminfo_cover_memory(const struct numa_meminfo *mi) | |||
496 | 496 | ||
497 | static int __init numa_register_memblks(struct numa_meminfo *mi) | 497 | static int __init numa_register_memblks(struct numa_meminfo *mi) |
498 | { | 498 | { |
499 | unsigned long uninitialized_var(pfn_align); | ||
499 | int i, nid; | 500 | int i, nid; |
500 | 501 | ||
501 | /* Account for nodes with cpus and no memory */ | 502 | /* Account for nodes with cpus and no memory */ |
@@ -511,6 +512,20 @@ static int __init numa_register_memblks(struct numa_meminfo *mi) | |||
511 | 512 | ||
512 | /* for out of order entries */ | 513 | /* for out of order entries */ |
513 | sort_node_map(); | 514 | sort_node_map(); |
515 | |||
516 | /* | ||
517 | * If sections array is gonna be used for pfn -> nid mapping, check | ||
518 | * whether its granularity is fine enough. | ||
519 | */ | ||
520 | #ifdef NODE_NOT_IN_PAGE_FLAGS | ||
521 | pfn_align = node_map_pfn_alignment(); | ||
522 | if (pfn_align && pfn_align < PAGES_PER_SECTION) { | ||
523 | printk(KERN_WARNING "Node alignment %LuMB < min %LuMB, rejecting NUMA config\n", | ||
524 | PFN_PHYS(pfn_align) >> 20, | ||
525 | PFN_PHYS(PAGES_PER_SECTION) >> 20); | ||
526 | return -EINVAL; | ||
527 | } | ||
528 | #endif | ||
514 | if (!numa_meminfo_cover_memory(mi)) | 529 | if (!numa_meminfo_cover_memory(mi)) |
515 | return -EINVAL; | 530 | return -EINVAL; |
516 | 531 | ||