aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2008-02-04 11:28:56 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-02-04 12:52:18 -0500
commit3e459990961db7f3f2dcf21e2b38a7216dfd10dd (patch)
treed85f86d36cf2433817ba8f4d29447ca4950e206d /arch/arm
parentae30ceac3c6bbacdb227816abe6f0c7ea867ac7c (diff)
[ARM] 4813/1: Add SMP helper functions for clockevents support
This patch adds the smp_call_function_single and smp_timer_broadcast functions and modifies ipi_timer to call the platform-specific function local_timer_interrupt. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/kernel/smp.c29
1 files changed, 27 insertions, 2 deletions
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index eafbb2b05eb8..aef6f9ab900e 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -454,6 +454,27 @@ int smp_call_function(void (*func)(void *info), void *info, int retry,
454} 454}
455EXPORT_SYMBOL_GPL(smp_call_function); 455EXPORT_SYMBOL_GPL(smp_call_function);
456 456
457int 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}
476EXPORT_SYMBOL_GPL(smp_call_function_single);
477
457void show_ipi_list(struct seq_file *p) 478void 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)
481static void ipi_timer(void) 502static 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
644void smp_timer_broadcast(cpumask_t mask)
645{
646 send_ipi_message(mask, IPI_TIMER);
647}
648
624void smp_send_stop(void) 649void smp_send_stop(void)
625{ 650{
626 cpumask_t mask = cpu_online_map; 651 cpumask_t mask = cpu_online_map;