From 47e8552eba5c60b7a0cecdfe19037775f96d9db9 Mon Sep 17 00:00:00 2001 From: NAKAMURA Gou Date: Tue, 29 Sep 2015 19:01:43 +0900 Subject: [PATCH] move wait_icr_idle() before x86_issue_ipi() --- arch/x86/kernel/cpu.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/x86/kernel/cpu.c b/arch/x86/kernel/cpu.c index 8e61a149..ed2822b3 100644 --- a/arch/x86/kernel/cpu.c +++ b/arch/x86/kernel/cpu.c @@ -809,6 +809,13 @@ void int3_handler(struct x86_user_context *regs) check_need_resched(); } +static void wait_icr_idle(void) +{ + while (lapic_read(LAPIC_ICR0) & APIC_ICR_BUSY) { + cpu_pause(); + } +} + void x86_issue_ipi(unsigned int apicid, unsigned int low) { lapic_icr_write(apicid << LAPIC_ICR_ID_SHIFT, low); @@ -824,13 +831,6 @@ static void set_warm_reset_vector(unsigned long ip) x86_set_warm_reset(ip, first_page_va); } -static void wait_icr_idle(void) -{ - while (lapic_read(LAPIC_ICR0) & APIC_ICR_BUSY) { - cpu_pause(); - } -} - static void __x86_wakeup(int apicid, unsigned long ip) { int retry = 3;