From 6a223c621086c720eba18f73c3d29c8c600a29d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Holz?= Date: Thu, 22 Feb 2024 19:40:38 +0100 Subject: [PATCH] Kernel/riscv64: Set g_total_processors to a hard-coded value of 1 This value is used by the NVMe driver to determine the number of queues to create. --- Kernel/Arch/riscv64/Processor.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Kernel/Arch/riscv64/Processor.cpp b/Kernel/Arch/riscv64/Processor.cpp index 5b18e086557..eaf5ec570a9 100644 --- a/Kernel/Arch/riscv64/Processor.cpp +++ b/Kernel/Arch/riscv64/Processor.cpp @@ -113,6 +113,9 @@ void ProcessorBase::initialize(u32) { m_deferred_call_pool.init(); + // FIXME: Actually set the correct count when we support SMP on riscv64. + g_total_processors.store(1, AK::MemoryOrder::memory_order_release); + // Enable the FPU auto sstatus = RISCV64::CSR::SSTATUS::read(); sstatus.FS = RISCV64::CSR::SSTATUS::FloatingPointStatus::Initial;