[ros-diffs] [sginsberg] 35410: - Remove dead code

sginsberg at svn.reactos.org sginsberg at svn.reactos.org
Sun Aug 17 19:38:29 CEST 2008


Author: sginsberg
Date: Sun Aug 17 12:38:28 2008
New Revision: 35410

URL: http://svn.reactos.org/svn/reactos?rev=35410&view=rev
Log:
- Remove dead code

Modified:
    trunk/reactos/ntoskrnl/include/internal/mm.h
    trunk/reactos/ntoskrnl/mm/i386/page.c

Modified: trunk/reactos/ntoskrnl/include/internal/mm.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/mm.h?rev=35410&r1=35409&r2=35410&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/mm.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/mm.h [iso-8859-1] Sun Aug 17 12:38:28 2008
@@ -1063,13 +1063,6 @@
 
 PFN_TYPE
 NTAPI
-MmChangeHyperspaceMapping(
-    PVOID Address,
-    PFN_TYPE Page
-);
-
-PFN_TYPE
-NTAPI
 MmDeleteHyperspaceMapping(PVOID Address);
 
 NTSTATUS
@@ -1218,13 +1211,6 @@
 VOID
 NTAPI
 MmReferencePageUnsafe(PFN_TYPE Page);
-
-BOOLEAN
-NTAPI
-MmIsAccessedAndResetAccessPage(
-    struct _EPROCESS *Process,
-    PVOID Address
-);
 
 ULONG
 NTAPI

Modified: trunk/reactos/ntoskrnl/mm/i386/page.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/i386/page.c?rev=35410&r1=35409&r2=35410&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/mm/i386/page.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/i386/page.c [iso-8859-1] Sun Aug 17 12:38:28 2008
@@ -62,25 +62,6 @@
 
 BOOLEAN MmUnmapPageTable(PULONG Pt);
 
-ULONG_PTR
-NTAPI
-MiFlushTlbIpiRoutine(ULONG_PTR Address)
-{
-    if (Address == (ULONG_PTR)-1)
-    {
-        KeFlushCurrentTb();
-    }
-    else if (Address == (ULONG_PTR)-2)
-    {
-        KeFlushCurrentTb();
-    }
-    else
-    {
-        __invlpg((PVOID)Address);
-    }
-    return 0;
-}
-
 VOID
 MiFlushTlb(PULONG Pt, PVOID Address)
 {
@@ -89,8 +70,6 @@
         __invlpg(Address);
     }
 }
-
-
 
 PULONG
 MmGetPageDirectory(VOID)
@@ -264,50 +243,6 @@
     {
         KEBUGCHECK(0);
         //       MmGlobalKernelPageDirectory[ADDR_TO_PDE_OFFSET(Address)] = 0;
-    }
-    if (Process != NULL && Process != CurrentProcess)
-    {
-        KeDetachProcess();
-    }
-}
-
-VOID
-NTAPI
-MmFreePageTable(PEPROCESS Process, PVOID Address)
-{
-    PEPROCESS CurrentProcess = PsGetCurrentProcess();
-    ULONG i;
-    PFN_TYPE Pfn;
-    PULONG PageTable;
-    
-    DPRINT("ProcessId %d, Address %x\n", Process->UniqueProcessId, Address);
-    if (Process != NULL && Process != CurrentProcess)
-    {
-        KeAttachProcess(&Process->Pcb);
-    }
-    
-    PageTable = (PULONG)PAGE_ROUND_DOWN((PVOID)MiAddressToPte(Address));
-    for (i = 0; i < 1024; i++)
-    {
-        if (PageTable[i] != 0)
-        {
-            DbgPrint("Page table entry not clear at %x/%x (is %x)\n",
-                     ((ULONG)Address / (4*1024*1024)), i, PageTable[i]);
-            KEBUGCHECK(0);
-        }
-    }
-    Pfn = MiAddressToPde(Address)->u.Hard.PageFrameNumber;
-    MiAddressToPde(Address)->u.Long = 0;
-    MiFlushTlb((PULONG)MiAddressToPde(Address), MiAddressToPte(Address));
-    
-    if (Address >= MmSystemRangeStart)
-    {
-        //    MmGlobalKernelPageDirectory[ADDR_TO_PDE_OFFSET(Address)] = 0;
-        KEBUGCHECK(0);
-    }
-    else
-    {
-        MmReleasePageMemoryConsumer(MC_NPPOOL, Pfn);
     }
     if (Process != NULL && Process != CurrentProcess)
     {
@@ -637,42 +572,6 @@
     return MmGetPageEntryForProcess(Process, Address) & PA_DIRTY ? TRUE : FALSE;
 }
 
-BOOLEAN
-NTAPI
-MmIsAccessedAndResetAccessPage(PEPROCESS Process, PVOID Address)
-{
-    PULONG Pt;
-    ULONG Pte;
-    
-    if (Address < MmSystemRangeStart && Process == NULL)
-    {
-        DPRINT1("MmIsAccessedAndResetAccessPage is called for user space without a process.\n");
-        KEBUGCHECK(0);
-    }
-    
-    Pt = MmGetPageTableForProcess(Process, Address, FALSE);
-    if (Pt == NULL)
-    {
-        KEBUGCHECK(0);
-    }
-    
-    do
-    {
-        Pte = *Pt;
-    } while (Pte != InterlockedCompareExchangePte(Pt, Pte & ~PA_ACCESSED, Pte));
-    
-    if (Pte & PA_ACCESSED)
-    {
-        MiFlushTlb(Pt, Address);
-        return TRUE;
-    }
-    else
-    {
-        MmUnmapPageTable(Pt);
-        return FALSE;
-    }
-}
-
 VOID
 NTAPI
 MmSetCleanPage(PEPROCESS Process, PVOID Address)
@@ -1232,22 +1131,6 @@
     Address = (PVOID)((ULONG_PTR)HYPERSPACE + i * PAGE_SIZE);
     __invlpg(Address);
     return Address;
-}
-
-PFN_TYPE
-NTAPI
-MmChangeHyperspaceMapping(PVOID Address, PFN_TYPE NewPage)
-{
-    PFN_TYPE Pfn;
-    ULONG Entry;
-    
-    ASSERT (IS_HYPERSPACE(Address));
-    
-    Entry = InterlockedExchangePte(MiAddressToPte(Address), PFN_TO_PTE(NewPage) | PA_PRESENT | PA_READWRITE);
-    Pfn = PTE_TO_PFN(Entry);
-    
-    __invlpg(Address);
-    return Pfn;
 }
 
 PFN_TYPE



More information about the Ros-diffs mailing list