- Revert hack.

svn path=/trunk/; revision=56237
This commit is contained in:
Stefan Ginsberg 2012-03-26 14:51:03 +00:00
parent 6539718c1d
commit 18748efb4b

View file

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