Revert last change

svn path=/trunk/; revision=4929
This commit is contained in:
Gé van Geldorp 2003-06-19 19:01:01 +00:00
parent 9ad6e7c184
commit 3be996ffc4
9 changed files with 25 additions and 30 deletions

View file

@ -234,8 +234,7 @@ MmDeleteVirtualMapping(struct _EPROCESS* Process,
PVOID Address,
BOOL FreePage,
BOOL* WasDirty,
PHYSICAL_ADDRESS* PhysicalPage,
BOOL MarkPageUnmapped);
PHYSICAL_ADDRESS* PhysicalPage);
VOID MmUpdateStackPageDir(PULONG LocalPageDir, struct _KTHREAD* KThread);
#define MM_PAGE_CLEAN (0)

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id: main.c,v 1.163 2003/06/19 15:48:39 gvg Exp $
/* $Id: main.c,v 1.164 2003/06/19 19:01:01 gvg Exp $
*
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/ke/main.c
@ -295,7 +295,7 @@ MiFreeBootDriverMemory(PVOID StartAddress, ULONG Length)
for (i = 0; i < PAGE_ROUND_UP(Length)/PAGE_SIZE; i++)
{
Page = MmGetPhysicalAddressForProcess(NULL, StartAddress + i * PAGE_SIZE);
MmDeleteVirtualMapping(NULL, StartAddress + i * PAGE_SIZE, FALSE, NULL, NULL, TRUE);
MmDeleteVirtualMapping(NULL, StartAddress + i * PAGE_SIZE, FALSE, NULL, NULL);
MmDereferencePage(Page);
}
}

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id: anonmem.c,v 1.14 2003/06/19 15:48:39 gvg Exp $
/* $Id: anonmem.c,v 1.15 2003/06/19 19:01:01 gvg Exp $
*
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/mm/anonmem.c
@ -165,7 +165,7 @@ MmPageOutVirtualMemory(PMADDRESS_SPACE AddressSpace,
*/
if (!WasDirty)
{
MmDeleteVirtualMapping(MemoryArea->Process, Address, FALSE, NULL, NULL, TRUE);
MmDeleteVirtualMapping(MemoryArea->Process, Address, FALSE, NULL, NULL);
MmDeleteAllRmaps(PhysicalAddress, NULL, NULL);
if ((SwapEntry = MmGetSavedSwapEntryPage(PhysicalAddress)) != 0)
{
@ -218,7 +218,7 @@ MmPageOutVirtualMemory(PMADDRESS_SPACE AddressSpace,
* Otherwise we have succeeded, free the page
*/
DPRINT("MM: Swapped out virtual memory page 0x%.8X!\n", PhysicalAddress);
MmDeleteVirtualMapping(MemoryArea->Process, Address, FALSE, NULL, NULL, TRUE);
MmDeleteVirtualMapping(MemoryArea->Process, Address, FALSE, NULL, NULL);
MmCreatePageFileMapping(MemoryArea->Process, Address, SwapEntry);
MmDeleteAllRmaps(PhysicalAddress, NULL, NULL);
MmSetSavedSwapEntryPage(PhysicalAddress, 0);
@ -468,7 +468,7 @@ MmModifyAttributes(PMADDRESS_SPACE AddressSpace,
PhysicalAddr = MmGetPhysicalAddress(BaseAddress + (i*PAGE_SIZE));
MmDeleteVirtualMapping(AddressSpace->Process,
BaseAddress + (i*PAGE_SIZE),
FALSE, NULL, NULL, TRUE);
FALSE, NULL, NULL);
if (PhysicalAddr.QuadPart != 0)
{
SWAPENTRY SavedSwapEntry;

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id: page.c,v 1.52 2003/06/19 15:48:39 gvg Exp $
/* $Id: page.c,v 1.53 2003/06/19 19:01:01 gvg Exp $
*
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/mm/i386/page.c
@ -444,8 +444,7 @@ MmDisableVirtualMapping(PEPROCESS Process, PVOID Address, BOOL* WasDirty, PHYSIC
VOID
MmDeleteVirtualMapping(PEPROCESS Process, PVOID Address, BOOL FreePage,
BOOL* WasDirty, PHYSICAL_ADDRESS* PhysicalAddr,
BOOL MarkPageUnmapped)
BOOL* WasDirty, PHYSICAL_ADDRESS* PhysicalAddr)
/*
* FUNCTION: Delete a virtual mapping
*/
@ -502,7 +501,7 @@ MmDeleteVirtualMapping(PEPROCESS Process, PVOID Address, BOOL FreePage,
Pte = (ULONG)InterlockedExchange((PLONG)ADDR_TO_PTE(Address), 0);
FLUSH_TLB;
WasValid = (PAGE_MASK(Pte) != 0);
if (MarkPageUnmapped && WasValid)
if (WasValid)
{
MmMarkPageUnmapped(PTE_TO_PAGE(Pte));
}

View file

@ -1,4 +1,4 @@
/* $Id: kmap.c,v 1.23 2003/06/19 15:48:39 gvg Exp $
/* $Id: kmap.c,v 1.24 2003/06/19 19:01:01 gvg Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -43,7 +43,7 @@ ExUnmapPage(PVOID Addr)
DPRINT("ExUnmapPage(Addr %x)\n",Addr);
MmDeleteVirtualMapping(NULL, (PVOID)Addr, FALSE, NULL, NULL, TRUE);
MmDeleteVirtualMapping(NULL, (PVOID)Addr, FALSE, NULL, NULL);
KeAcquireSpinLock(&AllocMapLock, &oldIrql);
RtlClearBits(&AllocMap, Base, 1);
AllocMapHint = min(AllocMapHint, Base);
@ -148,8 +148,7 @@ MiFreeNonPagedPoolRegion(PVOID Addr, ULONG Count, BOOLEAN Free)
Addr + (i * PAGE_SIZE),
Free,
NULL,
NULL,
TRUE);
NULL);
}
KeAcquireSpinLock(&AllocMapLock, &oldlvl);
RtlClearBits(&AllocMap, Base, Count);

View file

@ -396,8 +396,8 @@ MmFreeMemoryArea(PMADDRESS_SPACE AddressSpace,
{
MmDeleteVirtualMapping(AddressSpace->Process,
MemoryArea->BaseAddress + (i*PAGE_SIZE),
FALSE, &Dirty, &PhysAddr,
MemoryArea->Type != MEMORY_AREA_IO_MAPPING);
FALSE, &Dirty, &PhysAddr);
}
if (FreePage != NULL)
{

View file

@ -1,4 +1,4 @@
/* $Id: mdl.c,v 1.49 2003/06/19 15:48:39 gvg Exp $
/* $Id: mdl.c,v 1.50 2003/06/19 19:01:01 gvg Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -232,8 +232,7 @@ MmUnmapLockedPages(PVOID BaseAddress, PMDL Mdl)
BaseAddress + (i * PAGE_SIZE),
FALSE,
NULL,
NULL,
TRUE);
NULL);
}
KeAcquireSpinLock(&MiMdlMappingRegionLock, &oldIrql);

View file

@ -1,4 +1,4 @@
/* $Id: mminit.c,v 1.48 2003/06/19 15:48:39 gvg Exp $
/* $Id: mminit.c,v 1.49 2003/06/19 19:01:01 gvg Exp $
*
* COPYRIGHT: See COPYING in the top directory
* PROJECT: ReactOS kernel
@ -344,14 +344,14 @@ VOID MmInit1(ULONG FirstKrnlPhysAddr,
i<(KERNEL_BASE + 2 * PAGE_TABLE_SIZE);
i=i+PAGE_SIZE)
{
MmDeleteVirtualMapping(NULL, (PVOID)(i), FALSE, NULL, NULL, TRUE);
MmDeleteVirtualMapping(NULL, (PVOID)(i), FALSE, NULL, NULL);
}
DPRINT("Almost done MmInit()\n");
#ifndef MP
/* FIXME: This is broken in SMP mode */
MmDeleteVirtualMapping(NULL, (PVOID)&unmap_me, FALSE, NULL, NULL, TRUE);
MmDeleteVirtualMapping(NULL, (PVOID)&unmap_me2, FALSE, NULL, NULL, TRUE);
MmDeleteVirtualMapping(NULL, (PVOID)&unmap_me3, FALSE, NULL, NULL, TRUE);
MmDeleteVirtualMapping(NULL, (PVOID)&unmap_me, FALSE, NULL, NULL);
MmDeleteVirtualMapping(NULL, (PVOID)&unmap_me2, FALSE, NULL, NULL);
MmDeleteVirtualMapping(NULL, (PVOID)&unmap_me3, FALSE, NULL, NULL);
#endif
/*
* Intialize memory areas

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id: section.c,v 1.117 2003/06/19 15:48:39 gvg Exp $
/* $Id: section.c,v 1.118 2003/06/19 19:01:01 gvg Exp $
*
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/mm/section.c
@ -1216,7 +1216,7 @@ MmAccessFaultSectionView(PMADDRESS_SPACE AddressSpace,
/*
* Delete the old entry.
*/
MmDeleteVirtualMapping(AddressSpace->Process, Address, FALSE, NULL, NULL, TRUE);
MmDeleteVirtualMapping(AddressSpace->Process, Address, FALSE, NULL, NULL);
/*
* Set the PTE to point to the new page
@ -1263,8 +1263,7 @@ MmPageOutDeleteMapping(PVOID Context, PEPROCESS Process, PVOID Address)
Address,
FALSE,
&WasDirty,
&Page,
TRUE);
&Page);
if (WasDirty)
{
PageOutContext->WasDirty = TRUE;