aboutsummaryrefslogtreecommitdiffstats
path: root/init/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'init/main.c')
-rw-r--r--init/main.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/init/main.c b/init/main.c
index 09131ec090c1..602d724afa5c 100644
--- a/init/main.c
+++ b/init/main.c
@@ -357,7 +357,6 @@ static void __init smp_init(void)
357#define smp_init() do { } while (0) 357#define smp_init() do { } while (0)
358#endif 358#endif
359 359
360static inline void setup_per_cpu_areas(void) { }
361static inline void setup_nr_cpu_ids(void) { } 360static inline void setup_nr_cpu_ids(void) { }
362static inline void smp_prepare_cpus(unsigned int maxcpus) { } 361static inline void smp_prepare_cpus(unsigned int maxcpus) { }
363 362
@@ -378,29 +377,6 @@ static void __init setup_nr_cpu_ids(void)
378 nr_cpu_ids = find_last_bit(cpumask_bits(cpu_possible_mask),NR_CPUS) + 1; 377 nr_cpu_ids = find_last_bit(cpumask_bits(cpu_possible_mask),NR_CPUS) + 1;
379} 378}
380 379
381#ifndef CONFIG_HAVE_SETUP_PER_CPU_AREA
382unsigned long __per_cpu_offset[NR_CPUS] __read_mostly;
383
384EXPORT_SYMBOL(__per_cpu_offset);
385
386static void __init setup_per_cpu_areas(void)
387{
388 unsigned long size, i;
389 char *ptr;
390 unsigned long nr_possible_cpus = num_possible_cpus();
391
392 /* Copy section for each CPU (we discard the original) */
393 size = ALIGN(PERCPU_ENOUGH_ROOM, PAGE_SIZE);
394 ptr = alloc_bootmem_pages(size * nr_possible_cpus);
395
396 for_each_possible_cpu(i) {
397 __per_cpu_offset[i] = ptr - __per_cpu_start;
398 memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start);
399 ptr += size;
400 }
401}
402#endif /* CONFIG_HAVE_SETUP_PER_CPU_AREA */
403
404/* Called by boot processor to activate the rest. */ 380/* Called by boot processor to activate the rest. */
405static void __init smp_init(void) 381static void __init smp_init(void)
406{ 382{