You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/01/23 10:28:47 UTC
[incubator-nuttx] 02/02: arch/risc-v: Remove g_serial_ok
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/incubator-nuttx.git
commit 71d3ff104553aebf4cb938ee8abc6fd7d34fd239
Author: Huang Qi <hu...@xiaomi.com>
AuthorDate: Sun Jan 23 15:38:02 2022 +0800
arch/risc-v: Remove g_serial_ok
`WFI` is enough to wait the ready signal from master core,
so we can remove it.
Signed-off-by: Huang Qi <hu...@xiaomi.com>
---
arch/risc-v/src/c906/c906_start.c | 3 ---
arch/risc-v/src/common/riscv_cpustart.c | 16 ----------------
arch/risc-v/src/k210/k210_start.c | 3 ---
arch/risc-v/src/mpfs/mpfs_start.c | 3 ---
4 files changed, 25 deletions(-)
diff --git a/arch/risc-v/src/c906/c906_start.c b/arch/risc-v/src/c906/c906_start.c
index 1b58cf4..0248374 100644
--- a/arch/risc-v/src/c906/c906_start.c
+++ b/arch/risc-v/src/c906/c906_start.c
@@ -59,7 +59,6 @@
*/
uintptr_t g_idle_topstack = C906_IDLESTACK_TOP;
-volatile bool g_serial_ok = false;
/****************************************************************************
* Public Functions
@@ -115,8 +114,6 @@ void __c906_start(uint32_t mhartid)
showprogress('B');
- g_serial_ok = true;
-
/* Do board initialization */
c906_boardinitialize();
diff --git a/arch/risc-v/src/common/riscv_cpustart.c b/arch/risc-v/src/common/riscv_cpustart.c
index e6984ad..abc2086 100644
--- a/arch/risc-v/src/common/riscv_cpustart.c
+++ b/arch/risc-v/src/common/riscv_cpustart.c
@@ -42,16 +42,6 @@
#include "chip.h"
/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Data
- ****************************************************************************/
-
-extern volatile bool g_serial_ok;
-
-/****************************************************************************
* Public Functions
****************************************************************************/
@@ -76,12 +66,6 @@ void riscv_cpu_boot(int cpu)
return;
}
- /* Wait for g_serial_ok set by cpu0 when booting */
-
- while (!g_serial_ok)
- {
- }
-
/* Clear machine software interrupt for CPU(cpu) */
putreg32(0, (uintptr_t)RISCV_CLINT_MSIP + (4 * cpu));
diff --git a/arch/risc-v/src/k210/k210_start.c b/arch/risc-v/src/k210/k210_start.c
index f915952..51993e8 100644
--- a/arch/risc-v/src/k210/k210_start.c
+++ b/arch/risc-v/src/k210/k210_start.c
@@ -53,7 +53,6 @@
*/
uintptr_t g_idle_topstack = K210_IDLESTACK0_TOP;
-volatile bool g_serial_ok = false;
/****************************************************************************
* Public Functions
@@ -109,8 +108,6 @@ void __k210_start(uint32_t mhartid)
showprogress('B');
- g_serial_ok = true;
-
/* Do board initialization */
k210_boardinitialize();
diff --git a/arch/risc-v/src/mpfs/mpfs_start.c b/arch/risc-v/src/mpfs/mpfs_start.c
index bf764d8..398659d 100755
--- a/arch/risc-v/src/mpfs/mpfs_start.c
+++ b/arch/risc-v/src/mpfs/mpfs_start.c
@@ -61,7 +61,6 @@
*/
uintptr_t g_idle_topstack = MPFS_IDLESTACK_TOP;
-volatile bool g_serial_ok = false;
/* Default boot address for every hart */
@@ -159,8 +158,6 @@ void __mpfs_start(uint32_t mhartid)
showprogress('B');
- g_serial_ok = true;
-
/* Do board initialization */
mpfs_boardinitialize();