Skip to content

Commit daab26d

Browse files
committed
[libcpu-riscv]: [surpport SMP]: Add dynamic startup based on core configuration.
Fix issues with non-standard formatting Signed-off-by: Mengchen Teng <[email protected]>
1 parent 7a770ce commit daab26d

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

bsp/qemu-virt64-riscv/driver/board.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ void rt_hw_board_init(void)
8888
#endif /* RT_USING_CONSOLE */
8989

9090
rt_hw_tick_init();
91-
91+
9292
#ifdef RT_USING_SMP
9393
/* ipi init */
9494
rt_hw_ipi_init();

libcpu/risc-v/common64/cpuport.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ void rt_hw_context_switch_interrupt(rt_ubase_t from, rt_ubase_t to, rt_thread_t
126126
}
127127
#else
128128
void rt_hw_context_switch_interrupt(void *context, rt_ubase_t from, rt_ubase_t to, struct rt_thread *to_thread)
129-
{
129+
{
130130
/* Perform architecture-specific context switch. This call will
131131
* restore the target thread context and should not return when a
132132
* switch is performed. The caller (scheduler) invoked this function
@@ -188,7 +188,7 @@ void secondary_cpu_entry(void)
188188
/* The PLIC peripheral interrupts are currently handled by the boot_hart. */
189189
/* Enable the Supervisor-Timer bit in SIE */
190190
rt_hw_tick_init();
191-
191+
192192
#ifdef RT_USING_SMP
193193
/* ipi init */
194194
rt_hw_ipi_init();

libcpu/risc-v/virt64/interrupt.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ void rt_hw_spin_lock(rt_hw_spinlock_t *lock)
146146
if (owner == ticket)
147147
break;
148148
/* TODO: low-power wait for interrupt while spinning */
149-
// __asm__ volatile("wfi" ::: "memory");
150149
}
151150

152151
/* Ensure all following memory accesses are ordered after acquiring the lock */

0 commit comments

Comments
 (0)