File tree Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -543,7 +543,6 @@ static void __init numa_clear_kernel_node_hotplug(void)
543
543
544
544
static int __init numa_register_memblks (struct numa_meminfo * mi )
545
545
{
546
- unsigned long uninitialized_var (pfn_align );
547
546
int i , nid ;
548
547
549
548
/* Account for nodes with cpus and no memory */
@@ -571,15 +570,16 @@ static int __init numa_register_memblks(struct numa_meminfo *mi)
571
570
* If sections array is gonna be used for pfn -> nid mapping, check
572
571
* whether its granularity is fine enough.
573
572
*/
574
- #ifdef NODE_NOT_IN_PAGE_FLAGS
575
- pfn_align = node_map_pfn_alignment ();
576
- if (pfn_align && pfn_align < PAGES_PER_SECTION ) {
577
- printk (KERN_WARNING "Node alignment %LuMB < min %LuMB, rejecting NUMA config\n" ,
578
- PFN_PHYS (pfn_align ) >> 20 ,
579
- PFN_PHYS (PAGES_PER_SECTION ) >> 20 );
580
- return - EINVAL ;
573
+ if (IS_ENABLED (NODE_NOT_IN_PAGE_FLAGS )) {
574
+ unsigned long pfn_align = node_map_pfn_alignment ();
575
+
576
+ if (pfn_align && pfn_align < PAGES_PER_SECTION ) {
577
+ pr_warn ("Node alignment %LuMB < min %LuMB, rejecting NUMA config\n" ,
578
+ PFN_PHYS (pfn_align ) >> 20 ,
579
+ PFN_PHYS (PAGES_PER_SECTION ) >> 20 );
580
+ return - EINVAL ;
581
+ }
581
582
}
582
- #endif
583
583
if (!numa_meminfo_cover_memory (mi ))
584
584
return - EINVAL ;
585
585
Original file line number Diff line number Diff line change 98
98
/*
99
99
* We are going to use the flags for the page to node mapping if its in
100
100
* there. This includes the case where there is no node, so it is implicit.
101
+ * Note that this #define MUST have a value so that it can be tested with
102
+ * the IS_ENABLED() macro.
101
103
*/
102
104
#if !(NODES_WIDTH > 0 || NODES_SHIFT == 0 )
103
- #define NODE_NOT_IN_PAGE_FLAGS
105
+ #define NODE_NOT_IN_PAGE_FLAGS 1
104
106
#endif
105
107
106
108
#if defined(CONFIG_NUMA_BALANCING ) && LAST_CPUPID_WIDTH == 0
You can’t perform that action at this time.
0 commit comments