This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new fb12e7530d sched/smp: flush dcache before start other cpus
fb12e7530d is described below
commit fb12e7530dd38c4a709007d9273c263bb2afa8be
Author: zhangyuan21 <[email protected]>
AuthorDate: Thu Apr 27 20:56:20 2023 +0800
sched/smp: flush dcache before start other cpus
core0 may write the data used by other cpu, this will cause cache
inconsistency.
so need fulsh dcache before start other cpus.
Signed-off-by: zhangyuan21 <[email protected]>
---
sched/init/nx_smpstart.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sched/init/nx_smpstart.c b/sched/init/nx_smpstart.c
index f0965f6ee9..a740030ee3 100644
--- a/sched/init/nx_smpstart.c
+++ b/sched/init/nx_smpstart.c
@@ -111,6 +111,10 @@ int nx_smp_start(void)
int ret;
int cpu;
+ /* Flush dcache before start other CPUs. */
+
+ up_flush_dcache_all();
+
/* Start all of the other CPUs. CPU0 is already running. */
for (cpu = 1; cpu < CONFIG_SMP_NCPUS; cpu++)