diff --git a/arch/x86/core/intel64/locore.S b/arch/x86/core/intel64/locore.S index 6074a3c3658..2783afe3231 100644 --- a/arch/x86/core/intel64/locore.S +++ b/arch/x86/core/intel64/locore.S @@ -507,10 +507,12 @@ irq_dispatch: movq x86_irq_args(,%rcx,8), %rdi call *%rbx -#ifdef CONFIG_X2APIC - call z_x2apic_eoi -#else xorl %eax, %eax +#ifdef CONFIG_X2APIC + xorl %edx, %edx + movl $(X86_X2APIC_BASE_MSR + (LOAPIC_EOI >> 4)), %ecx + wrmsr +#else /* xAPIC */ movl %eax, (CONFIG_LOAPIC_BASE_ADDRESS + LOAPIC_EOI) #endif diff --git a/drivers/interrupt_controller/loapic_intr.c b/drivers/interrupt_controller/loapic_intr.c index 069d7486a3a..8791ae1f2af 100644 --- a/drivers/interrupt_controller/loapic_intr.c +++ b/drivers/interrupt_controller/loapic_intr.c @@ -65,20 +65,6 @@ u32_t loapic_suspend_buf[LOPIC_SUSPEND_BITS_REQD / 32] = {0}; static u32_t loapic_device_power_state = DEVICE_PM_ACTIVE_STATE; #endif -/* - * this should not be a function at all, really, it should be - * hand-coded in include/drivers/sysapic.h. but for now it remains - * a function, just moved here from drivers/timer/loapic_timer.c - * where it REALLY didn't belong. - */ - -#ifdef CONFIG_X2APIC -void z_x2apic_eoi(void) -{ - x86_write_x2apic(LOAPIC_EOI, 0); -} -#endif - /** * * @brief Initialize the Local APIC or xAPIC