From 43b209666f67b63b784d44b8551f09b33746b2c4 Mon Sep 17 00:00:00 2001 From: Matheus Date: Mon, 29 Apr 2024 21:26:13 -0300 Subject: [PATCH] mmu: don't do tlb shootdowns if no other cpus are online --- kernel-src/arch/x86-64/mmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel-src/arch/x86-64/mmu.c b/kernel-src/arch/x86-64/mmu.c index ab3ee3d5..52b244cf 100644 --- a/kernel-src/arch/x86-64/mmu.c +++ b/kernel-src/arch/x86-64/mmu.c @@ -200,8 +200,8 @@ void arch_mmu_tlbipi(isr_t *isr, context_t *context) { } void arch_mmu_tlbshootdown(void *page) { - // scheduler not up yet, nothing to do - if (_cpu()->thread == NULL) + // scheduler not up yet, or there are no other cpus, nothing to do + if (_cpu()->thread == NULL || arch_smp_cpusawake == 1) return; if (page >= KERNELSPACE_START ||