aboutsummaryrefslogtreecommitdiffstats
path: root/init/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'init/main.c')
-rw-r--r--init/main.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/init/main.c b/init/main.c
index a92989e7836a..80f09f31bfab 100644
--- a/init/main.c
+++ b/init/main.c
@@ -369,12 +369,8 @@ static void __init setup_per_cpu_areas(void)
369 unsigned long nr_possible_cpus = num_possible_cpus(); 369 unsigned long nr_possible_cpus = num_possible_cpus();
370 370
371 /* Copy section for each CPU (we discard the original) */ 371 /* Copy section for each CPU (we discard the original) */
372 size = ALIGN(__per_cpu_end - __per_cpu_start, SMP_CACHE_BYTES); 372 size = ALIGN(PERCPU_ENOUGH_ROOM, PAGE_SIZE);
373#ifdef CONFIG_MODULES 373 ptr = alloc_bootmem_pages(size * nr_possible_cpus);
374 if (size < PERCPU_ENOUGH_ROOM)
375 size = PERCPU_ENOUGH_ROOM;
376#endif
377 ptr = alloc_bootmem(size * nr_possible_cpus);
378 374
379 for_each_possible_cpu(i) { 375 for_each_possible_cpu(i) {
380 __per_cpu_offset[i] = ptr - __per_cpu_start; 376 __per_cpu_offset[i] = ptr - __per_cpu_start;