mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-06-01 07:18:22 -04:00
kern: wait 100us after synchronizing cores before saving interrupt state on sleep
This commit is contained in:
parent
f646d9c8f9
commit
3fbc59cce1
1 changed files with 8 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue