arch/x86: inline x2APIC EOI in 64-bit code

Like its 32-bit sibling, the 64-bit code should EOI inline rather than
invoking a function. Defeats the performance advantages of x2APIC.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
This commit is contained in:
Charles E. Youse 2019-09-16 15:46:53 -04:00 committed by Andrew Boie
commit bd094ddac2
2 changed files with 5 additions and 17 deletions

View file

@ -507,10 +507,12 @@ irq_dispatch:
movq x86_irq_args(,%rcx,8), %rdi movq x86_irq_args(,%rcx,8), %rdi
call *%rbx call *%rbx
#ifdef CONFIG_X2APIC
call z_x2apic_eoi
#else
xorl %eax, %eax 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) movl %eax, (CONFIG_LOAPIC_BASE_ADDRESS + LOAPIC_EOI)
#endif #endif

View file

@ -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; static u32_t loapic_device_power_state = DEVICE_PM_ACTIVE_STATE;
#endif #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 * @brief Initialize the Local APIC or xAPIC