ARM: mcpm: remove redundant dsb instructions prior to sev
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.
---
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
@@ -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
PATCH 1/1 ARM: mcpm: remove redundant dsb instructions prior to sev
Quoted 6 lines · Will Deacon
sync_cache_walready includes a dsb, so we can just usesev()directly then following a cache-sync.Cc Dave Martin <[email protected]>Cc Nicolas Pitre <[email protected]>Signed-off-by Will Deacon <[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@@ -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
PATCH 1/1 ARM: mcpm: remove redundant dsb instructions prior to sev
In reply to Will DeaconQuoted 6 lines · Will Deacon
sync_cache_walready includes a dsb, so we can just usesev()directly then following a cache-sync.Cc Dave Martin <[email protected]>Cc Nicolas Pitre <[email protected]>Signed-off-by Will Deacon <[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@@ -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