diff options
| -rw-r--r-- | arch/hexagon/kernel/smp.c | 2 | ||||
| -rw-r--r-- | arch/ia64/kernel/smpboot.c | 2 | ||||
| -rw-r--r-- | arch/m32r/include/asm/smp.h | 5 | ||||
| -rw-r--r-- | arch/mn10300/kernel/smp.c | 2 | ||||
| -rw-r--r-- | arch/parisc/kernel/smp.c | 2 | ||||
| -rw-r--r-- | arch/powerpc/kernel/smp.c | 2 | ||||
| -rw-r--r-- | arch/s390/kernel/smp.c | 2 | ||||
| -rw-r--r-- | arch/sparc/kernel/smp_64.c | 7 | ||||
| -rw-r--r-- | arch/tile/kernel/smpboot.c | 10 | ||||
| -rw-r--r-- | arch/x86/include/asm/smp.h | 5 | ||||
| -rw-r--r-- | arch/x86/kernel/smpboot.c | 9 | ||||
| -rw-r--r-- | arch/x86/xen/smp.c | 2 | ||||
| -rw-r--r-- | include/linux/smp.h | 5 | ||||
| -rw-r--r-- | kernel/smp.c | 20 | ||||
| -rw-r--r-- | kernel/smpboot.h | 2 |
15 files changed, 1 insertions, 76 deletions
diff --git a/arch/hexagon/kernel/smp.c b/arch/hexagon/kernel/smp.c index f7264621e58d..149fbefc1a4d 100644 --- a/arch/hexagon/kernel/smp.c +++ b/arch/hexagon/kernel/smp.c | |||
| @@ -180,9 +180,7 @@ void __cpuinit start_secondary(void) | |||
| 180 | 180 | ||
| 181 | notify_cpu_starting(cpu); | 181 | notify_cpu_starting(cpu); |
| 182 | 182 | ||
| 183 | ipi_call_lock(); | ||
| 184 | set_cpu_online(cpu, true); | 183 | set_cpu_online(cpu, true); |
| 185 | ipi_call_unlock(); | ||
| 186 | 184 | ||
| 187 | local_irq_enable(); | 185 | local_irq_enable(); |
| 188 | 186 | ||
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c index 1113b8aba07f..963d2db53bfa 100644 --- a/arch/ia64/kernel/smpboot.c +++ b/arch/ia64/kernel/smpboot.c | |||
| @@ -382,7 +382,6 @@ smp_callin (void) | |||
| 382 | set_numa_node(cpu_to_node_map[cpuid]); | 382 | set_numa_node(cpu_to_node_map[cpuid]); |
| 383 | set_numa_mem(local_memory_node(cpu_to_node_map[cpuid])); | 383 | set_numa_mem(local_memory_node(cpu_to_node_map[cpuid])); |
| 384 | 384 | ||
| 385 | ipi_call_lock_irq(); | ||
| 386 | spin_lock(&vector_lock); | 385 | spin_lock(&vector_lock); |
| 387 | /* Setup the per cpu irq handling data structures */ | 386 | /* Setup the per cpu irq handling data structures */ |
| 388 | __setup_vector_irq(cpuid); | 387 | __setup_vector_irq(cpuid); |
| @@ -390,7 +389,6 @@ smp_callin (void) | |||
| 390 | set_cpu_online(cpuid, true); | 389 | set_cpu_online(cpuid, true); |
| 391 | per_cpu(cpu_state, cpuid) = CPU_ONLINE; | 390 | per_cpu(cpu_state, cpuid) = CPU_ONLINE; |
| 392 | spin_unlock(&vector_lock); | 391 | spin_unlock(&vector_lock); |
| 393 | ipi_call_unlock_irq(); | ||
| 394 | 392 | ||
| 395 | smp_setup_percpu_timer(); | 393 | smp_setup_percpu_timer(); |
| 396 | 394 | ||
diff --git a/arch/m32r/include/asm/smp.h b/arch/m32r/include/asm/smp.h index cf7829a61551..c689b828dfe2 100644 --- a/arch/m32r/include/asm/smp.h +++ b/arch/m32r/include/asm/smp.h | |||
| @@ -79,11 +79,6 @@ static __inline__ int cpu_number_map(int cpu) | |||
| 79 | return cpu; | 79 | return cpu; |
| 80 | } | 80 | } |
| 81 | 81 | ||
| 82 | static __inline__ unsigned int num_booting_cpus(void) | ||
| 83 | { | ||
| 84 | return cpumask_weight(&cpu_callout_map); | ||
| 85 | } | ||
| 86 | |||
| 87 | extern void smp_send_timer(void); | 82 | extern void smp_send_timer(void); |
| 88 | extern unsigned long send_IPI_mask_phys(const cpumask_t*, int, int); | 83 | extern unsigned long send_IPI_mask_phys(const cpumask_t*, int, int); |
| 89 | 84 | ||
diff --git a/arch/mn10300/kernel/smp.c b/arch/mn10300/kernel/smp.c index 090d35d36973..e62c223e4c45 100644 --- a/arch/mn10300/kernel/smp.c +++ b/arch/mn10300/kernel/smp.c | |||
| @@ -876,9 +876,7 @@ static void __init smp_online(void) | |||
| 876 | 876 | ||
| 877 | notify_cpu_starting(cpu); | 877 | notify_cpu_starting(cpu); |
| 878 | 878 | ||
| 879 | ipi_call_lock(); | ||
| 880 | set_cpu_online(cpu, true); | 879 | set_cpu_online(cpu, true); |
| 881 | ipi_call_unlock(); | ||
| 882 | 880 | ||
| 883 | local_irq_enable(); | 881 | local_irq_enable(); |
| 884 | } | 882 | } |
diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c index a47828d31fe6..6266730efd61 100644 --- a/arch/parisc/kernel/smp.c +++ b/arch/parisc/kernel/smp.c | |||
| @@ -300,9 +300,7 @@ smp_cpu_init(int cpunum) | |||
| 300 | 300 | ||
| 301 | notify_cpu_starting(cpunum); | 301 | notify_cpu_starting(cpunum); |
| 302 | 302 | ||
| 303 | ipi_call_lock(); | ||
| 304 | set_cpu_online(cpunum, true); | 303 | set_cpu_online(cpunum, true); |
| 305 | ipi_call_unlock(); | ||
| 306 | 304 | ||
| 307 | /* Initialise the idle task for this CPU */ | 305 | /* Initialise the idle task for this CPU */ |
| 308 | atomic_inc(&init_mm.mm_count); | 306 | atomic_inc(&init_mm.mm_count); |
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index e4cb34322de4..e1417c42155c 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c | |||
| @@ -571,7 +571,6 @@ void __devinit start_secondary(void *unused) | |||
| 571 | if (system_state == SYSTEM_RUNNING) | 571 | if (system_state == SYSTEM_RUNNING) |
| 572 | vdso_data->processorCount++; | 572 | vdso_data->processorCount++; |
| 573 | #endif | 573 | #endif |
| 574 | ipi_call_lock(); | ||
| 575 | notify_cpu_starting(cpu); | 574 | notify_cpu_starting(cpu); |
| 576 | set_cpu_online(cpu, true); | 575 | set_cpu_online(cpu, true); |
| 577 | /* Update sibling maps */ | 576 | /* Update sibling maps */ |
| @@ -601,7 +600,6 @@ void __devinit start_secondary(void *unused) | |||
| 601 | of_node_put(np); | 600 | of_node_put(np); |
| 602 | } | 601 | } |
| 603 | of_node_put(l2_cache); | 602 | of_node_put(l2_cache); |
| 604 | ipi_call_unlock(); | ||
| 605 | 603 | ||
| 606 | local_irq_enable(); | 604 | local_irq_enable(); |
| 607 | 605 | ||
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index 15cca26ccb6c..8dca9c248ac7 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
| @@ -717,9 +717,7 @@ static void __cpuinit smp_start_secondary(void *cpuvoid) | |||
| 717 | init_cpu_vtimer(); | 717 | init_cpu_vtimer(); |
| 718 | pfault_init(); | 718 | pfault_init(); |
| 719 | notify_cpu_starting(smp_processor_id()); | 719 | notify_cpu_starting(smp_processor_id()); |
| 720 | ipi_call_lock(); | ||
| 721 | set_cpu_online(smp_processor_id(), true); | 720 | set_cpu_online(smp_processor_id(), true); |
| 722 | ipi_call_unlock(); | ||
| 723 | local_irq_enable(); | 721 | local_irq_enable(); |
| 724 | /* cpu_idle will call schedule for us */ | 722 | /* cpu_idle will call schedule for us */ |
| 725 | cpu_idle(); | 723 | cpu_idle(); |
diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c index f591598d92f6..781bcb10b8bd 100644 --- a/arch/sparc/kernel/smp_64.c +++ b/arch/sparc/kernel/smp_64.c | |||
| @@ -103,8 +103,6 @@ void __cpuinit smp_callin(void) | |||
| 103 | if (cheetah_pcache_forced_on) | 103 | if (cheetah_pcache_forced_on) |
| 104 | cheetah_enable_pcache(); | 104 | cheetah_enable_pcache(); |
| 105 | 105 | ||
| 106 | local_irq_enable(); | ||
| 107 | |||
| 108 | callin_flag = 1; | 106 | callin_flag = 1; |
| 109 | __asm__ __volatile__("membar #Sync\n\t" | 107 | __asm__ __volatile__("membar #Sync\n\t" |
| 110 | "flush %%g6" : : : "memory"); | 108 | "flush %%g6" : : : "memory"); |
| @@ -124,9 +122,8 @@ void __cpuinit smp_callin(void) | |||
| 124 | while (!cpumask_test_cpu(cpuid, &smp_commenced_mask)) | 122 | while (!cpumask_test_cpu(cpuid, &smp_commenced_mask)) |
| 125 | rmb(); | 123 | rmb(); |
| 126 | 124 | ||
| 127 | ipi_call_lock_irq(); | ||
| 128 | set_cpu_online(cpuid, true); | 125 | set_cpu_online(cpuid, true); |
| 129 | ipi_call_unlock_irq(); | 126 | local_irq_enable(); |
| 130 | 127 | ||
| 131 | /* idle thread is expected to have preempt disabled */ | 128 | /* idle thread is expected to have preempt disabled */ |
| 132 | preempt_disable(); | 129 | preempt_disable(); |
| @@ -1308,9 +1305,7 @@ int __cpu_disable(void) | |||
| 1308 | mdelay(1); | 1305 | mdelay(1); |
| 1309 | local_irq_disable(); | 1306 | local_irq_disable(); |
| 1310 | 1307 | ||
| 1311 | ipi_call_lock(); | ||
| 1312 | set_cpu_online(cpu, false); | 1308 | set_cpu_online(cpu, false); |
| 1313 | ipi_call_unlock(); | ||
| 1314 | 1309 | ||
| 1315 | cpu_map_rebuild(); | 1310 | cpu_map_rebuild(); |
| 1316 | 1311 | ||
diff --git a/arch/tile/kernel/smpboot.c b/arch/tile/kernel/smpboot.c index 84873fbe8f27..e686c5ac90be 100644 --- a/arch/tile/kernel/smpboot.c +++ b/arch/tile/kernel/smpboot.c | |||
| @@ -198,17 +198,7 @@ void __cpuinit online_secondary(void) | |||
| 198 | 198 | ||
| 199 | notify_cpu_starting(smp_processor_id()); | 199 | notify_cpu_starting(smp_processor_id()); |
| 200 | 200 | ||
| 201 | /* | ||
| 202 | * We need to hold call_lock, so there is no inconsistency | ||
| 203 | * between the time smp_call_function() determines number of | ||
| 204 | * IPI recipients, and the time when the determination is made | ||
| 205 | * for which cpus receive the IPI. Holding this | ||
| 206 | * lock helps us to not include this cpu in a currently in progress | ||
| 207 | * smp_call_function(). | ||
| 208 | */ | ||
| 209 | ipi_call_lock(); | ||
| 210 | set_cpu_online(smp_processor_id(), 1); | 201 | set_cpu_online(smp_processor_id(), 1); |
| 211 | ipi_call_unlock(); | ||
| 212 | __get_cpu_var(cpu_state) = CPU_ONLINE; | 202 | __get_cpu_var(cpu_state) = CPU_ONLINE; |
| 213 | 203 | ||
| 214 | /* Set up tile-specific state for this cpu. */ | 204 | /* Set up tile-specific state for this cpu. */ |
diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h index f48394513c37..2ffa95dc2333 100644 --- a/arch/x86/include/asm/smp.h +++ b/arch/x86/include/asm/smp.h | |||
| @@ -169,11 +169,6 @@ void x86_idle_thread_init(unsigned int cpu, struct task_struct *idle); | |||
| 169 | void smp_store_cpu_info(int id); | 169 | void smp_store_cpu_info(int id); |
| 170 | #define cpu_physical_id(cpu) per_cpu(x86_cpu_to_apicid, cpu) | 170 | #define cpu_physical_id(cpu) per_cpu(x86_cpu_to_apicid, cpu) |
| 171 | 171 | ||
| 172 | /* We don't mark CPUs online until __cpu_up(), so we need another measure */ | ||
| 173 | static inline int num_booting_cpus(void) | ||
| 174 | { | ||
| 175 | return cpumask_weight(cpu_callout_mask); | ||
| 176 | } | ||
| 177 | #else /* !CONFIG_SMP */ | 172 | #else /* !CONFIG_SMP */ |
| 178 | #define wbinvd_on_cpu(cpu) wbinvd() | 173 | #define wbinvd_on_cpu(cpu) wbinvd() |
| 179 | static inline int wbinvd_on_all_cpus(void) | 174 | static inline int wbinvd_on_all_cpus(void) |
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 7bd8a0823654..27e2eeff7a4b 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c | |||
| @@ -255,22 +255,13 @@ notrace static void __cpuinit start_secondary(void *unused) | |||
| 255 | check_tsc_sync_target(); | 255 | check_tsc_sync_target(); |
| 256 | 256 | ||
| 257 | /* | 257 | /* |
| 258 | * We need to hold call_lock, so there is no inconsistency | ||
| 259 | * between the time smp_call_function() determines number of | ||
| 260 | * IPI recipients, and the time when the determination is made | ||
| 261 | * for which cpus receive the IPI. Holding this | ||
| 262 | * lock helps us to not include this cpu in a currently in progress | ||
| 263 | * smp_call_function(). | ||
| 264 | * | ||
| 265 | * We need to hold vector_lock so there the set of online cpus | 258 | * We need to hold vector_lock so there the set of online cpus |
| 266 | * does not change while we are assigning vectors to cpus. Holding | 259 | * does not change while we are assigning vectors to cpus. Holding |
| 267 | * this lock ensures we don't half assign or remove an irq from a cpu. | 260 | * this lock ensures we don't half assign or remove an irq from a cpu. |
| 268 | */ | 261 | */ |
| 269 | ipi_call_lock(); | ||
| 270 | lock_vector_lock(); | 262 | lock_vector_lock(); |
| 271 | set_cpu_online(smp_processor_id(), true); | 263 | set_cpu_online(smp_processor_id(), true); |
| 272 | unlock_vector_lock(); | 264 | unlock_vector_lock(); |
| 273 | ipi_call_unlock(); | ||
| 274 | per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE; | 265 | per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE; |
| 275 | x86_platform.nmi_init(); | 266 | x86_platform.nmi_init(); |
| 276 | 267 | ||
diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c index afb250d22a6b..f58dca7a6e52 100644 --- a/arch/x86/xen/smp.c +++ b/arch/x86/xen/smp.c | |||
| @@ -80,9 +80,7 @@ static void __cpuinit cpu_bringup(void) | |||
| 80 | 80 | ||
| 81 | notify_cpu_starting(cpu); | 81 | notify_cpu_starting(cpu); |
| 82 | 82 | ||
| 83 | ipi_call_lock(); | ||
| 84 | set_cpu_online(cpu, true); | 83 | set_cpu_online(cpu, true); |
| 85 | ipi_call_unlock(); | ||
| 86 | 84 | ||
| 87 | this_cpu_write(cpu_state, CPU_ONLINE); | 85 | this_cpu_write(cpu_state, CPU_ONLINE); |
| 88 | 86 | ||
diff --git a/include/linux/smp.h b/include/linux/smp.h index 717fb746c9a8..dd6f06be3c9f 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h | |||
| @@ -90,10 +90,6 @@ void kick_all_cpus_sync(void); | |||
| 90 | void __init call_function_init(void); | 90 | void __init call_function_init(void); |
| 91 | void generic_smp_call_function_single_interrupt(void); | 91 | void generic_smp_call_function_single_interrupt(void); |
| 92 | void generic_smp_call_function_interrupt(void); | 92 | void generic_smp_call_function_interrupt(void); |
| 93 | void ipi_call_lock(void); | ||
| 94 | void ipi_call_unlock(void); | ||
| 95 | void ipi_call_lock_irq(void); | ||
| 96 | void ipi_call_unlock_irq(void); | ||
| 97 | #else | 93 | #else |
| 98 | static inline void call_function_init(void) { } | 94 | static inline void call_function_init(void) { } |
| 99 | #endif | 95 | #endif |
| @@ -181,7 +177,6 @@ static inline int up_smp_call_function(smp_call_func_t func, void *info) | |||
| 181 | } while (0) | 177 | } while (0) |
| 182 | 178 | ||
| 183 | static inline void smp_send_reschedule(int cpu) { } | 179 | static inline void smp_send_reschedule(int cpu) { } |
| 184 | #define num_booting_cpus() 1 | ||
| 185 | #define smp_prepare_boot_cpu() do {} while (0) | 180 | #define smp_prepare_boot_cpu() do {} while (0) |
| 186 | #define smp_call_function_many(mask, func, info, wait) \ | 181 | #define smp_call_function_many(mask, func, info, wait) \ |
| 187 | (up_smp_call_function(func, info)) | 182 | (up_smp_call_function(func, info)) |
diff --git a/kernel/smp.c b/kernel/smp.c index d0ae5b24875e..29dd40a9f2f4 100644 --- a/kernel/smp.c +++ b/kernel/smp.c | |||
| @@ -581,26 +581,6 @@ int smp_call_function(smp_call_func_t func, void *info, int wait) | |||
| 581 | return 0; | 581 | return 0; |
| 582 | } | 582 | } |
| 583 | EXPORT_SYMBOL(smp_call_function); | 583 | EXPORT_SYMBOL(smp_call_function); |
| 584 | |||
| 585 | void ipi_call_lock(void) | ||
| 586 | { | ||
| 587 | raw_spin_lock(&call_function.lock); | ||
| 588 | } | ||
| 589 | |||
| 590 | void ipi_call_unlock(void) | ||
| 591 | { | ||
| 592 | raw_spin_unlock(&call_function.lock); | ||
| 593 | } | ||
| 594 | |||
| 595 | void ipi_call_lock_irq(void) | ||
| 596 | { | ||
| 597 | raw_spin_lock_irq(&call_function.lock); | ||
| 598 | } | ||
| 599 | |||
| 600 | void ipi_call_unlock_irq(void) | ||
| 601 | { | ||
| 602 | raw_spin_unlock_irq(&call_function.lock); | ||
| 603 | } | ||
| 604 | #endif /* USE_GENERIC_SMP_HELPERS */ | 584 | #endif /* USE_GENERIC_SMP_HELPERS */ |
| 605 | 585 | ||
| 606 | /* Setup configured maximum number of CPUs to activate */ | 586 | /* Setup configured maximum number of CPUs to activate */ |
diff --git a/kernel/smpboot.h b/kernel/smpboot.h index 80c0acfb8472..6ef9433e1c70 100644 --- a/kernel/smpboot.h +++ b/kernel/smpboot.h | |||
| @@ -3,8 +3,6 @@ | |||
| 3 | 3 | ||
| 4 | struct task_struct; | 4 | struct task_struct; |
| 5 | 5 | ||
| 6 | int smpboot_prepare(unsigned int cpu); | ||
| 7 | |||
| 8 | #ifdef CONFIG_GENERIC_SMP_IDLE_THREAD | 6 | #ifdef CONFIG_GENERIC_SMP_IDLE_THREAD |
| 9 | struct task_struct *idle_thread_get(unsigned int cpu); | 7 | struct task_struct *idle_thread_get(unsigned int cpu); |
| 10 | void idle_thread_set_boot_cpu(void); | 8 | void idle_thread_set_boot_cpu(void); |
