summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2021-05-31 14:41:15 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2021-10-18 04:50:43 +0000
commitb31b033ccc50a2f5c609f5fd2cbfda588994b518 (patch)
tree98ea1170df4ebef18409b92bec5f48a8308d9258 /src/include
parent253c356c2bca2a9552a42ea4dd38c71a639877a4 (diff)
cpu/x86/lapic: Drop xapic_write_atomic()
Remove code, which was only needed for B and C2 stepping of P54C. The linux kernel source has commentary on X86_BUG_11AP: * See if we have a good local APIC by checking for buggy Pentia, * i.e. all B steppings and the C2 stepping of P54C when using their * integrated APIC (see 11AP erratum in "Pentium Processor * Specification Update") Change-Id: Iec10335f603674bcef2e7494831cf11200795d38 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/55199 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/cpu/x86/lapic.h17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/include/cpu/x86/lapic.h b/src/include/cpu/x86/lapic.h
index 4fbae88ca5..05d096e318 100644
--- a/src/include/cpu/x86/lapic.h
+++ b/src/include/cpu/x86/lapic.h
@@ -18,21 +18,10 @@ static __always_inline void xapic_write(unsigned int reg, uint32_t v)
write32((volatile void *)(uintptr_t)(LAPIC_DEFAULT_BASE + reg), v);
}
-static inline void xapic_write_atomic(unsigned long reg, uint32_t v)
-{
- volatile uint32_t *ptr;
-
- ptr = (volatile uint32_t *)(LAPIC_DEFAULT_BASE + reg);
-
- asm volatile ("xchgl %0, %1\n"
- : "+r" (v), "+m" (*(ptr))
- : : "memory", "cc");
-}
-
static __always_inline void xapic_send_ipi(uint32_t icrlow, uint32_t apicid)
{
- xapic_write_atomic(LAPIC_ICR2, SET_LAPIC_DEST_FIELD(apicid));
- xapic_write_atomic(LAPIC_ICR, icrlow);
+ xapic_write(LAPIC_ICR2, SET_LAPIC_DEST_FIELD(apicid));
+ xapic_write(LAPIC_ICR, icrlow);
}
static __always_inline int xapic_busy(void)
@@ -114,7 +103,7 @@ static __always_inline void lapic_update32(unsigned int reg, uint32_t mask, uint
value = xapic_read(reg);
value &= mask;
value |= or;
- xapic_write_atomic(reg, value);
+ xapic_write(reg, value);
}
}