cpu/x86/lapic: Add lapic_send_ipi_self,others()
This avoids unnecessary passing of APIC ID parameter and allows some minor optimisation for X2APIC mode. Change-Id: I0b0c8c39ecd13858cffc91cc781bea52decf67c5 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/60713 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
This commit is contained in:
@@ -143,6 +143,17 @@ static __always_inline unsigned int lapicid(void)
|
||||
return lapicid;
|
||||
}
|
||||
|
||||
static __always_inline void lapic_send_ipi_self(uint32_t icrlow)
|
||||
{
|
||||
/* LAPIC_DEST_SELF does not support all delivery mode -fields. */
|
||||
lapic_send_ipi(icrlow, lapicid());
|
||||
}
|
||||
|
||||
static __always_inline void lapic_send_ipi_others(uint32_t icrlow)
|
||||
{
|
||||
lapic_send_ipi(LAPIC_DEST_ALLBUT | icrlow, 0);
|
||||
}
|
||||
|
||||
#if !CONFIG(AP_IN_SIPI_WAIT)
|
||||
/* If we need to go back to sipi wait, we use the long non-inlined version of
|
||||
* this function in lapic_cpu_stop.c
|
||||
|
||||
Reference in New Issue
Block a user