From f5426f4a860aa7b16827aea1dd611fbd49d1f90c Mon Sep 17 00:00:00 2001 From: shaojinchun Date: Thu, 13 Dec 2018 09:49:15 +0800 Subject: [PATCH] =?UTF-8?q?1=20=E5=A2=9E=E5=8A=A0=E4=BA=86bsp=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=B1=8F=E9=9A=9C=E6=8E=A5=E5=8F=A3=E5=87=BD=E6=95=B0?= =?UTF-8?q?=20rt=5Fhw=5Fmb()=202=20=E5=8E=BB=E9=99=A4=E5=9C=A8secondary=5F?= =?UTF-8?q?cpu=5Fc=5Fstart=E9=87=8D=E5=A4=8D=E4=BA=86=E7=9A=84IPI=20handle?= =?UTF-8?q?r=E7=9A=84=E6=B3=A8=E5=86=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bsp/qemu-vexpress-a9/drivers/board.c | 6 ++++++ bsp/qemu-vexpress-a9/drivers/secondary_cpu.c | 4 ---- include/rthw.h | 2 ++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/bsp/qemu-vexpress-a9/drivers/board.c b/bsp/qemu-vexpress-a9/drivers/board.c index 26aad5bda1..7daa881c35 100644 --- a/bsp/qemu-vexpress-a9/drivers/board.c +++ b/bsp/qemu-vexpress-a9/drivers/board.c @@ -82,4 +82,10 @@ void rt_hw_spin_unlock(rt_hw_spinlock_t *lock) lock->tickets.owner++; __asm__ volatile ("dsb ishst\nsev":::"memory"); } + +void rt_hw_mb(void) +{ + __asm__ volatile ("dmb":::"memory"); +} + #endif /*RT_USING_SMP*/ diff --git a/bsp/qemu-vexpress-a9/drivers/secondary_cpu.c b/bsp/qemu-vexpress-a9/drivers/secondary_cpu.c index b8b5436929..29bb9ec895 100644 --- a/bsp/qemu-vexpress-a9/drivers/secondary_cpu.c +++ b/bsp/qemu-vexpress-a9/drivers/secondary_cpu.c @@ -46,10 +46,6 @@ void secondary_cpu_c_start(void) rt_hw_interrupt_install(IRQ_PBA8_TIMER0_1, rt_hw_timer2_isr, RT_NULL, "tick"); rt_hw_interrupt_umask(IRQ_PBA8_TIMER0_1); - /* install IPI interrupt */ - rt_hw_interrupt_install(RT_SCHEDULE_IPI_IRQ, rt_scheduler_ipi_handler, RT_NULL, "ipi"); - rt_hw_interrupt_umask(RT_SCHEDULE_IPI_IRQ); - rt_system_scheduler_start(); } diff --git a/include/rthw.h b/include/rthw.h index dee10b0bee..8c731e6c53 100644 --- a/include/rthw.h +++ b/include/rthw.h @@ -146,6 +146,8 @@ typedef union { void rt_hw_spin_lock(rt_hw_spinlock_t *lock); void rt_hw_spin_unlock(rt_hw_spinlock_t *lock); +void rt_hw_mb(void); + int rt_hw_cpu_id(void); extern rt_hw_spinlock_t _cpus_lock; -- GitLab