OSDN Git Service

ARM: vfp: only clear vfp state for current cpu in vfp_pm_suspend
authorColin Cross <ccross@android.com>
Sat, 28 Apr 2012 01:04:18 +0000 (18:04 -0700)
committerColin Cross <ccross@android.com>
Mon, 30 Apr 2012 20:15:00 +0000 (13:15 -0700)
vfp_pm_suspend runs on each cpu, only clear the hardware state
pointer for the current cpu.  Prevents a possible crash if one
cpu clears the hw state pointer when another cpu has already
checked if it is valid.

Change-Id: I997ab1554944eba86730818ff242d7ebe1b32736
Signed-off-by: Colin Cross <ccross@android.com>
arch/arm/vfp/vfpmodule.c

index f186913..78829fa 100644 (file)
@@ -427,7 +427,7 @@ static int vfp_pm_suspend(void)
        }
 
        /* clear any information we had about last context state */
-       memset(vfp_current_hw_state, 0, sizeof(vfp_current_hw_state));
+       vfp_current_hw_state[ti->cpu] = NULL;
 
        return 0;
 }