public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] ARM: mcpm: remove redundant dsb instructions prior to sev
@ 2013-12-06 16:34 Will Deacon
  2013-12-06 16:44 ` Dave Martin
  2013-12-06 16:45 ` Nicolas Pitre
  0 siblings, 2 replies; 3+ messages in thread
From: Will Deacon @ 2013-12-06 16:34 UTC (permalink / raw)
  To: linux-arm-kernel

sync_cache_w already includes a dsb, so we can just use sev() directly
then following a cache-sync.

Cc: Dave Martin <Dave.Martin@arm.com>
Cc: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Will Deacon <will.deacon@arm.com>
---

Hi guys,

I was auditing our uses of wfe (they're all fine) but noticed these
extra dsbs in the process.

Will

 arch/arm/common/mcpm_entry.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/common/mcpm_entry.c b/arch/arm/common/mcpm_entry.c
index 26020a03f659..74140ed9922f 100644
--- a/arch/arm/common/mcpm_entry.c
+++ b/arch/arm/common/mcpm_entry.c
@@ -167,7 +167,7 @@ void __mcpm_cpu_down(unsigned int cpu, unsigned int cluster)
 	dmb();
 	mcpm_sync.clusters[cluster].cpus[cpu].cpu = CPU_DOWN;
 	sync_cache_w(&mcpm_sync.clusters[cluster].cpus[cpu].cpu);
-	dsb_sev();
+	sev();
 }
 
 /*
@@ -183,7 +183,7 @@ void __mcpm_outbound_leave_critical(unsigned int cluster, int state)
 	dmb();
 	mcpm_sync.clusters[cluster].cluster = state;
 	sync_cache_w(&mcpm_sync.clusters[cluster].cluster);
-	dsb_sev();
+	sev();
 }
 
 /*
-- 
1.8.2.2

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

* [PATCH] ARM: mcpm: remove redundant dsb instructions prior to sev
  2013-12-06 16:34 [PATCH] ARM: mcpm: remove redundant dsb instructions prior to sev Will Deacon
@ 2013-12-06 16:44 ` Dave Martin
  2013-12-06 16:45 ` Nicolas Pitre
  1 sibling, 0 replies; 3+ messages in thread
From: Dave Martin @ 2013-12-06 16:44 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Dec 06, 2013 at 04:34:05PM +0000, Will Deacon wrote:
> sync_cache_w already includes a dsb, so we can just use sev() directly
> then following a cache-sync.
> 
> Cc: Dave Martin <Dave.Martin@arm.com>
> Cc: Nicolas Pitre <nico@fluxnic.net>
> Signed-off-by: Will Deacon <will.deacon@arm.com>

This makes sense.  I have a feeling the dsb_sev() calls originated
during my original attempt to use dedicated uncached memory for the
synchronisation buffer -- i.e., there was no cache flush.

The extra dsbs do indeed look redundant now.

Acked-by: Dave Martin <Dave.Martin@arm.com>

Cheers
---Dave

> ---
> 
> Hi guys,
> 
> I was auditing our uses of wfe (they're all fine) but noticed these
> extra dsbs in the process.
> 
> Will
> 
>  arch/arm/common/mcpm_entry.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/common/mcpm_entry.c b/arch/arm/common/mcpm_entry.c
> index 26020a03f659..74140ed9922f 100644
> --- a/arch/arm/common/mcpm_entry.c
> +++ b/arch/arm/common/mcpm_entry.c
> @@ -167,7 +167,7 @@ void __mcpm_cpu_down(unsigned int cpu, unsigned int cluster)
>  	dmb();
>  	mcpm_sync.clusters[cluster].cpus[cpu].cpu = CPU_DOWN;
>  	sync_cache_w(&mcpm_sync.clusters[cluster].cpus[cpu].cpu);
> -	dsb_sev();
> +	sev();
>  }
>  
>  /*
> @@ -183,7 +183,7 @@ void __mcpm_outbound_leave_critical(unsigned int cluster, int state)
>  	dmb();
>  	mcpm_sync.clusters[cluster].cluster = state;
>  	sync_cache_w(&mcpm_sync.clusters[cluster].cluster);
> -	dsb_sev();
> +	sev();
>  }
>  
>  /*
> -- 
> 1.8.2.2
> 

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

* [PATCH] ARM: mcpm: remove redundant dsb instructions prior to sev
  2013-12-06 16:34 [PATCH] ARM: mcpm: remove redundant dsb instructions prior to sev Will Deacon
  2013-12-06 16:44 ` Dave Martin
@ 2013-12-06 16:45 ` Nicolas Pitre
  1 sibling, 0 replies; 3+ messages in thread
From: Nicolas Pitre @ 2013-12-06 16:45 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, 6 Dec 2013, Will Deacon wrote:

> sync_cache_w already includes a dsb, so we can just use sev() directly
> then following a cache-sync.
> 
> Cc: Dave Martin <Dave.Martin@arm.com>
> Cc: Nicolas Pitre <nico@fluxnic.net>
> Signed-off-by: Will Deacon <will.deacon@arm.com>

Acked-by: Nicolas Pitre <nico@linaro.org>



> ---
> 
> Hi guys,
> 
> I was auditing our uses of wfe (they're all fine) but noticed these
> extra dsbs in the process.
> 
> Will
> 
>  arch/arm/common/mcpm_entry.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/common/mcpm_entry.c b/arch/arm/common/mcpm_entry.c
> index 26020a03f659..74140ed9922f 100644
> --- a/arch/arm/common/mcpm_entry.c
> +++ b/arch/arm/common/mcpm_entry.c
> @@ -167,7 +167,7 @@ void __mcpm_cpu_down(unsigned int cpu, unsigned int cluster)
>  	dmb();
>  	mcpm_sync.clusters[cluster].cpus[cpu].cpu = CPU_DOWN;
>  	sync_cache_w(&mcpm_sync.clusters[cluster].cpus[cpu].cpu);
> -	dsb_sev();
> +	sev();
>  }
>  
>  /*
> @@ -183,7 +183,7 @@ void __mcpm_outbound_leave_critical(unsigned int cluster, int state)
>  	dmb();
>  	mcpm_sync.clusters[cluster].cluster = state;
>  	sync_cache_w(&mcpm_sync.clusters[cluster].cluster);
> -	dsb_sev();
> +	sev();
>  }
>  
>  /*
> -- 
> 1.8.2.2
> 

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

end of thread, other threads:[~2013-12-06 16:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-06 16:34 [PATCH] ARM: mcpm: remove redundant dsb instructions prior to sev Will Deacon
2013-12-06 16:44 ` Dave Martin
2013-12-06 16:45 ` Nicolas Pitre

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox