Loading...
iokit/Kernel/IOInterruptController.cpp xnu-201.14 xnu-124.7
--- xnu/xnu-201.14/iokit/Kernel/IOInterruptController.cpp
+++ xnu/xnu-124.7/iokit/Kernel/IOInterruptController.cpp
@@ -244,17 +244,7 @@
   
   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;
       
@@ -564,8 +554,9 @@
   vector = &vectors[vectorNumber];
   
   if (vector->interruptDisabledSoft) {
+    vector->interruptDisabledSoft = 0;
+    
     interruptState = IOSimpleLockLockDisableInterrupt(controllerLock);
-    vector->interruptDisabledSoft = 0;
     vectorsEnabled++;
     IOSimpleLockUnlockEnableInterrupt(controllerLock, interruptState);
     
@@ -593,12 +584,13 @@
   vector = &vectors[vectorNumber];
   
   if (!vector->interruptDisabledSoft) {
-    interruptState = IOSimpleLockLockDisableInterrupt(controllerLock); 
     vector->interruptDisabledSoft = 1;
 #if __ppc__
     sync();
     isync();
 #endif
+    
+    interruptState = IOSimpleLockLockDisableInterrupt(controllerLock); 
     vectorsEnabled--;
     IOSimpleLockUnlockEnableInterrupt(controllerLock, interruptState);
   }