diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-10-06 11:01:27 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-10-06 11:01:27 -0400 |
commit | 907bc6c7fc7071b00083fc11e510e47dd93df45d (patch) | |
tree | 0697a608561522c00da9e1814974a2eb051bb96d /init | |
parent | d2b247a8be57647d1745535acd58169fbcbe431a (diff) | |
parent | 2a0f5cb32772e9a9560209e241a80bfbbc31dbc3 (diff) |
Merge branch 'for-2.6.32' into for-2.6.33
Diffstat (limited to 'init')
-rw-r--r-- | init/Kconfig | 112 | ||||
-rw-r--r-- | init/do_mounts.c | 2 | ||||
-rw-r--r-- | init/main.c | 51 |
3 files changed, 68 insertions, 97 deletions
diff --git a/init/Kconfig b/init/Kconfig index 1ce05a4cb5f..c7bac39d6c6 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
@@ -316,38 +316,29 @@ choice | |||
316 | prompt "RCU Implementation" | 316 | prompt "RCU Implementation" |
317 | default TREE_RCU | 317 | default TREE_RCU |
318 | 318 | ||
319 | config CLASSIC_RCU | ||
320 | bool "Classic RCU" | ||
321 | help | ||
322 | This option selects the classic RCU implementation that is | ||
323 | designed for best read-side performance on non-realtime | ||
324 | systems. | ||
325 | |||
326 | Select this option if you are unsure. | ||
327 | |||
328 | config TREE_RCU | 319 | config TREE_RCU |
329 | bool "Tree-based hierarchical RCU" | 320 | bool "Tree-based hierarchical RCU" |
330 | help | 321 | help |
331 | This option selects the RCU implementation that is | 322 | This option selects the RCU implementation that is |
332 | designed for very large SMP system with hundreds or | 323 | designed for very large SMP system with hundreds or |
333 | thousands of CPUs. | 324 | thousands of CPUs. It also scales down nicely to |
325 | smaller systems. | ||
334 | 326 | ||
335 | config PREEMPT_RCU | 327 | config TREE_PREEMPT_RCU |
336 | bool "Preemptible RCU" | 328 | bool "Preemptable tree-based hierarchical RCU" |
337 | depends on PREEMPT | 329 | depends on PREEMPT |
338 | help | 330 | help |
339 | This option reduces the latency of the kernel by making certain | 331 | This option selects the RCU implementation that is |
340 | RCU sections preemptible. Normally RCU code is non-preemptible, if | 332 | designed for very large SMP systems with hundreds or |
341 | this option is selected then read-only RCU sections become | 333 | thousands of CPUs, but for which real-time response |
342 | preemptible. This helps latency, but may expose bugs due to | 334 | is also required. It also scales down nicely to |
343 | now-naive assumptions about each RCU read-side critical section | 335 | smaller systems. |
344 | remaining on a given CPU through its execution. | ||
345 | 336 | ||
346 | endchoice | 337 | endchoice |
347 | 338 | ||
348 | config RCU_TRACE | 339 | config RCU_TRACE |
349 | bool "Enable tracing for RCU" | 340 | bool "Enable tracing for RCU" |
350 | depends on TREE_RCU || PREEMPT_RCU | 341 | depends on TREE_RCU || TREE_PREEMPT_RCU |
351 | help | 342 | help |
352 | This option provides tracing in RCU which presents stats | 343 | This option provides tracing in RCU which presents stats |
353 | in debugfs for debugging RCU implementation. | 344 | in debugfs for debugging RCU implementation. |
@@ -359,7 +350,7 @@ config RCU_FANOUT | |||
359 | int "Tree-based hierarchical RCU fanout value" | 350 | int "Tree-based hierarchical RCU fanout value" |
360 | range 2 64 if 64BIT | 351 | range 2 64 if 64BIT |
361 | range 2 32 if !64BIT | 352 | range 2 32 if !64BIT |
362 | depends on TREE_RCU | 353 | depends on TREE_RCU || TREE_PREEMPT_RCU |
363 | default 64 if 64BIT | 354 | default 64 if 64BIT |
364 | default 32 if !64BIT | 355 | default 32 if !64BIT |
365 | help | 356 | help |
@@ -374,7 +365,7 @@ config RCU_FANOUT | |||
374 | 365 | ||
375 | config RCU_FANOUT_EXACT | 366 | config RCU_FANOUT_EXACT |
376 | bool "Disable tree-based hierarchical RCU auto-balancing" | 367 | bool "Disable tree-based hierarchical RCU auto-balancing" |
377 | depends on TREE_RCU | 368 | depends on TREE_RCU || TREE_PREEMPT_RCU |
378 | default n | 369 | default n |
379 | help | 370 | help |
380 | This option forces use of the exact RCU_FANOUT value specified, | 371 | This option forces use of the exact RCU_FANOUT value specified, |
@@ -387,18 +378,12 @@ config RCU_FANOUT_EXACT | |||
387 | Say N if unsure. | 378 | Say N if unsure. |
388 | 379 | ||
389 | config TREE_RCU_TRACE | 380 | config TREE_RCU_TRACE |
390 | def_bool RCU_TRACE && TREE_RCU | 381 | def_bool RCU_TRACE && ( TREE_RCU || TREE_PREEMPT_RCU ) |
391 | select DEBUG_FS | 382 | select DEBUG_FS |
392 | help | 383 | help |
393 | This option provides tracing for the TREE_RCU implementation, | 384 | This option provides tracing for the TREE_RCU and |
394 | permitting Makefile to trivially select kernel/rcutree_trace.c. | 385 | TREE_PREEMPT_RCU implementations, permitting Makefile to |
395 | 386 | trivially select kernel/rcutree_trace.c. | |
396 | config PREEMPT_RCU_TRACE | ||
397 | def_bool RCU_TRACE && PREEMPT_RCU | ||
398 | select DEBUG_FS | ||
399 | help | ||
400 | This option provides tracing for the PREEMPT_RCU implementation, | ||
401 | permitting Makefile to trivially select kernel/rcupreempt_trace.c. | ||
402 | 387 | ||
403 | endmenu # "RCU Subsystem" | 388 | endmenu # "RCU Subsystem" |
404 | 389 | ||
@@ -931,39 +916,65 @@ config AIO | |||
931 | by some high performance threaded applications. Disabling | 916 | by some high performance threaded applications. Disabling |
932 | this option saves about 7k. | 917 | this option saves about 7k. |
933 | 918 | ||
934 | config HAVE_PERF_COUNTERS | 919 | config HAVE_PERF_EVENTS |
935 | bool | 920 | bool |
936 | help | 921 | help |
937 | See tools/perf/design.txt for details. | 922 | See tools/perf/design.txt for details. |
938 | 923 | ||
939 | menu "Performance Counters" | 924 | menu "Kernel Performance Events And Counters" |
940 | 925 | ||
941 | config PERF_COUNTERS | 926 | config PERF_EVENTS |
942 | bool "Kernel Performance Counters" | 927 | bool "Kernel performance events and counters" |
943 | depends on HAVE_PERF_COUNTERS | 928 | default y if (PROFILING || PERF_COUNTERS) |
929 | depends on HAVE_PERF_EVENTS | ||
944 | select ANON_INODES | 930 | select ANON_INODES |
945 | help | 931 | help |
946 | Enable kernel support for performance counter hardware. | 932 | Enable kernel support for various performance events provided |
933 | by software and hardware. | ||
934 | |||
935 | Software events are supported either build-in or via the | ||
936 | use of generic tracepoints. | ||
947 | 937 | ||
948 | Performance counters are special hardware registers available | 938 | Most modern CPUs support performance events via performance |
949 | on most modern CPUs. These registers count the number of certain | 939 | counter registers. These registers count the number of certain |
950 | types of hw events: such as instructions executed, cachemisses | 940 | types of hw events: such as instructions executed, cachemisses |
951 | suffered, or branches mis-predicted - without slowing down the | 941 | suffered, or branches mis-predicted - without slowing down the |
952 | kernel or applications. These registers can also trigger interrupts | 942 | kernel or applications. These registers can also trigger interrupts |
953 | when a threshold number of events have passed - and can thus be | 943 | when a threshold number of events have passed - and can thus be |
954 | used to profile the code that runs on that CPU. | 944 | used to profile the code that runs on that CPU. |
955 | 945 | ||
956 | The Linux Performance Counter subsystem provides an abstraction of | 946 | The Linux Performance Event subsystem provides an abstraction of |
957 | these hardware capabilities, available via a system call. It | 947 | these software and hardware cevent apabilities, available via a |
948 | system call and used by the "perf" utility in tools/perf/. It | ||
958 | provides per task and per CPU counters, and it provides event | 949 | provides per task and per CPU counters, and it provides event |
959 | capabilities on top of those. | 950 | capabilities on top of those. |
960 | 951 | ||
961 | Say Y if unsure. | 952 | Say Y if unsure. |
962 | 953 | ||
963 | config EVENT_PROFILE | 954 | config EVENT_PROFILE |
964 | bool "Tracepoint profile sources" | 955 | bool "Tracepoint profiling sources" |
965 | depends on PERF_COUNTERS && EVENT_TRACER | 956 | depends on PERF_EVENTS && EVENT_TRACING |
966 | default y | 957 | default y |
958 | help | ||
959 | Allow the use of tracepoints as software performance events. | ||
960 | |||
961 | When this is enabled, you can create perf events based on | ||
962 | tracepoints using PERF_TYPE_TRACEPOINT and the tracepoint ID | ||
963 | found in debugfs://tracing/events/*/*/id. (The -e/--events | ||
964 | option to the perf tool can parse and interpret symbolic | ||
965 | tracepoints, in the subsystem:tracepoint_name format.) | ||
966 | |||
967 | config PERF_COUNTERS | ||
968 | bool "Kernel performance counters (old config option)" | ||
969 | depends on HAVE_PERF_EVENTS | ||
970 | help | ||
971 | This config has been obsoleted by the PERF_EVENTS | ||
972 | config option - please see that one for details. | ||
973 | |||
974 | It has no effect on the kernel whether you enable | ||
975 | it or not, it is a compatibility placeholder. | ||
976 | |||
977 | Say N if unsure. | ||
967 | 978 | ||
968 | endmenu | 979 | endmenu |
969 | 980 | ||
@@ -995,14 +1006,6 @@ config SLUB_DEBUG | |||
995 | SLUB sysfs support. /sys/slab will not exist and there will be | 1006 | SLUB sysfs support. /sys/slab will not exist and there will be |
996 | no support for cache validation etc. | 1007 | no support for cache validation etc. |
997 | 1008 | ||
998 | config STRIP_ASM_SYMS | ||
999 | bool "Strip assembler-generated symbols during link" | ||
1000 | default n | ||
1001 | help | ||
1002 | Strip internal assembler-generated symbols during a link (symbols | ||
1003 | that look like '.Lxxx') so they don't pollute the output of | ||
1004 | get_wchan() and suchlike. | ||
1005 | |||
1006 | config COMPAT_BRK | 1009 | config COMPAT_BRK |
1007 | bool "Disable heap randomization" | 1010 | bool "Disable heap randomization" |
1008 | default y | 1011 | default y |
@@ -1061,13 +1064,6 @@ config PROFILING | |||
1061 | config TRACEPOINTS | 1064 | config TRACEPOINTS |
1062 | bool | 1065 | bool |
1063 | 1066 | ||
1064 | config MARKERS | ||
1065 | bool "Activate markers" | ||
1066 | select TRACEPOINTS | ||
1067 | help | ||
1068 | Place an empty function call at each marker site. Can be | ||
1069 | dynamically changed for a probe function. | ||
1070 | |||
1071 | source "arch/Kconfig" | 1067 | source "arch/Kconfig" |
1072 | 1068 | ||
1073 | config SLOW_WORK | 1069 | config SLOW_WORK |
diff --git a/init/do_mounts.c b/init/do_mounts.c index 093f6591550..bb008d064c1 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c | |||
@@ -415,7 +415,7 @@ void __init prepare_namespace(void) | |||
415 | 415 | ||
416 | mount_root(); | 416 | mount_root(); |
417 | out: | 417 | out: |
418 | devtmpfs_mount("dev"); | ||
418 | sys_mount(".", "/", NULL, MS_MOVE, NULL); | 419 | sys_mount(".", "/", NULL, MS_MOVE, NULL); |
419 | sys_chroot("."); | 420 | sys_chroot("."); |
420 | } | 421 | } |
421 | |||
diff --git a/init/main.c b/init/main.c index 2c5ade79eb8..7449819a480 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/string.h> | 18 | #include <linux/string.h> |
19 | #include <linux/ctype.h> | 19 | #include <linux/ctype.h> |
20 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
21 | #include <linux/utsname.h> | ||
22 | #include <linux/ioport.h> | 21 | #include <linux/ioport.h> |
23 | #include <linux/init.h> | 22 | #include <linux/init.h> |
24 | #include <linux/smp_lock.h> | 23 | #include <linux/smp_lock.h> |
@@ -68,6 +67,8 @@ | |||
68 | #include <linux/async.h> | 67 | #include <linux/async.h> |
69 | #include <linux/kmemcheck.h> | 68 | #include <linux/kmemcheck.h> |
70 | #include <linux/kmemtrace.h> | 69 | #include <linux/kmemtrace.h> |
70 | #include <linux/sfi.h> | ||
71 | #include <linux/shmem_fs.h> | ||
71 | #include <trace/boot.h> | 72 | #include <trace/boot.h> |
72 | 73 | ||
73 | #include <asm/io.h> | 74 | #include <asm/io.h> |
@@ -353,17 +354,11 @@ static void __init smp_init(void) | |||
353 | #define smp_init() do { } while (0) | 354 | #define smp_init() do { } while (0) |
354 | #endif | 355 | #endif |
355 | 356 | ||
356 | static inline void setup_per_cpu_areas(void) { } | ||
357 | static inline void setup_nr_cpu_ids(void) { } | 357 | static inline void setup_nr_cpu_ids(void) { } |
358 | static inline void smp_prepare_cpus(unsigned int maxcpus) { } | 358 | static inline void smp_prepare_cpus(unsigned int maxcpus) { } |
359 | 359 | ||
360 | #else | 360 | #else |
361 | 361 | ||
362 | #if NR_CPUS > BITS_PER_LONG | ||
363 | cpumask_t cpu_mask_all __read_mostly = CPU_MASK_ALL; | ||
364 | EXPORT_SYMBOL(cpu_mask_all); | ||
365 | #endif | ||
366 | |||
367 | /* Setup number of possible processor ids */ | 362 | /* Setup number of possible processor ids */ |
368 | int nr_cpu_ids __read_mostly = NR_CPUS; | 363 | int nr_cpu_ids __read_mostly = NR_CPUS; |
369 | EXPORT_SYMBOL(nr_cpu_ids); | 364 | EXPORT_SYMBOL(nr_cpu_ids); |
@@ -374,29 +369,6 @@ static void __init setup_nr_cpu_ids(void) | |||
374 | nr_cpu_ids = find_last_bit(cpumask_bits(cpu_possible_mask),NR_CPUS) + 1; | 369 | nr_cpu_ids = find_last_bit(cpumask_bits(cpu_possible_mask),NR_CPUS) + 1; |
375 | } | 370 | } |
376 | 371 | ||
377 | #ifndef CONFIG_HAVE_SETUP_PER_CPU_AREA | ||
378 | unsigned long __per_cpu_offset[NR_CPUS] __read_mostly; | ||
379 | |||
380 | EXPORT_SYMBOL(__per_cpu_offset); | ||
381 | |||
382 | static void __init setup_per_cpu_areas(void) | ||
383 | { | ||
384 | unsigned long size, i; | ||
385 | char *ptr; | ||
386 | unsigned long nr_possible_cpus = num_possible_cpus(); | ||
387 | |||
388 | /* Copy section for each CPU (we discard the original) */ | ||
389 | size = ALIGN(PERCPU_ENOUGH_ROOM, PAGE_SIZE); | ||
390 | ptr = alloc_bootmem_pages(size * nr_possible_cpus); | ||
391 | |||
392 | for_each_possible_cpu(i) { | ||
393 | __per_cpu_offset[i] = ptr - __per_cpu_start; | ||
394 | memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start); | ||
395 | ptr += size; | ||
396 | } | ||
397 | } | ||
398 | #endif /* CONFIG_HAVE_SETUP_PER_CPU_AREA */ | ||
399 | |||
400 | /* Called by boot processor to activate the rest. */ | 372 | /* Called by boot processor to activate the rest. */ |
401 | static void __init smp_init(void) | 373 | static void __init smp_init(void) |
402 | { | 374 | { |
@@ -451,6 +423,7 @@ static noinline void __init_refok rest_init(void) | |||
451 | { | 423 | { |
452 | int pid; | 424 | int pid; |
453 | 425 | ||
426 | rcu_scheduler_starting(); | ||
454 | kernel_thread(kernel_init, NULL, CLONE_FS | CLONE_SIGHAND); | 427 | kernel_thread(kernel_init, NULL, CLONE_FS | CLONE_SIGHAND); |
455 | numa_default_policy(); | 428 | numa_default_policy(); |
456 | pid = kernel_thread(kthreadd, NULL, CLONE_FS | CLONE_FILES); | 429 | pid = kernel_thread(kthreadd, NULL, CLONE_FS | CLONE_FILES); |
@@ -462,7 +435,6 @@ static noinline void __init_refok rest_init(void) | |||
462 | * at least once to get things moving: | 435 | * at least once to get things moving: |
463 | */ | 436 | */ |
464 | init_idle_bootup_task(current); | 437 | init_idle_bootup_task(current); |
465 | rcu_scheduler_starting(); | ||
466 | preempt_enable_no_resched(); | 438 | preempt_enable_no_resched(); |
467 | schedule(); | 439 | schedule(); |
468 | preempt_disable(); | 440 | preempt_disable(); |
@@ -584,8 +556,8 @@ asmlinkage void __init start_kernel(void) | |||
584 | setup_arch(&command_line); | 556 | setup_arch(&command_line); |
585 | mm_init_owner(&init_mm, &init_task); | 557 | mm_init_owner(&init_mm, &init_task); |
586 | setup_command_line(command_line); | 558 | setup_command_line(command_line); |
587 | setup_per_cpu_areas(); | ||
588 | setup_nr_cpu_ids(); | 559 | setup_nr_cpu_ids(); |
560 | setup_per_cpu_areas(); | ||
589 | smp_prepare_boot_cpu(); /* arch-specific boot-cpu hooks */ | 561 | smp_prepare_boot_cpu(); /* arch-specific boot-cpu hooks */ |
590 | 562 | ||
591 | build_all_zonelists(); | 563 | build_all_zonelists(); |
@@ -631,7 +603,6 @@ asmlinkage void __init start_kernel(void) | |||
631 | softirq_init(); | 603 | softirq_init(); |
632 | timekeeping_init(); | 604 | timekeeping_init(); |
633 | time_init(); | 605 | time_init(); |
634 | sched_clock_init(); | ||
635 | profile_init(); | 606 | profile_init(); |
636 | if (!irqs_disabled()) | 607 | if (!irqs_disabled()) |
637 | printk(KERN_CRIT "start_kernel(): bug: interrupts were " | 608 | printk(KERN_CRIT "start_kernel(): bug: interrupts were " |
@@ -682,6 +653,7 @@ asmlinkage void __init start_kernel(void) | |||
682 | numa_policy_init(); | 653 | numa_policy_init(); |
683 | if (late_time_init) | 654 | if (late_time_init) |
684 | late_time_init(); | 655 | late_time_init(); |
656 | sched_clock_init(); | ||
685 | calibrate_delay(); | 657 | calibrate_delay(); |
686 | pidmap_init(); | 658 | pidmap_init(); |
687 | anon_vma_init(); | 659 | anon_vma_init(); |
@@ -691,12 +663,12 @@ asmlinkage void __init start_kernel(void) | |||
691 | #endif | 663 | #endif |
692 | thread_info_cache_init(); | 664 | thread_info_cache_init(); |
693 | cred_init(); | 665 | cred_init(); |
694 | fork_init(num_physpages); | 666 | fork_init(totalram_pages); |
695 | proc_caches_init(); | 667 | proc_caches_init(); |
696 | buffer_init(); | 668 | buffer_init(); |
697 | key_init(); | 669 | key_init(); |
698 | security_init(); | 670 | security_init(); |
699 | vfs_caches_init(num_physpages); | 671 | vfs_caches_init(totalram_pages); |
700 | radix_tree_init(); | 672 | radix_tree_init(); |
701 | signals_init(); | 673 | signals_init(); |
702 | /* rootfs populating might need page-writeback */ | 674 | /* rootfs populating might need page-writeback */ |
@@ -712,6 +684,7 @@ asmlinkage void __init start_kernel(void) | |||
712 | check_bugs(); | 684 | check_bugs(); |
713 | 685 | ||
714 | acpi_early_init(); /* before LAPIC and SMP init */ | 686 | acpi_early_init(); /* before LAPIC and SMP init */ |
687 | sfi_init_late(); | ||
715 | 688 | ||
716 | ftrace_init(); | 689 | ftrace_init(); |
717 | 690 | ||
@@ -733,13 +706,14 @@ static void __init do_ctors(void) | |||
733 | int initcall_debug; | 706 | int initcall_debug; |
734 | core_param(initcall_debug, initcall_debug, bool, 0644); | 707 | core_param(initcall_debug, initcall_debug, bool, 0644); |
735 | 708 | ||
709 | static char msgbuf[64]; | ||
710 | static struct boot_trace_call call; | ||
711 | static struct boot_trace_ret ret; | ||
712 | |||
736 | int do_one_initcall(initcall_t fn) | 713 | int do_one_initcall(initcall_t fn) |
737 | { | 714 | { |
738 | int count = preempt_count(); | 715 | int count = preempt_count(); |
739 | ktime_t calltime, delta, rettime; | 716 | ktime_t calltime, delta, rettime; |
740 | char msgbuf[64]; | ||
741 | struct boot_trace_call call; | ||
742 | struct boot_trace_ret ret; | ||
743 | 717 | ||
744 | if (initcall_debug) { | 718 | if (initcall_debug) { |
745 | call.caller = task_pid_nr(current); | 719 | call.caller = task_pid_nr(current); |
@@ -808,6 +782,7 @@ static void __init do_basic_setup(void) | |||
808 | init_workqueues(); | 782 | init_workqueues(); |
809 | cpuset_init_smp(); | 783 | cpuset_init_smp(); |
810 | usermodehelper_init(); | 784 | usermodehelper_init(); |
785 | init_tmpfs(); | ||
811 | driver_init(); | 786 | driver_init(); |
812 | init_irq_proc(); | 787 | init_irq_proc(); |
813 | do_ctors(); | 788 | do_ctors(); |