Skip to contentSkip to conversation

ARM: mcpm: remove redundant dsb instructions prior to sev

PATCH New Will Deacon 3 participants 3 messages Dec 6, 2013 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: mcpm: remove redundant dsb instructions prior to sev

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

Cc Dave Martin <[email protected]>
Cc Nicolas Pitre <[email protected]>

---

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(-)
arch/arm/common/mcpm_entry.c +2 -2
index 26020a03f659..74140ed9922f 100644
@@ -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();
 }
 
 /*
Signature · 1 line
1.8.2.2
#1 lore raw

PATCH 1/1 ARM: mcpm: remove redundant dsb instructions prior to sev

Quoted 6 lines · Will Deacon

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

Cc Dave Martin <[email protected]>
Cc Nicolas Pitre <[email protected]>

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.

Cheers
---Dave

Quoted 37 lines

---

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(-)
arch/arm/common/mcpm_entry.c +2 -2
index 26020a03f659..74140ed9922f 100644
@@ -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();
 }
 
 /*
Signature · 1 line
1.8.2.2
#2 lore raw

PATCH 1/1 ARM: mcpm: remove redundant dsb instructions prior to sev

In reply to Will Deacon
Quoted 6 lines · Will Deacon

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

Cc Dave Martin <[email protected]>
Cc Nicolas Pitre <[email protected]>
Quoted 37 lines

---

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(-)
arch/arm/common/mcpm_entry.c +2 -2
index 26020a03f659..74140ed9922f 100644
@@ -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();
 }
 
 /*
Signature · 1 line
1.8.2.2