]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ARM: 7873/1: vfp: clear vfp_current_hw_state for dying cpu
authorYuanyuan Zhong <zyy@motorola.com>
Wed, 30 Oct 2013 16:31:49 +0000 (17:31 +0100)
committerNicolin Chen <Guangyu.Chen@freescale.com>
Fri, 24 Jan 2014 09:38:13 +0000 (17:38 +0800)
The CPU_DYING notifier is called by cpu stopper task which
does not own the context held in the VFP hardware. Calling
vfp_force_reload() has no effect.
Replace it with clearing vfp_current_hw_state.

Signed-off-by: Yuanyuan Zhong <zyy@motorola.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
(cherry picked from commit 384b38b66947b06999b3e39a596d4f2fb94f77e4)

arch/arm/vfp/vfpmodule.c

index 5dfbb0b8e7f4484ddeb97974080a51bfaec0dc3e..076c2f43a859f5f25bee79705e9e522131018f21 100644 (file)
@@ -641,9 +641,9 @@ int vfp_restore_user_hwstate(struct user_vfp __user *ufp,
 static int vfp_hotplug(struct notifier_block *b, unsigned long action,
        void *hcpu)
 {
-       if (action == CPU_DYING || action == CPU_DYING_FROZEN) {
-               vfp_force_reload((long)hcpu, current_thread_info());
-       else if (action == CPU_STARTING || action == CPU_STARTING_FROZEN)
+       if (action == CPU_DYING || action == CPU_DYING_FROZEN)
+               vfp_current_hw_state[(long)hcpu] = NULL;
+       else if (action == CPU_STARTING || action == CPU_STARTING_FROZEN)
                vfp_enable(NULL);
        return NOTIFY_OK;
 }