kernel/eka/memmodel/epoc/mmubase/mmubase.cpp
branchRCL_3
changeset 26 c734af59ce98
parent 22 2f92ad2dc5db
child 28 5b5d147c7838
--- a/kernel/eka/memmodel/epoc/mmubase/mmubase.cpp	Tue Apr 27 18:02:57 2010 +0300
+++ b/kernel/eka/memmodel/epoc/mmubase/mmubase.cpp	Tue May 11 17:28:22 2010 +0300
@@ -483,7 +483,7 @@
 TInt MmuBase::AllocPhysicalRam(TInt aSize, TPhysAddr& aPhysAddr, TInt aAlign)
 	{
 	__KTRACE_OPT(KMMU,Kern::Printf("Mmu::AllocPhysicalRam() size=%x align=%d",aSize,aAlign));
-	TInt r=AllocContiguousRam(aSize, aPhysAddr, EPageFixed, aAlign);
+	TInt r=AllocContiguousRam(aSize, aPhysAddr, aAlign);
 	if (r!=KErrNone)
 		{
 		iAllocFailed=ETrue;
@@ -516,7 +516,7 @@
 TInt MmuBase::ZoneAllocPhysicalRam(TUint* aZoneIdList, TUint aZoneIdCount, TInt aSize, TPhysAddr& aPhysAddr, TInt aAlign)
 	{
 	__KTRACE_OPT(KMMU,Kern::Printf("Mmu::ZoneAllocPhysicalRam() size=0x%x align=%d", aSize, aAlign));
-	TInt r = ZoneAllocContiguousRam(aZoneIdList, aZoneIdCount, aSize, aPhysAddr, EPageFixed, aAlign);
+	TInt r = ZoneAllocContiguousRam(aZoneIdList, aZoneIdCount, aSize, aPhysAddr, aAlign);
 	if (r!=KErrNone)
 		{
 		iAllocFailed=ETrue;
@@ -714,20 +714,19 @@
 	}
 
 
-TInt MmuBase::AllocContiguousRam(TInt aSize, TPhysAddr& aPhysAddr, TZonePageType aPageType, TInt aAlign, TUint aBlockedZoneId, TBool aBlockRest)
+TInt MmuBase::AllocContiguousRam(TInt aSize, TPhysAddr& aPhysAddr, TInt aAlign)
 	{
 #ifdef _DEBUG
 	if(K::CheckForSimulatedAllocFail())
 		return KErrNoMemory;
 #endif
-	__NK_ASSERT_DEBUG(aPageType == EPageFixed);
 	TUint contigPages = (aSize + KPageSize - 1) >> KPageShift;
-	TInt r = iRamPageAllocator->AllocContiguousRam(contigPages, aPhysAddr, aPageType, aAlign, aBlockedZoneId, aBlockRest);
+	TInt r = iRamPageAllocator->AllocContiguousRam(contigPages, aPhysAddr, aAlign);
 	if (r == KErrNoMemory && contigPages > KMaxFreeableContiguousPages)
 		{// Allocation failed but as this is a large allocation flush the RAM cache 
 		// and reattempt the allocation as large allocation wouldn't discard pages.
 		iRamCache->FlushAll();
-		r = iRamPageAllocator->AllocContiguousRam(contigPages, aPhysAddr, aPageType, aAlign, aBlockedZoneId, aBlockRest);
+		r = iRamPageAllocator->AllocContiguousRam(contigPages, aPhysAddr, aAlign);
 		}
 	return r;
 	}
@@ -739,16 +738,15 @@
 @param aZoneIdCount	The number of IDs listed in aZoneIdList
 @param aSize		The number of bytes to allocate
 @param aPhysAddr 	Will receive the physical base address of the allocated RAM
-@param aPageType 	The type of the pages being allocated
 @param aAlign 		The log base 2 alginment required
 */
-TInt MmuBase::ZoneAllocContiguousRam(TUint* aZoneIdList, TUint aZoneIdCount, TInt aSize, TPhysAddr& aPhysAddr, TZonePageType aPageType, TInt aAlign)
+TInt MmuBase::ZoneAllocContiguousRam(TUint* aZoneIdList, TUint aZoneIdCount, TInt aSize, TPhysAddr& aPhysAddr, TInt aAlign)
 	{
 #ifdef _DEBUG
 	if(K::CheckForSimulatedAllocFail())
 		return KErrNoMemory;
 #endif
-	return iRamPageAllocator->ZoneAllocContiguousRam(aZoneIdList, aZoneIdCount, aSize, aPhysAddr, aPageType, aAlign);
+	return iRamPageAllocator->ZoneAllocContiguousRam(aZoneIdList, aZoneIdCount, aSize, aPhysAddr, aAlign);
 	}
 
 SPageInfo* SPageInfo::SafeFromPhysAddr(TPhysAddr aAddress)
@@ -5225,6 +5223,12 @@
 
 // Misc DPagingDevice methods
 
+EXPORT_C NFastMutex* DPagingDevice::NotificationLock()
+	{
+	// use the system lock
+	return &TheScheduler.iLock;
+	}
+
 EXPORT_C void DPagingDevice::NotifyIdle()
 	{
 	// Not used on this memory model