diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-02-04 18:29:53 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-02-04 18:29:53 -0500 |
commit | 9ef9dc69d4167276c04590d67ee55de8380bc1ad (patch) | |
tree | f0afd03cd9184eda2fe14c41f09daec79a62682e /arch/arm/kernel/smp.c | |
parent | 2c8296f8cf0ec40867965dddef3dfe92f73b38f4 (diff) | |
parent | 0d899e1b0000ddf78a75d7dcf9a9029d6f7f8091 (diff) |
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (44 commits)
[ARM] 4822/1: RealView: Change the REALVIEW_MPCORE configuration option
[ARM] 4821/1: RealView: Remove the platform dependencies from localtimer.c
[ARM] 4820/1: RealView: Select the timer IRQ at run-time
[ARM] 4819/1: RealView: Fix entry-macro.S to work with multiple platforms
[ARM] 4818/1: RealView: Add core-tile detection
[ARM] 4817/1: RealView: Move the AMBA resource definitions to realview_eb.c
[ARM] 4816/1: RealView: Move the platform-specific definitions into board-eb.h
[ARM] 4815/1: RealView: Add clockevents suport for the local timers
[ARM] 4814/1: RealView: Add broadcasting clockevents support for ARM11MPCore
[ARM] 4813/1: Add SMP helper functions for clockevents support
[ARM] 4812/1: RealView: clockevents support for the RealView platforms
[ARM] 4811/1: RealView: clocksource support for the RealView platforms
[ARM] 4736/1: Export atags to userspace and allow kexec to use customised atags
[ARM] 4798/1: pcm027: fix missing header file
[ARM] 4803/1: pxa: fix building issue of poodle.c caused by patch 4737/1
[ARM] 4801/1: pxa: fix building issues of missing pxa2xx-regs.h
[ARM] pxa: introduce sysdev for pxa3xx static memory controller
[ARM] pxa: add preliminary suspend/resume code for pxa3xx
[ARM] pxa: introduce sysdev for GPIO register saving/restoring
[ARM] pxa: introduce sysdev for IRQ register saving/restoring
...
Diffstat (limited to 'arch/arm/kernel/smp.c')
-rw-r--r-- | arch/arm/kernel/smp.c | 39 |
1 files changed, 32 insertions, 7 deletions
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index eafbb2b05eb8..e9dfbab46cb6 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -290,6 +290,11 @@ asmlinkage void __cpuinit secondary_start_kernel(void) | |||
290 | local_irq_enable(); | 290 | local_irq_enable(); |
291 | local_fiq_enable(); | 291 | local_fiq_enable(); |
292 | 292 | ||
293 | /* | ||
294 | * Setup local timer for this CPU. | ||
295 | */ | ||
296 | local_timer_setup(cpu); | ||
297 | |||
293 | calibrate_delay(); | 298 | calibrate_delay(); |
294 | 299 | ||
295 | smp_store_cpu_info(cpu); | 300 | smp_store_cpu_info(cpu); |
@@ -300,11 +305,6 @@ asmlinkage void __cpuinit secondary_start_kernel(void) | |||
300 | cpu_set(cpu, cpu_online_map); | 305 | cpu_set(cpu, cpu_online_map); |
301 | 306 | ||
302 | /* | 307 | /* |
303 | * Setup local timer for this CPU. | ||
304 | */ | ||
305 | local_timer_setup(cpu); | ||
306 | |||
307 | /* | ||
308 | * OK, it's off to the idle thread for us | 308 | * OK, it's off to the idle thread for us |
309 | */ | 309 | */ |
310 | cpu_idle(); | 310 | cpu_idle(); |
@@ -454,6 +454,27 @@ int smp_call_function(void (*func)(void *info), void *info, int retry, | |||
454 | } | 454 | } |
455 | EXPORT_SYMBOL_GPL(smp_call_function); | 455 | EXPORT_SYMBOL_GPL(smp_call_function); |
456 | 456 | ||
457 | int smp_call_function_single(int cpu, void (*func)(void *info), void *info, | ||
458 | int retry, int wait) | ||
459 | { | ||
460 | /* prevent preemption and reschedule on another processor */ | ||
461 | int current_cpu = get_cpu(); | ||
462 | int ret = 0; | ||
463 | |||
464 | if (cpu == current_cpu) { | ||
465 | local_irq_disable(); | ||
466 | func(info); | ||
467 | local_irq_enable(); | ||
468 | } else | ||
469 | ret = smp_call_function_on_cpu(func, info, retry, wait, | ||
470 | cpumask_of_cpu(cpu)); | ||
471 | |||
472 | put_cpu(); | ||
473 | |||
474 | return ret; | ||
475 | } | ||
476 | EXPORT_SYMBOL_GPL(smp_call_function_single); | ||
477 | |||
457 | void show_ipi_list(struct seq_file *p) | 478 | void show_ipi_list(struct seq_file *p) |
458 | { | 479 | { |
459 | unsigned int cpu; | 480 | unsigned int cpu; |
@@ -481,8 +502,7 @@ void show_local_irqs(struct seq_file *p) | |||
481 | static void ipi_timer(void) | 502 | static void ipi_timer(void) |
482 | { | 503 | { |
483 | irq_enter(); | 504 | irq_enter(); |
484 | profile_tick(CPU_PROFILING); | 505 | local_timer_interrupt(); |
485 | update_process_times(user_mode(get_irq_regs())); | ||
486 | irq_exit(); | 506 | irq_exit(); |
487 | } | 507 | } |
488 | 508 | ||
@@ -621,6 +641,11 @@ void smp_send_timer(void) | |||
621 | send_ipi_message(mask, IPI_TIMER); | 641 | send_ipi_message(mask, IPI_TIMER); |
622 | } | 642 | } |
623 | 643 | ||
644 | void smp_timer_broadcast(cpumask_t mask) | ||
645 | { | ||
646 | send_ipi_message(mask, IPI_TIMER); | ||
647 | } | ||
648 | |||
624 | void smp_send_stop(void) | 649 | void smp_send_stop(void) |
625 | { | 650 | { |
626 | cpumask_t mask = cpu_online_map; | 651 | cpumask_t mask = cpu_online_map; |