linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] vfp: clear vfp_current_hw_state for dying cpu
@ 2013-10-22 19:35 Yuanyuan Zhong
  2013-10-30 16:15 ` Russell King - ARM Linux
  0 siblings, 1 reply; 2+ messages in thread
From: Yuanyuan Zhong @ 2013-10-22 19:35 UTC (permalink / raw)
  To: linux-arm-kernel

Previous version of the patch can be found at:
http://lists.infradead.org/pipermail/linux-arm-kernel/2013-October/201893.html

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.

Change-Id: Icb2c726334c5b0463b8126170cac2b44cd4ac38f
Signed-off-by: Yuanyuan Zhong <zyy@motorola.com>
---
 arch/arm/vfp/vfpmodule.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c
index 52b8f40..2f37e1d 100644
--- a/arch/arm/vfp/vfpmodule.c
+++ b/arch/arm/vfp/vfpmodule.c
@@ -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;
 }
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH v2] vfp: clear vfp_current_hw_state for dying cpu
  2013-10-22 19:35 [PATCH v2] vfp: clear vfp_current_hw_state for dying cpu Yuanyuan Zhong
@ 2013-10-30 16:15 ` Russell King - ARM Linux
  0 siblings, 0 replies; 2+ messages in thread
From: Russell King - ARM Linux @ 2013-10-30 16:15 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Oct 22, 2013 at 02:35:53PM -0500, Yuanyuan Zhong wrote:
> Previous version of the patch can be found at:
> http://lists.infradead.org/pipermail/linux-arm-kernel/2013-October/201893.html
> 
> 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.
> 
> Change-Id: Icb2c726334c5b0463b8126170cac2b44cd4ac38f
> Signed-off-by: Yuanyuan Zhong <zyy@motorola.com>

This is fine, please put the patch into the patch system and I'll send it
to Linus soon.  Please omit the Change-Id though.  Thanks.

> ---
>  arch/arm/vfp/vfpmodule.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c
> index 52b8f40..2f37e1d 100644
> --- a/arch/arm/vfp/vfpmodule.c
> +++ b/arch/arm/vfp/vfpmodule.c
> @@ -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;
>  }
> -- 
> 1.7.9.5
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-10-30 16:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-22 19:35 [PATCH v2] vfp: clear vfp_current_hw_state for dying cpu Yuanyuan Zhong
2013-10-30 16:15 ` Russell King - ARM Linux

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).