From 8d5e8b025ee36235b58e6da279c7ac6e24126f3a Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Fri, 27 Apr 2012 18:04:18 -0700 Subject: [PATCH] ARM: vfp: only clear vfp state for current cpu in vfp_pm_suspend 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 --- arch/arm/vfp/vfpmodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index 74d4f38e5c6e..e37c5fdbdcd5 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c @@ -426,7 +426,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; } -- 2.34.1