Browse Source

1 增加了bsp数据屏障接口函数 rt_hw_mb()
2 去除在secondary_cpu_c_start重复了的IPI handler的注册

shaojinchun 6 years ago
parent
commit
f5426f4a86

+ 6 - 0
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*/

+ 0 - 4
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();
 }
 

+ 2 - 0
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;