From ecc1a2b02f7b827b71e48a3c885db508e8b84e6c Mon Sep 17 00:00:00 2001 From: sigsegv7 Date: Wed, 4 Oct 2023 14:47:49 -0400 Subject: kernel/amd64: Fix up BSP_KINFO logic Signed-off-by: sigsegv7 --- sys/arch/amd64/lapic.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'sys') diff --git a/sys/arch/amd64/lapic.c b/sys/arch/amd64/lapic.c index c020f19..b3809dd 100644 --- a/sys/arch/amd64/lapic.c +++ b/sys/arch/amd64/lapic.c @@ -38,16 +38,20 @@ #include #include +__naked void +__lapic_timer_isr(void); + /* * Only calls KINFO if we are the BSP. */ -#define BSP_KINFO(...) \ - uint64_t msr_val; \ - \ - msr_val = rdmsr(IA32_APIC_BASE_MSR); \ - if (__TEST(msr_val, 1 << 8)) { \ - KINFO(__VA_ARGS__); \ - } +#define BSP_KINFO(...) do { \ + uint64_t msr_val; \ + \ + msr_val = rdmsr(IA32_APIC_BASE_MSR); \ + if (__TEST(msr_val, 1 << 8)) { \ + KINFO(__VA_ARGS__); \ + } \ + } while (0); __MODULE_NAME("lapic"); __KERNEL_META("$Vega$: lapic.c, Ian Marco Moffett, " -- cgit v1.2.3