Skip to content

Commit 384b38b

Browse files
Yuanyuan ZhongRussell King
authored andcommitted
ARM: 7873/1: vfp: clear vfp_current_hw_state for dying cpu
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>
1 parent 0ea1ec7 commit 384b38b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎arch/arm/vfp/vfpmodule.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -642,9 +642,9 @@ int vfp_restore_user_hwstate(struct user_vfp __user *ufp,
642642
static int vfp_hotplug(struct notifier_block *b, unsigned long action,
643643
void *hcpu)
644644
{
645-
if (action == CPU_DYING || action == CPU_DYING_FROZEN) {
646-
vfp_force_reload((long)hcpu, current_thread_info());
647-
} else if (action == CPU_STARTING || action == CPU_STARTING_FROZEN)
645+
if (action == CPU_DYING || action == CPU_DYING_FROZEN)
646+
vfp_current_hw_state[(long)hcpu] = NULL;
647+
else if (action == CPU_STARTING || action == CPU_STARTING_FROZEN)
648648
vfp_enable(NULL);
649649
return NOTIFY_OK;
650650
}

0 commit comments

Comments
 (0)