diff options
| -rw-r--r-- | Documentation/kernel-parameters.txt | 6 | ||||
| -rw-r--r-- | arch/blackfin/mach-common/smp.c | 6 | ||||
| -rw-r--r-- | arch/metag/kernel/smp.c | 5 | ||||
| -rw-r--r-- | arch/x86/include/asm/cpu.h | 2 | ||||
| -rw-r--r-- | arch/x86/include/asm/smp.h | 2 | ||||
| -rw-r--r-- | arch/x86/kernel/smpboot.c | 39 | ||||
| -rw-r--r-- | arch/x86/xen/smp.c | 46 | ||||
| -rw-r--r-- | include/linux/cpu.h | 14 | ||||
| -rw-r--r-- | include/linux/lockdep.h | 7 | ||||
| -rw-r--r-- | include/linux/rcupdate.h | 40 | ||||
| -rw-r--r-- | include/linux/srcu.h | 2 | ||||
| -rw-r--r-- | init/Kconfig | 13 | ||||
| -rw-r--r-- | kernel/cpu.c | 4 | ||||
| -rw-r--r-- | kernel/rcu/rcutorture.c | 27 | ||||
| -rw-r--r-- | kernel/rcu/srcu.c | 19 | ||||
| -rw-r--r-- | kernel/rcu/tiny.c | 14 | ||||
| -rw-r--r-- | kernel/rcu/tree.c | 437 | ||||
| -rw-r--r-- | kernel/rcu/tree.h | 11 | ||||
| -rw-r--r-- | kernel/rcu/tree_plugin.h | 267 | ||||
| -rw-r--r-- | kernel/rcu/tree_trace.c | 4 | ||||
| -rw-r--r-- | kernel/rcu/update.c | 72 | ||||
| -rw-r--r-- | kernel/sched/idle.c | 9 | ||||
| -rw-r--r-- | kernel/smpboot.c | 156 | ||||
| -rw-r--r-- | lib/Kconfig.debug | 35 | ||||
| -rwxr-xr-x | tools/testing/selftests/rcutorture/bin/kvm.sh | 2 | ||||
| -rw-r--r-- | tools/testing/selftests/rcutorture/configs/rcu/CFcommon | 1 |
26 files changed, 863 insertions, 377 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index d913e3b4bf0d..5368ba701de2 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
| @@ -2968,6 +2968,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
| 2968 | Set maximum number of finished RCU callbacks to | 2968 | Set maximum number of finished RCU callbacks to |
| 2969 | process in one batch. | 2969 | process in one batch. |
| 2970 | 2970 | ||
| 2971 | rcutree.gp_init_delay= [KNL] | ||
| 2972 | Set the number of jiffies to delay each step of | ||
| 2973 | RCU grace-period initialization. This only has | ||
| 2974 | effect when CONFIG_RCU_TORTURE_TEST_SLOW_INIT is | ||
| 2975 | set. | ||
| 2976 | |||
| 2971 | rcutree.rcu_fanout_leaf= [KNL] | 2977 | rcutree.rcu_fanout_leaf= [KNL] |
| 2972 | Increase the number of CPUs assigned to each | 2978 | Increase the number of CPUs assigned to each |
| 2973 | leaf rcu_node structure. Useful for very large | 2979 | leaf rcu_node structure. Useful for very large |
diff --git a/arch/blackfin/mach-common/smp.c b/arch/blackfin/mach-common/smp.c index 8ad3e90cc8fc..1c7259597395 100644 --- a/arch/blackfin/mach-common/smp.c +++ b/arch/blackfin/mach-common/smp.c | |||
| @@ -413,16 +413,14 @@ int __cpu_disable(void) | |||
| 413 | return 0; | 413 | return 0; |
| 414 | } | 414 | } |
| 415 | 415 | ||
| 416 | static DECLARE_COMPLETION(cpu_killed); | ||
| 417 | |||
| 418 | int __cpu_die(unsigned int cpu) | 416 | int __cpu_die(unsigned int cpu) |
| 419 | { | 417 | { |
| 420 | return wait_for_completion_timeout(&cpu_killed, 5000); | 418 | return cpu_wait_death(cpu, 5); |
| 421 | } | 419 | } |
| 422 | 420 | ||
| 423 | void cpu_die(void) | 421 | void cpu_die(void) |
| 424 | { | 422 | { |
| 425 | complete(&cpu_killed); | 423 | (void)cpu_report_death(); |
| 426 | 424 | ||
| 427 | atomic_dec(&init_mm.mm_users); | 425 | atomic_dec(&init_mm.mm_users); |
| 428 | atomic_dec(&init_mm.mm_count); | 426 | atomic_dec(&init_mm.mm_count); |
diff --git a/arch/metag/kernel/smp.c b/arch/metag/kernel/smp.c index f006d2276f40..ac3a199e33e7 100644 --- a/arch/metag/kernel/smp.c +++ b/arch/metag/kernel/smp.c | |||
| @@ -261,7 +261,6 @@ int __cpu_up(unsigned int cpu, struct task_struct *idle) | |||
| 261 | } | 261 | } |
| 262 | 262 | ||
| 263 | #ifdef CONFIG_HOTPLUG_CPU | 263 | #ifdef CONFIG_HOTPLUG_CPU |
| 264 | static DECLARE_COMPLETION(cpu_killed); | ||
| 265 | 264 | ||
| 266 | /* | 265 | /* |
| 267 | * __cpu_disable runs on the processor to be shutdown. | 266 | * __cpu_disable runs on the processor to be shutdown. |
| @@ -299,7 +298,7 @@ int __cpu_disable(void) | |||
| 299 | */ | 298 | */ |
| 300 | void __cpu_die(unsigned int cpu) | 299 | void __cpu_die(unsigned int cpu) |
| 301 | { | 300 | { |
| 302 | if (!wait_for_completion_timeout(&cpu_killed, msecs_to_jiffies(1))) | 301 | if (!cpu_wait_death(cpu, 1)) |
| 303 | pr_err("CPU%u: unable to kill\n", cpu); | 302 | pr_err("CPU%u: unable to kill\n", cpu); |
| 304 | } | 303 | } |
| 305 | 304 | ||
| @@ -314,7 +313,7 @@ void cpu_die(void) | |||
| 314 | local_irq_disable(); | 313 | local_irq_disable(); |
| 315 | idle_task_exit(); | 314 | idle_task_exit(); |
| 316 | 315 | ||
| 317 | complete(&cpu_killed); | 316 | (void)cpu_report_death(); |
| 318 | 317 | ||
| 319 | asm ("XOR TXENABLE, D0Re0,D0Re0\n"); | 318 | asm ("XOR TXENABLE, D0Re0,D0Re0\n"); |
| 320 | } | 319 | } |
diff --git a/arch/x86/include/asm/cpu.h b/arch/x86/include/asm/cpu.h index d2b12988d2ed..bf2caa1dedc5 100644 --- a/arch/x86/include/asm/cpu.h +++ b/arch/x86/include/asm/cpu.h | |||
| @@ -34,8 +34,6 @@ extern int _debug_hotplug_cpu(int cpu, int action); | |||
| 34 | #endif | 34 | #endif |
| 35 | #endif | 35 | #endif |
| 36 | 36 | ||
| 37 | DECLARE_PER_CPU(int, cpu_state); | ||
| 38 | |||
| 39 | int mwait_usable(const struct cpuinfo_x86 *); | 37 | int mwait_usable(const struct cpuinfo_x86 *); |
| 40 | 38 | ||
| 41 | #endif /* _ASM_X86_CPU_H */ | 39 | #endif /* _ASM_X86_CPU_H */ |
diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h index 8cd1cc3bc835..a5cb4f6e9492 100644 --- a/arch/x86/include/asm/smp.h +++ b/arch/x86/include/asm/smp.h | |||
| @@ -150,12 +150,12 @@ static inline void arch_send_call_function_ipi_mask(const struct cpumask *mask) | |||
| 150 | } | 150 | } |
| 151 | 151 | ||
| 152 | void cpu_disable_common(void); | 152 | void cpu_disable_common(void); |
| 153 | void cpu_die_common(unsigned int cpu); | ||
| 154 | void native_smp_prepare_boot_cpu(void); | 153 | void native_smp_prepare_boot_cpu(void); |
| 155 | void native_smp_prepare_cpus(unsigned int max_cpus); | 154 | void native_smp_prepare_cpus(unsigned int max_cpus); |
| 156 | void native_smp_cpus_done(unsigned int max_cpus); | 155 | void native_smp_cpus_done(unsigned int max_cpus); |
| 157 | int native_cpu_up(unsigned int cpunum, struct task_struct *tidle); | 156 | int native_cpu_up(unsigned int cpunum, struct task_struct *tidle); |
| 158 | int native_cpu_disable(void); | 157 | int native_cpu_disable(void); |
| 158 | int common_cpu_die(unsigned int cpu); | ||
| 159 | void native_cpu_die(unsigned int cpu); | 159 | void native_cpu_die(unsigned int cpu); |
| 160 | void native_play_dead(void); | 160 | void native_play_dead(void); |
| 161 | void play_dead_common(void); | 161 | void play_dead_common(void); |
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index febc6aabc72e..c8fa34963ead 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c | |||
| @@ -77,9 +77,6 @@ | |||
| 77 | #include <asm/realmode.h> | 77 | #include <asm/realmode.h> |
| 78 | #include <asm/misc.h> | 78 | #include <asm/misc.h> |
| 79 | 79 | ||
| 80 | /* State of each CPU */ | ||
| 81 | DEFINE_PER_CPU(int, cpu_state) = { 0 }; | ||
| 82 | |||
| 83 | /* Number of siblings per CPU package */ | 80 | /* Number of siblings per CPU package */ |
| 84 | int smp_num_siblings = 1; | 81 | int smp_num_siblings = 1; |
| 85 | EXPORT_SYMBOL(smp_num_siblings); | 82 | EXPORT_SYMBOL(smp_num_siblings); |
| @@ -257,7 +254,7 @@ static void notrace start_secondary(void *unused) | |||
| 257 | lock_vector_lock(); | 254 | lock_vector_lock(); |
| 258 | set_cpu_online(smp_processor_id(), true); | 255 | set_cpu_online(smp_processor_id(), true); |
| 259 | unlock_vector_lock(); | 256 | unlock_vector_lock(); |
| 260 | per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE; | 257 | cpu_set_state_online(smp_processor_id()); |
| 261 | x86_platform.nmi_init(); | 258 | x86_platform.nmi_init(); |
| 262 | 259 | ||
| 263 | /* enable local interrupts */ | 260 | /* enable local interrupts */ |
| @@ -948,7 +945,10 @@ int native_cpu_up(unsigned int cpu, struct task_struct *tidle) | |||
| 948 | */ | 945 | */ |
| 949 | mtrr_save_state(); | 946 | mtrr_save_state(); |
| 950 | 947 | ||
| 951 | per_cpu(cpu_state, cpu) = CPU_UP_PREPARE; | 948 | /* x86 CPUs take themselves offline, so delayed offline is OK. */ |
| 949 | err = cpu_check_up_prepare(cpu); | ||
| 950 | if (err && err != -EBUSY) | ||
| 951 | return err; | ||
| 952 | 952 | ||
| 953 | /* the FPU context is blank, nobody can own it */ | 953 | /* the FPU context is blank, nobody can own it */ |
| 954 | __cpu_disable_lazy_restore(cpu); | 954 | __cpu_disable_lazy_restore(cpu); |
| @@ -1191,7 +1191,7 @@ void __init native_smp_prepare_boot_cpu(void) | |||
| 1191 | switch_to_new_gdt(me); | 1191 | switch_to_new_gdt(me); |
| 1192 | /* already set me in cpu_online_mask in boot_cpu_init() */ | 1192 | /* already set me in cpu_online_mask in boot_cpu_init() */ |
| 1193 | cpumask_set_cpu(me, cpu_callout_mask); | 1193 | cpumask_set_cpu(me, cpu_callout_mask); |
| 1194 | per_cpu(cpu_state, me) = CPU_ONLINE; | 1194 | cpu_set_state_online(me); |
| 1195 | } | 1195 | } |
| 1196 | 1196 | ||
| 1197 | void __init native_smp_cpus_done(unsigned int max_cpus) | 1197 | void __init native_smp_cpus_done(unsigned int max_cpus) |
| @@ -1318,14 +1318,10 @@ static void __ref remove_cpu_from_maps(int cpu) | |||
| 1318 | numa_remove_cpu(cpu); | 1318 | numa_remove_cpu(cpu); |
| 1319 | } | 1319 | } |
| 1320 | 1320 | ||
| 1321 | static DEFINE_PER_CPU(struct completion, die_complete); | ||
| 1322 | |||
| 1323 | void cpu_disable_common(void) | 1321 | void cpu_disable_common(void) |
| 1324 | { | 1322 | { |
| 1325 | int cpu = smp_processor_id(); | ||
