diff options
| author | Wei Yang <[email protected]> | 2024-06-19 01:06:10 +0000 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2024-07-04 02:30:19 +0000 |
| commit | 64e0ba3948ddb99246e8f3c2c34a67be324220db (patch) | |
| tree | 9e22ca1a4a411c3f9c2e0e035513b403cb9bd22c /mm/mm_init.c | |
| parent | mm/sparse: nr_pages won't be 0 (diff) | |
| download | kernel-64e0ba3948ddb99246e8f3c2c34a67be324220db.tar.gz kernel-64e0ba3948ddb99246e8f3c2c34a67be324220db.zip | |
mm/mm_init.c: move build check on MAX_ZONELISTS out of ifdef
Current check on MAX_ZONELISTS is wrapped in CONFIG_DEBUG_MEMORY_INIT,
which may not be triggered all the time.
Let's move it out to a more general place.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Wei Yang <[email protected]>
Reviewed-by: Mike Rapoport (IBM) <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'mm/mm_init.c')
| -rw-r--r-- | mm/mm_init.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/mm_init.c b/mm/mm_init.c index c4bd97d3697f..1095dcf25ced 100644 --- a/mm/mm_init.c +++ b/mm/mm_init.c @@ -54,7 +54,6 @@ void __init mminit_verify_zonelist(void) struct zonelist *zonelist; int i, listid, zoneid; - BUILD_BUG_ON(MAX_ZONELISTS > 2); for (i = 0; i < MAX_ZONELISTS * MAX_NR_ZONES; i++) { /* Identify the zone and nodelist */ @@ -2657,6 +2656,7 @@ static void __init mem_init_print_info(void) void __init mm_core_init(void) { /* Initializations relying on SMP setup */ + BUILD_BUG_ON(MAX_ZONELISTS > 2); build_all_zonelists(NULL); page_alloc_init_cpuhp(); |
