From 445c49e7b4946dda7745e3a149c6ef4e4ff830b1 Mon Sep 17 00:00:00 2001 From: tkasivajhula Date: Fri, 5 Feb 2010 12:36:45 -0800 Subject: tegra power: Fix a possible SMP race condition in LP3 It is possible that one cpu will populate the flowctrl structure while the other is waiting in a WFI. This change addresses this race condition. Change-Id: Ie4a37daa445d4546e02f748928870485d2f5f26b --- arch/arm/mach-tegra/idle-t2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-tegra/idle-t2.c b/arch/arm/mach-tegra/idle-t2.c index 134b477937f7..5b5dad442911 100644 --- a/arch/arm/mach-tegra/idle-t2.c +++ b/arch/arm/mach-tegra/idle-t2.c @@ -270,7 +270,7 @@ void cpu_ap20_do_idle(void) // Wait for any interrupt __asm__ volatile ("wfi"); - if (likely(s_pFlowCtrl)) + if (addr) { /* * Signal "stats monitor" to stop counting the idle cycles. -- cgit v1.2.3