[PATCH] ARM: smp_twd: twd_update_frequency need be run on all online CPUs

Jason Liu r64343 at freescale.com
Wed Jun 12 19:19:40 EDT 2013


When the local timer freq changed, the twd_update_frequency function
should be run all the CPUs include itself, otherwise, the twd freq will
not get updated and the local timer will not run correcttly.

smp_call_function will run functions on all other CPUs, but not include
himself, this is not correct,use on_each_cpu instead to fix this issue.

Signed-off-by: Jason Liu <r64343 at freescale.com>
Cc: Russell King <linux at arm.linux.org.uk>
Cc: Linus Walleij <linus.walleij at linaro.org>
Cc: Rob Herring <rob.herring at calxeda.com>
Cc: Shawn Guo <shawn.guo at linaro.org>
Cc: Arnd Bergmann <arnd at arndb.de>
Cc: stable at vger.kernel.org
---
 arch/arm/kernel/smp_twd.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c
index 90525d9..f6fd1d4 100644
--- a/arch/arm/kernel/smp_twd.c
+++ b/arch/arm/kernel/smp_twd.c
@@ -120,7 +120,7 @@ static int twd_rate_change(struct notifier_block *nb,
 	 * changing cpu.
 	 */
 	if (flags == POST_RATE_CHANGE)
-		smp_call_function(twd_update_frequency,
+		on_each_cpu(twd_update_frequency,
 				  (void *)&cnd->new_rate, 1);
 
 	return NOTIFY_OK;
-- 
1.7.10.4





More information about the linux-arm-kernel mailing list