summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2021-06-06 16:58:19 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2021-06-10 17:47:59 +0000
commit242f1d962f24193499795106466923e1f78a4485 (patch)
tree1c1d7be30459dfc89523759905ae14b044c04c91 /src/include
parent0cfa9110b6d004777cca991771d74ed8dcf5c0e4 (diff)
cpu/x86/lapic: Do not inline some utility functions
They are not __always_inline and specially enable_lapic() will become more complex to support X2APIC state changes. Change-Id: Ic180fa8b36e419aba07e1754d4bf48c9dfddb2f3 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/55258 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Wonkyu Kim <wonkyu.kim@intel.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/cpu/x86/lapic.h37
1 files changed, 3 insertions, 34 deletions
diff --git a/src/include/cpu/x86/lapic.h b/src/include/cpu/x86/lapic.h
index cf048a883e..a3d0fcbf89 100644
--- a/src/include/cpu/x86/lapic.h
+++ b/src/include/cpu/x86/lapic.h
@@ -116,25 +116,6 @@ static __always_inline void lapic_wait_icr_idle(void)
do { } while (lapic_read(LAPIC_ICR) & LAPIC_ICR_BUSY);
}
-static inline void enable_lapic(void)
-{
- msr_t msr;
- msr = rdmsr(LAPIC_BASE_MSR);
- msr.hi &= 0xffffff00;
- msr.lo &= ~LAPIC_BASE_MSR_ADDR_MASK;
- msr.lo |= LAPIC_DEFAULT_BASE;
- msr.lo |= LAPIC_BASE_MSR_ENABLE;
- wrmsr(LAPIC_BASE_MSR, msr);
-}
-
-static inline void disable_lapic(void)
-{
- msr_t msr;
- msr = rdmsr(LAPIC_BASE_MSR);
- msr.lo &= ~LAPIC_BASE_MSR_ENABLE;
- wrmsr(LAPIC_BASE_MSR, msr);
-}
-
static __always_inline unsigned int initial_lapicid(void)
{
uint32_t lapicid;
@@ -168,20 +149,8 @@ static __always_inline void stop_this_cpu(void)
void stop_this_cpu(void);
#endif
-void lapic_virtual_wire_mode_init(void);
-
-/* See if I need to initialize the local APIC */
-static inline int need_lapic_init(void)
-{
- return CONFIG(SMP) || CONFIG(IOAPIC);
-}
-
-static inline void setup_lapic(void)
-{
- if (need_lapic_init())
- lapic_virtual_wire_mode_init();
- else
- disable_lapic();
-}
+void enable_lapic(void);
+void disable_lapic(void);
+void setup_lapic(void);
#endif /* CPU_X86_LAPIC_H */