kern: wait 100us after synchronizing cores before saving interrupt state on sleep

This commit is contained in:
Michael Scire authored and Christoph Baumann committed 2025-06-14 21:06:09 +02:00
1 parent 50956fce6f
commit 8665036092
1 file changed
+8
@@ -524,6 +524,14 @@ namespace ams::kern::board::nintendo::nx {
/* Ensure that all cores get to this point before continuing. */
cpu::SynchronizeAllCores();
/* Wait 100us before continuing. */
{
const s64 timeout = KHardwareTimer::GetTick() + ams::svc::Tick(TimeSpan::FromMicroSeconds(100));
while (KHardwareTimer::GetTick() < timeout) {
__asm__ __volatile__("" ::: "memory");
}
}
/* Save the interrupt manager's state. */
Kernel::GetInterruptManager().Save(core_id);