Author: sginsberg
Date: Mon Nov 2 23:54:02 2009
New Revision: 43929
URL:
http://svn.reactos.org/svn/reactos?rev=43929&view=rev
Log:
- There is no reason to use the Kf* routines for IRQL and Spinlocks directly in HAL --
they are defined to the Kf* versions on x86 anyway, so use the Ke* equivalents
exclusively.
Modified:
trunk/reactos/hal/halx86/generic/bus/pcibus.c
trunk/reactos/hal/halx86/generic/dma.c
Modified: trunk/reactos/hal/halx86/generic/bus/pcibus.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/bus/pci…
==============================================================================
--- trunk/reactos/hal/halx86/generic/bus/pcibus.c [iso-8859-1] (original)
+++ trunk/reactos/hal/halx86/generic/bus/pcibus.c [iso-8859-1] Mon Nov 2 23:54:02 2009
@@ -125,7 +125,7 @@
PciCfg1->u.bits.Enable = TRUE;
/* Acquire the lock */
- *Irql = KfRaiseIrql(HIGH_LEVEL);
+ KeRaiseIrql(HIGH_LEVEL, Irql);
KiAcquireSpinLock(&HalpPCIConfigLock);
}
@@ -143,7 +143,7 @@
/* Release the lock */
KiReleaseSpinLock(&HalpPCIConfigLock);
- KfLowerIrql(Irql);
+ KeLowerIrql(Irql);
}
TYPE1_READ(HalpPCIReadUcharType1, UCHAR)
@@ -171,7 +171,7 @@
PciCfg->u.bits.AddressBase = (USHORT)BusData->Config.Type2.Base;
/* Acquire the lock */
- *Irql = KfRaiseIrql(HIGH_LEVEL);
+ KeRaiseIrql(HIGH_LEVEL, Irql);
KiAcquireSpinLock(&HalpPCIConfigLock);
/* Setup the CSE Register */
@@ -201,7 +201,7 @@
/* Release the lock */
KiReleaseSpinLock(&HalpPCIConfigLock);
- KfLowerIrql(Irql);
+ KeLowerIrql(Irql);
}
TYPE2_READ(HalpPCIReadUcharType2, UCHAR)
Modified: trunk/reactos/hal/halx86/generic/dma.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/dma.c?r…
==============================================================================
--- trunk/reactos/hal/halx86/generic/dma.c [iso-8859-1] (original)
+++ trunk/reactos/hal/halx86/generic/dma.c [iso-8859-1] Mon Nov 2 23:54:02 2009
@@ -251,7 +251,7 @@
* to prevent corruption.
*/
- OldIrql = KfAcquireSpinLock(&AdapterObject->SpinLock);
+ KeAcquireSpinLock(&AdapterObject->SpinLock, &OldIrql);
/*
* Setup map register entries for the buffer allocated. Each entry has
@@ -315,7 +315,7 @@
while (MapRegisterCount != 0);
}
- KfReleaseSpinLock(&AdapterObject->SpinLock, OldIrql);
+ KeReleaseSpinLock(&AdapterObject->SpinLock, OldIrql);
return TRUE;
}
@@ -1125,7 +1125,7 @@
* PASSIVE_LEVEL and calling the ExecutionRoutine.
*/
- OldIrql = KfAcquireSpinLock(&MasterAdapter->SpinLock);
+ KeAcquireSpinLock(&MasterAdapter->SpinLock, &OldIrql);
if (IsListEmpty(&MasterAdapter->AdapterQueue))
{
@@ -1151,7 +1151,7 @@
NonPagedPool, sizeof(GROW_WORK_ITEM), TAG_DMA);
if (WorkItem == NULL)
{
- KfReleaseSpinLock(&MasterAdapter->SpinLock, OldIrql);
+ KeReleaseSpinLock(&MasterAdapter->SpinLock, OldIrql);
AdapterObject->NumberOfMapRegisters = 0;
IoFreeAdapterChannel(AdapterObject);
return STATUS_INSUFFICIENT_RESOURCES;
@@ -1166,12 +1166,12 @@
ExQueueWorkItem(&WorkItem->WorkQueueItem, DelayedWorkQueue);
- KfReleaseSpinLock(&MasterAdapter->SpinLock, OldIrql);
+ KeReleaseSpinLock(&MasterAdapter->SpinLock, OldIrql);
return STATUS_SUCCESS;
}
- KfReleaseSpinLock(&MasterAdapter->SpinLock, OldIrql);
+ KeReleaseSpinLock(&MasterAdapter->SpinLock, OldIrql);
}
else
{
@@ -1282,7 +1282,7 @@
if (WaitContextBlock->NumberOfMapRegisters &&
AdapterObject->MasterAdapter)
{
- OldIrql = KfAcquireSpinLock(&MasterAdapter->SpinLock);
+ KeAcquireSpinLock(&MasterAdapter->SpinLock, &OldIrql);
if (IsListEmpty(&MasterAdapter->AdapterQueue))
{
@@ -1306,11 +1306,11 @@
if (Index == MAXULONG)
{
InsertTailList(&MasterAdapter->AdapterQueue,
&AdapterObject->AdapterQueue);
- KfReleaseSpinLock(&MasterAdapter->SpinLock, OldIrql);
+ KeReleaseSpinLock(&MasterAdapter->SpinLock, OldIrql);
break;
}
- KfReleaseSpinLock(&MasterAdapter->SpinLock, OldIrql);
+ KeReleaseSpinLock(&MasterAdapter->SpinLock, OldIrql);
}
else
{
@@ -1378,7 +1378,7 @@
if (MasterAdapter == NULL || MapRegisterBase == NULL)
return;
- OldIrql = KfAcquireSpinLock(&MasterAdapter->SpinLock);
+ KeAcquireSpinLock(&MasterAdapter->SpinLock, &OldIrql);
if (NumberOfMapRegisters != 0)
{
@@ -1412,7 +1412,7 @@
break;
}
- KfReleaseSpinLock(&MasterAdapter->SpinLock, OldIrql);
+ KeReleaseSpinLock(&MasterAdapter->SpinLock, OldIrql);
AdapterObject->MapRegisterBase =
MasterAdapter->MapRegisterBase + Index;
@@ -1439,12 +1439,12 @@
case DeallocateObject:
if (AdapterObject->NumberOfMapRegisters)
{
- OldIrql = KfAcquireSpinLock(&MasterAdapter->SpinLock);
+ KeAcquireSpinLock(&MasterAdapter->SpinLock, &OldIrql);
RtlClearBits(MasterAdapter->MapRegisters,
AdapterObject->MapRegisterBase -
MasterAdapter->MapRegisterBase,
AdapterObject->NumberOfMapRegisters);
- KfReleaseSpinLock(&MasterAdapter->SpinLock, OldIrql);
+ KeReleaseSpinLock(&MasterAdapter->SpinLock, OldIrql);
}
IoFreeAdapterChannel(AdapterObject);
break;
@@ -1453,10 +1453,10 @@
break;
}
- OldIrql = KfAcquireSpinLock(&MasterAdapter->SpinLock);
- }
-
- KfReleaseSpinLock(&MasterAdapter->SpinLock, OldIrql);
+ KeAcquireSpinLock(&MasterAdapter->SpinLock, &OldIrql);
+ }
+
+ KeReleaseSpinLock(&MasterAdapter->SpinLock, OldIrql);
}
/**
@@ -1865,7 +1865,7 @@
TransferOffset >>= 1;
}
- OldIrql = KfAcquireSpinLock(&AdapterObject->MasterAdapter->SpinLock);
+ KeAcquireSpinLock(&AdapterObject->MasterAdapter->SpinLock,
&OldIrql);
if (AdapterObject->AdapterNumber == 1)
{
@@ -1932,7 +1932,7 @@
AdapterObject->ChannelNumber | DMA_CLEARMASK);
}
- KfReleaseSpinLock(&AdapterObject->MasterAdapter->SpinLock, OldIrql);
+ KeReleaseSpinLock(&AdapterObject->MasterAdapter->SpinLock, OldIrql);
}
/*