Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 384b38b6 authored by Yuanyuan Zhong's avatar Yuanyuan Zhong Committed by Russell King
Browse files

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: default avatarYuanyuan Zhong <zyy@motorola.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 0ea1ec71
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -642,9 +642,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;
}