- Revert hack.
authorStefan Ginsberg <stefanginsberg@gmail.com>
Mon, 26 Mar 2012 14:51:03 +0000 (14:51 +0000)
committerStefan Ginsberg <stefanginsberg@gmail.com>
Mon, 26 Mar 2012 14:51:03 +0000 (14:51 +0000)
svn path=/trunk/; revision=56237

reactos/hal/halx86/up/pic.c

index 186548c..8c9a237 100644 (file)
@@ -666,29 +666,25 @@ KfLowerIrql(IN KIRQL OldIrql)
     /* Set old IRQL */
     Pcr->Irql = OldIrql;
 
-    /* Make sure interrupts were enabled */
-    if (EFlags & EFLAGS_INTERRUPT_MASK)
+    /* Check for pending software interrupts and compare with current IRQL */
+    PendingIrqlMask = Pcr->IRR & FindHigherIrqlMask[OldIrql];
+    if (PendingIrqlMask)
     {
-        /* Check for pending software interrupts and compare with current IRQL */
-        PendingIrqlMask = Pcr->IRR & FindHigherIrqlMask[OldIrql];
-        if (PendingIrqlMask)
+        /* Check if pending IRQL affects hardware state */
+        BitScanReverse(&PendingIrql, PendingIrqlMask);
+        if (PendingIrql > DISPATCH_LEVEL)
         {
-            /* Check if pending IRQL affects hardware state */
-            BitScanReverse(&PendingIrql, PendingIrqlMask);
-            if (PendingIrql > DISPATCH_LEVEL)
-            {
-                /* Set new PIC mask */
-                Mask.Both = Pcr->IDR & 0xFFFF;
-                __outbyte(PIC1_DATA_PORT, Mask.Master);
-                __outbyte(PIC2_DATA_PORT, Mask.Slave);
-
-                /* Clear IRR bit */
-                Pcr->IRR ^= (1 << PendingIrql);
-            }
+            /* Set new PIC mask */
+            Mask.Both = Pcr->IDR & 0xFFFF;
+            __outbyte(PIC1_DATA_PORT, Mask.Master);
+            __outbyte(PIC2_DATA_PORT, Mask.Slave);
 
-            /* Now handle pending interrupt */
-            SWInterruptHandlerTable[PendingIrql]();
+            /* Clear IRR bit */
+            Pcr->IRR ^= (1 << PendingIrql);
         }
+
+        /* Now handle pending interrupt */
+        SWInterruptHandlerTable[PendingIrql]();
     }
 
     /* Restore interrupt state */