kern: use KLightLock for KCoreBarrierInterruptHandler

This commit is contained in:
Michael Scire 2025-05-28 10:44:31 -07:00
parent 69cc653e7f
commit f646d9c8f9

View file

@ -112,7 +112,7 @@ namespace ams::kern::arch::arm64::cpu {
class KCoreBarrierInterruptHandler : public KInterruptHandler { class KCoreBarrierInterruptHandler : public KInterruptHandler {
private: private:
util::Atomic<u64> m_target_cores; util::Atomic<u64> m_target_cores;
KSpinLock m_lock; KLightLock m_lock;
public: public:
constexpr KCoreBarrierInterruptHandler() : KInterruptHandler(), m_target_cores(0), m_lock() { /* ... */ } constexpr KCoreBarrierInterruptHandler() : KInterruptHandler(), m_target_cores(0), m_lock() { /* ... */ }
@ -123,11 +123,8 @@ namespace ams::kern::arch::arm64::cpu {
} }
void SynchronizeCores(u64 core_mask) { void SynchronizeCores(u64 core_mask) {
/* Disable dispatch while we synchronize. */
KScopedDisableDispatch dd;
/* Acquire exclusive access to ourselves. */ /* Acquire exclusive access to ourselves. */
KScopedSpinLock lk(m_lock); KScopedLightLock lk(m_lock);
/* If necessary, force synchronization with other cores. */ /* If necessary, force synchronization with other cores. */
if (const u64 other_cores_mask = core_mask & ~(1ul << GetCurrentCoreId()); other_cores_mask != 0) { if (const u64 other_cores_mask = core_mask & ~(1ul << GetCurrentCoreId()); other_cores_mask != 0) {