Loading...
--- xnu/xnu-124.13/iokit/Kernel/IOInterruptController.cpp
+++ xnu/xnu-201.19/iokit/Kernel/IOInterruptController.cpp
@@ -244,7 +244,17 @@
if (vector->interruptDisabledSoft) {
vector->interruptDisabledSoft = 0;
+#if __ppc__
+ sync();
+ isync();
+#endif
+ if (!getPlatform()->atInterruptLevel()) {
+ while (vector->interruptActive);
+#if __ppc__
+ isync();
+#endif
+ }
if (vector->interruptDisabledHard) {
vector->interruptDisabledHard = 0;
@@ -554,9 +564,8 @@
vector = &vectors[vectorNumber];
if (vector->interruptDisabledSoft) {
+ interruptState = IOSimpleLockLockDisableInterrupt(controllerLock);
vector->interruptDisabledSoft = 0;
-
- interruptState = IOSimpleLockLockDisableInterrupt(controllerLock);
vectorsEnabled++;
IOSimpleLockUnlockEnableInterrupt(controllerLock, interruptState);
@@ -584,13 +593,12 @@
vector = &vectors[vectorNumber];
if (!vector->interruptDisabledSoft) {
+ interruptState = IOSimpleLockLockDisableInterrupt(controllerLock);
vector->interruptDisabledSoft = 1;
#if __ppc__
sync();
isync();
#endif
-
- interruptState = IOSimpleLockLockDisableInterrupt(controllerLock);
vectorsEnabled--;
IOSimpleLockUnlockEnableInterrupt(controllerLock, interruptState);
}