aboutsummaryrefslogtreecommitdiffstats
path: root/init/main.c
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2009-09-19 00:11:26 -0400
committerLen Brown <len.brown@intel.com>2009-09-19 00:11:26 -0400
commitc602c65b2f81d14456771d1e3f15d1381f4b7efa (patch)
treef1f833c8dd6c1519eeb101be32f7fe54a9605af5 /init/main.c
parent3834f47291df475be3f0f0fb7ccaa098967cc054 (diff)
parent78f28b7c555359c67c2a0d23f7436e915329421e (diff)
Merge branch 'linus' into sfi-release
Conflicts: arch/x86/kernel/setup.c drivers/acpi/power.c init/main.c Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'init/main.c')
-rw-r--r--init/main.c30
1 files changed, 4 insertions, 26 deletions
diff --git a/init/main.c b/init/main.c
index 9f110fbf0c45..a2086913a17b 100644
--- a/init/main.c
+++ b/init/main.c
@@ -69,6 +69,7 @@
69#include <linux/kmemcheck.h> 69#include <linux/kmemcheck.h>
70#include <linux/kmemtrace.h> 70#include <linux/kmemtrace.h>
71#include <linux/sfi.h> 71#include <linux/sfi.h>
72#include <linux/shmem_fs.h>
72#include <trace/boot.h> 73#include <trace/boot.h>
73 74
74#include <asm/io.h> 75#include <asm/io.h>
@@ -354,7 +355,6 @@ static void __init smp_init(void)
354#define smp_init() do { } while (0) 355#define smp_init() do { } while (0)
355#endif 356#endif
356 357
357static inline void setup_per_cpu_areas(void) { }
358static inline void setup_nr_cpu_ids(void) { } 358static inline void setup_nr_cpu_ids(void) { }
359static inline void smp_prepare_cpus(unsigned int maxcpus) { } 359static inline void smp_prepare_cpus(unsigned int maxcpus) { }
360 360
@@ -375,29 +375,6 @@ static void __init setup_nr_cpu_ids(void)
375 nr_cpu_ids = find_last_bit(cpumask_bits(cpu_possible_mask),NR_CPUS) + 1; 375 nr_cpu_ids = find_last_bit(cpumask_bits(cpu_possible_mask),NR_CPUS) + 1;
376} 376}
377 377
378#ifndef CONFIG_HAVE_SETUP_PER_CPU_AREA
379unsigned long __per_cpu_offset[NR_CPUS] __read_mostly;
380
381EXPORT_SYMBOL(__per_cpu_offset);
382
383static void __init setup_per_cpu_areas(void)
384{
385 unsigned long size, i;
386 char *ptr;
387 unsigned long nr_possible_cpus = num_possible_cpus();
388
389 /* Copy section for each CPU (we discard the original) */
390 size = ALIGN(PERCPU_ENOUGH_ROOM, PAGE_SIZE);
391 ptr = alloc_bootmem_pages(size * nr_possible_cpus);
392
393 for_each_possible_cpu(i) {
394 __per_cpu_offset[i] = ptr - __per_cpu_start;
395 memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start);
396 ptr += size;
397 }
398}
399#endif /* CONFIG_HAVE_SETUP_PER_CPU_AREA */
400
401/* Called by boot processor to activate the rest. */ 378/* Called by boot processor to activate the rest. */
402static void __init smp_init(void) 379static void __init smp_init(void)
403{ 380{
@@ -452,6 +429,7 @@ static noinline void __init_refok rest_init(void)
452{ 429{
453 int pid; 430 int pid;
454 431
432 rcu_scheduler_starting();
455 kernel_thread(kernel_init, NULL, CLONE_FS | CLONE_SIGHAND); 433 kernel_thread(kernel_init, NULL, CLONE_FS | CLONE_SIGHAND);
456 numa_default_policy(); 434 numa_default_policy();
457 pid = kernel_thread(kthreadd, NULL, CLONE_FS | CLONE_FILES); 435 pid = kernel_thread(kthreadd, NULL, CLONE_FS | CLONE_FILES);
@@ -463,7 +441,6 @@ static noinline void __init_refok rest_init(void)
463 * at least once to get things moving: 441 * at least once to get things moving:
464 */ 442 */
465 init_idle_bootup_task(current); 443 init_idle_bootup_task(current);
466 rcu_scheduler_starting();
467 preempt_enable_no_resched(); 444 preempt_enable_no_resched();
468 schedule(); 445 schedule();
469 preempt_disable(); 446 preempt_disable();
@@ -632,7 +609,6 @@ asmlinkage void __init start_kernel(void)
632 softirq_init(); 609 softirq_init();
633 timekeeping_init(); 610 timekeeping_init();
634 time_init(); 611 time_init();
635 sched_clock_init();
636 profile_init(); 612 profile_init();
637 if (!irqs_disabled()) 613 if (!irqs_disabled())
638 printk(KERN_CRIT "start_kernel(): bug: interrupts were " 614 printk(KERN_CRIT "start_kernel(): bug: interrupts were "
@@ -683,6 +659,7 @@ asmlinkage void __init start_kernel(void)
683 numa_policy_init(); 659 numa_policy_init();
684 if (late_time_init) 660 if (late_time_init)
685 late_time_init(); 661 late_time_init();
662 sched_clock_init();
686 calibrate_delay(); 663 calibrate_delay();
687 pidmap_init(); 664 pidmap_init();
688 anon_vma_init(); 665 anon_vma_init();
@@ -811,6 +788,7 @@ static void __init do_basic_setup(void)
811 init_workqueues(); 788 init_workqueues();
812 cpuset_init_smp(); 789 cpuset_init_smp();
813 usermodehelper_init(); 790 usermodehelper_init();
791 init_tmpfs();
814 driver_init(); 792 driver_init();
815 init_irq_proc(); 793 init_irq_proc();
816 do_ctors(); 794 do_ctors();