From f646d9c8f9d955b6f9323225beeeadd11eaeb788 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Wed, 28 May 2025 10:44:31 -0700 Subject: [PATCH] kern: use KLightLock for KCoreBarrierInterruptHandler --- libraries/libmesosphere/source/arch/arm64/kern_cpu.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/libraries/libmesosphere/source/arch/arm64/kern_cpu.cpp b/libraries/libmesosphere/source/arch/arm64/kern_cpu.cpp index 657af7f52..401a4d4d7 100644 --- a/libraries/libmesosphere/source/arch/arm64/kern_cpu.cpp +++ b/libraries/libmesosphere/source/arch/arm64/kern_cpu.cpp @@ -112,7 +112,7 @@ namespace ams::kern::arch::arm64::cpu { class KCoreBarrierInterruptHandler : public KInterruptHandler { private: util::Atomic m_target_cores; - KSpinLock m_lock; + KLightLock m_lock; public: constexpr KCoreBarrierInterruptHandler() : KInterruptHandler(), m_target_cores(0), m_lock() { /* ... */ } @@ -123,11 +123,8 @@ namespace ams::kern::arch::arm64::cpu { } void SynchronizeCores(u64 core_mask) { - /* Disable dispatch while we synchronize. */ - KScopedDisableDispatch dd; - /* Acquire exclusive access to ourselves. */ - KScopedSpinLock lk(m_lock); + KScopedLightLock lk(m_lock); /* If necessary, force synchronization with other cores. */ if (const u64 other_cores_mask = core_mask & ~(1ul << GetCurrentCoreId()); other_cores_mask != 0) {