未验证 提交 61f706b1 编写于 作者: B Bernard Xiong 提交者: GitHub

Merge pull request #2105 from RT-Thread/bsp_qemu_vexpress

[bsp][qemu-vexpress] code cleanup.
...@@ -117,7 +117,7 @@ rt_hw_context_switch: ...@@ -117,7 +117,7 @@ rt_hw_context_switch:
ldmfd sp!, {r0-r12, lr, pc}^ @ pop new task r0-r12, lr & pc, copy spsr to cpsr ldmfd sp!, {r0-r12, lr, pc}^ @ pop new task r0-r12, lr & pc, copy spsr to cpsr
/* /*
* void rt_hw_context_switch_interrupt(rt_uint32 from, rt_uint32 to); * void rt_hw_context_switch_interrupt(rt_ubase_t from, rt_ubase_t to);
*/ */
.equ Mode_USR, 0x10 .equ Mode_USR, 0x10
.equ Mode_FIQ, 0x11 .equ Mode_FIQ, 0x11
......
...@@ -60,14 +60,8 @@ void rt_hw_spin_unlock(rt_hw_spinlock_t *lock) ...@@ -60,14 +60,8 @@ void rt_hw_spin_unlock(rt_hw_spinlock_t *lock)
lock->tickets.owner++; lock->tickets.owner++;
__asm__ volatile ("dsb ishst\nsev":::"memory"); __asm__ volatile ("dsb ishst\nsev":::"memory");
} }
#endif /*RT_USING_SMP*/ #endif /*RT_USING_SMP*/
void idle_wfi(void)
{
asm volatile ("wfi");
}
/** /**
* @addtogroup ARM CPU * @addtogroup ARM CPU
*/ */
......
...@@ -25,9 +25,9 @@ struct rt_irq_desc isr_table[MAX_HANDLERS]; ...@@ -25,9 +25,9 @@ struct rt_irq_desc isr_table[MAX_HANDLERS];
#ifndef RT_USING_SMP #ifndef RT_USING_SMP
/* Those varibles will be accessed in ISR, so we need to share them. */ /* Those varibles will be accessed in ISR, so we need to share them. */
rt_uint32_t rt_interrupt_from_thread; rt_uint32_t rt_interrupt_from_thread = 0;
rt_uint32_t rt_interrupt_to_thread; rt_uint32_t rt_interrupt_to_thread = 0;
rt_uint32_t rt_thread_switch_interrupt_flag; rt_uint32_t rt_thread_switch_interrupt_flag = 0;
#endif #endif
const unsigned int VECTOR_BASE = 0x00; const unsigned int VECTOR_BASE = 0x00;
...@@ -59,13 +59,6 @@ void rt_hw_interrupt_init(void) ...@@ -59,13 +59,6 @@ void rt_hw_interrupt_init(void)
arm_gic_dist_init(0, gic_dist_base, 0); arm_gic_dist_init(0, gic_dist_base, 0);
arm_gic_cpu_init(0, gic_cpu_base); arm_gic_cpu_init(0, gic_cpu_base);
/* init interrupt nest, and context in thread sp */
#ifndef RT_USING_SMP
rt_interrupt_from_thread = 0;
rt_interrupt_to_thread = 0;
rt_thread_switch_interrupt_flag = 0;
#endif
} }
/** /**
......
...@@ -19,9 +19,13 @@ ...@@ -19,9 +19,13 @@
#define SYS_CTRL __REG32(REALVIEW_SCTL_BASE) #define SYS_CTRL __REG32(REALVIEW_SCTL_BASE)
extern void idle_wfi(void);
extern void rt_hw_ipi_handler_install(int ipi_vector, rt_isr_handler_t ipi_isr_handler); extern void rt_hw_ipi_handler_install(int ipi_vector, rt_isr_handler_t ipi_isr_handler);
void idle_wfi(void)
{
asm volatile ("wfi");
}
/** /**
* This function will initialize beaglebone board * This function will initialize beaglebone board
*/ */
...@@ -42,4 +46,3 @@ void rt_hw_board_init(void) ...@@ -42,4 +46,3 @@ void rt_hw_board_init(void)
rt_hw_ipi_handler_install(RT_SCHEDULE_IPI, rt_scheduler_ipi_handler); rt_hw_ipi_handler_install(RT_SCHEDULE_IPI, rt_scheduler_ipi_handler);
#endif #endif
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册