diff --git a/ntoskrnl/mm/ARM3/sysldr.c b/ntoskrnl/mm/ARM3/sysldr.c index c1c7ad0cea9..d3d9669ab52 100644 --- a/ntoskrnl/mm/ARM3/sysldr.c +++ b/ntoskrnl/mm/ARM3/sysldr.c @@ -2436,8 +2436,6 @@ MiSetSystemCodeProtection( /* Flush it all */ KeFlushEntireTb(TRUE, TRUE); - - return; } VOID @@ -2562,17 +2560,20 @@ NTAPI MiSetPagingOfDriver(IN PMMPTE PointerPte, IN PMMPTE LastPte) { +#ifdef ENABLE_MISETPAGINGOFDRIVER PVOID ImageBase; PETHREAD CurrentThread = PsGetCurrentThread(); PFN_COUNT PageCount = 0; PFN_NUMBER PageFrameIndex; PMMPFN Pfn1; +#endif // ENABLE_MISETPAGINGOFDRIVER + PAGED_CODE(); +#ifndef ENABLE_MISETPAGINGOFDRIVER /* The page fault handler is broken and doesn't page back in! */ DPRINT1("WARNING: MiSetPagingOfDriver() called, but paging is broken! ignoring!\n"); - return; - +#else // ENABLE_MISETPAGINGOFDRIVER /* Get the driver's base address */ ImageBase = MiPteToAddress(PointerPte); ASSERT(MI_IS_SESSION_IMAGE_ADDRESS(ImageBase) == FALSE); @@ -2610,6 +2611,7 @@ MiSetPagingOfDriver(IN PMMPTE PointerPte, /* Update counters */ InterlockedExchangeAdd((PLONG)&MmTotalSystemDriverPages, PageCount); } +#endif // ENABLE_MISETPAGINGOFDRIVER } VOID