From 0c1158b15d8874f0c24a65245aabd1c6dca9d8c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Mon, 3 Jan 2022 14:54:27 +0200 Subject: [PATCH] cpu/x86/lapic: Unify some parameter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I790fddea747f5db0536159e6c2ac90ea1da2830e Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/60712 Tested-by: build bot (Jenkins) Reviewed-by: Arthur Heymans --- src/include/cpu/x86/lapic.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/include/cpu/x86/lapic.h b/src/include/cpu/x86/lapic.h index af0793b7b8..779799ecf4 100644 --- a/src/include/cpu/x86/lapic.h +++ b/src/include/cpu/x86/lapic.h @@ -18,9 +18,9 @@ static __always_inline void xapic_write(unsigned int reg, uint32_t v) write32((volatile void *)(uintptr_t)(LAPIC_DEFAULT_BASE + reg), v); } -static __always_inline void xapic_send_ipi(uint32_t icrlow, uint32_t apicid) +static __always_inline void xapic_send_ipi(uint32_t icrlow, uint32_t icrhi) { - xapic_write(LAPIC_ICR2, SET_LAPIC_DEST_FIELD(apicid)); + xapic_write(LAPIC_ICR2, icrhi); xapic_write(LAPIC_ICR, icrlow); } @@ -51,10 +51,10 @@ static __always_inline void x2apic_write(unsigned int reg, uint32_t v) wrmsr(index, msr); } -static __always_inline void x2apic_send_ipi(uint32_t icrlow, uint32_t apicid) +static __always_inline void x2apic_send_ipi(uint32_t icrlow, uint32_t icrhi) { msr_t icr; - icr.hi = apicid; + icr.hi = icrhi; icr.lo = icrlow; wrmsr(X2APIC_MSR_ICR_ADDRESS, icr); } @@ -112,7 +112,7 @@ static __always_inline void lapic_send_ipi(uint32_t icrlow, uint32_t apicid) if (is_x2apic_mode()) x2apic_send_ipi(icrlow, apicid); else - xapic_send_ipi(icrlow, apicid); + xapic_send_ipi(icrlow, SET_LAPIC_DEST_FIELD(apicid)); } static __always_inline int lapic_busy(void)