diff --git a/boot/freeldr/freeldr/arch/i386/ntoskrnl.c b/boot/freeldr/freeldr/arch/i386/ntoskrnl.c
index 40a3d16466e..6ffbed5adb5 100644
--- a/boot/freeldr/freeldr/arch/i386/ntoskrnl.c
+++ b/boot/freeldr/freeldr/arch/i386/ntoskrnl.c
@@ -28,14 +28,14 @@ FASTCALL
 KefAcquireSpinLockAtDpcLevel(
     IN PKSPIN_LOCK SpinLock)
 {
-#if DBG
-    /* To be on par with HAL/NTOSKRNL */
-#ifdef _M_AMD64
-    *SpinLock = (KSPIN_LOCK)KeGetCurrentThread() | 1;
-#else
-    *SpinLock = (KSPIN_LOCK)(((PKIPCR)KeGetPcr())->PrcbData.CurrentThread) | 1;
-#endif
-#endif
+//#if DBG
+//    /* To be on par with HAL/NTOSKRNL */
+//#ifdef _M_AMD64
+//    *SpinLock = (KSPIN_LOCK)KeGetCurrentThread() | 1;
+//#else
+//    *SpinLock = (KSPIN_LOCK)(((PKIPCR)KeGetPcr())->PrcbData.CurrentThread) | 1;
+//#endif
+//#endif
 }
 
 VOID
diff --git a/ntoskrnl/include/internal/mm.h b/ntoskrnl/include/internal/mm.h
index 654f23c6ee0..84b92982e50 100644
--- a/ntoskrnl/include/internal/mm.h
+++ b/ntoskrnl/include/internal/mm.h
@@ -46,8 +46,8 @@ extern SIZE_T MmtotalCommitLimitMaximum;
 extern PVOID MiDebugMapping; // internal
 extern PMMPTE MmDebugPte; // internal
 
-extern KSPIN_LOCK MmPfnLock;
-
+//extern KSPIN_LOCK MmPfnLock;
+//
 struct _KTRAP_FRAME;
 struct _EPROCESS;
 struct _MM_RMAP_ENTRY;
@@ -942,11 +942,11 @@ MmGetSectionAssociation(PFN_NUMBER Page,
                         PLARGE_INTEGER Offset);
 
 /* freelist.c **********************************************************/
-_IRQL_raises_(DISPATCH_LEVEL)
-_IRQL_requires_max_(DISPATCH_LEVEL)
-_Requires_lock_not_held_(MmPfnLock)
-_Acquires_lock_(MmPfnLock)
-_IRQL_saves_
+//_IRQL_raises_(DISPATCH_LEVEL)
+//_IRQL_requires_max_(DISPATCH_LEVEL)
+//_Requires_lock_not_held_(MmPfnLock)
+//_Acquires_lock_(MmPfnLock)
+//_IRQL_saves_
 FORCEINLINE
 KIRQL
 MiAcquirePfnLock(VOID)
@@ -960,14 +960,15 @@ _IRQL_requires_(DISPATCH_LEVEL)
 FORCEINLINE
 VOID
 MiReleasePfnLock(
-    _In_ _IRQL_restores_ KIRQL OldIrql)
+      _In_ KIRQL OldIrql)
+//    _In_ _IRQL_restores_ KIRQL OldIrql)
 {
     KeReleaseQueuedSpinLock(LockQueuePfnLock, OldIrql);
 }
 
-_IRQL_requires_min_(DISPATCH_LEVEL)
-_Requires_lock_not_held_(MmPfnLock)
-_Acquires_lock_(MmPfnLock)
+//_IRQL_requires_min_(DISPATCH_LEVEL)
+//_Requires_lock_not_held_(MmPfnLock)
+//_Acquires_lock_(MmPfnLock)
 FORCEINLINE
 VOID
 MiAcquirePfnLockAtDpcLevel(VOID)
@@ -979,9 +980,9 @@ MiAcquirePfnLockAtDpcLevel(VOID)
     KeAcquireQueuedSpinLockAtDpcLevel(LockQueue);
 }
 
-_Requires_lock_held_(MmPfnLock)
-_Releases_lock_(MmPfnLock)
-_IRQL_requires_min_(DISPATCH_LEVEL)
+//_Requires_lock_held_(MmPfnLock)
+//_Releases_lock_(MmPfnLock)
+//_IRQL_requires_min_(DISPATCH_LEVEL)
 FORCEINLINE
 VOID
 MiReleasePfnLockFromDpcLevel(VOID)
@@ -993,7 +994,8 @@ MiReleasePfnLockFromDpcLevel(VOID)
     ASSERT(KeGetCurrentIrql() >= DISPATCH_LEVEL);
 }
 
-#define MI_ASSERT_PFN_LOCK_HELD() NT_ASSERT((KeGetCurrentIrql() >= DISPATCH_LEVEL) && (MmPfnLock != 0))
+#define MI_ASSERT_PFN_LOCK_HELD() ASSERT(KeGetCurrentIrql() == DISPATCH_LEVEL)
+//#define MI_ASSERT_PFN_LOCK_HELD() NT_ASSERT((KeGetCurrentIrql() >= DISPATCH_LEVEL) && (MmPfnLock != 0))
 
 FORCEINLINE
 PMMPFN
@@ -1491,19 +1493,19 @@ MmUnsharePageEntrySectionSegment(PMEMORY_AREA MemoryArea,
                                  BOOLEAN PageOut,
                                  ULONG_PTR *InEntry);
 
-_When_(OldIrql == MM_NOIRQL, _IRQL_requires_max_(DISPATCH_LEVEL))
-_When_(OldIrql == MM_NOIRQL, _Requires_lock_not_held_(MmPfnLock))
-_When_(OldIrql != MM_NOIRQL, _Requires_lock_held_(MmPfnLock))
-_When_(OldIrql != MM_NOIRQL, _Releases_lock_(MmPfnLock))
-_When_(OldIrql != MM_NOIRQL, _IRQL_requires_(DISPATCH_LEVEL))
+//_When_(OldIrql == MM_NOIRQL, _IRQL_requires_max_(DISPATCH_LEVEL))
+//_When_(OldIrql == MM_NOIRQL, _Requires_lock_not_held_(MmPfnLock))
+//_When_(OldIrql != MM_NOIRQL, _Requires_lock_held_(MmPfnLock))
+//_When_(OldIrql != MM_NOIRQL, _Releases_lock_(MmPfnLock))
+//_When_(OldIrql != MM_NOIRQL, _IRQL_requires_(DISPATCH_LEVEL))
 VOID
 NTAPI
 MmDereferenceSegmentWithLock(
     _In_ PMM_SECTION_SEGMENT Segment,
     _In_ _When_(OldIrql != MM_NOIRQL, _IRQL_restores_) KIRQL OldIrql);
 
-_IRQL_requires_max_(DISPATCH_LEVEL)
-_Requires_lock_not_held_(MmPfnLock)
+//_IRQL_requires_max_(DISPATCH_LEVEL)
+//_Requires_lock_not_held_(MmPfnLock)
 FORCEINLINE
 VOID
 MmDereferenceSegment(PMM_SECTION_SEGMENT Segment)
diff --git a/ntoskrnl/include/internal/spinlock.h b/ntoskrnl/include/internal/spinlock.h
index 013ad913c34..1d04315f18f 100644
--- a/ntoskrnl/include/internal/spinlock.h
+++ b/ntoskrnl/include/internal/spinlock.h
@@ -6,25 +6,60 @@
 * PROGRAMMERS:     Alex Ionescu (alex.ionescu@reactos.org)
 */
 
-#if defined(_M_IX86)
+//#if defined(_M_IX86)
 VOID
 NTAPI
 Kii386SpinOnSpinLock(PKSPIN_LOCK SpinLock, ULONG Flags);
-#endif
+
+#ifndef CONFIG_SMP
 
 //
-// Spinlock Acquisition at IRQL >= DISPATCH_LEVEL
+// Spinlock Acquire at IRQL >= DISPATCH_LEVEL
+//
+FORCEINLINE
+VOID
+KxAcquireSpinLock(IN PKSPIN_LOCK SpinLock)
+{
+    /* On UP builds, spinlocks don't exist at IRQL >= DISPATCH */
+        UNREFERENCED_PARAMETER(SpinLock);
+
+    /* Add an explicit memory barrier to prevent the compiler from reordering
+       memory accesses across the borders of spinlocks */
+           KeMemoryBarrierWithoutFence();
+}
+
+//
+// Spinlock Release at IRQL >= DISPATCH_LEVEL
 //
-_Acquires_nonreentrant_lock_(SpinLock)
 FORCEINLINE
 VOID
-KxAcquireSpinLock(
-#if defined(CONFIG_SMP) || DBG
-    _Inout_
+KxReleaseSpinLock(IN PKSPIN_LOCK SpinLock)
+{
+    /* On UP builds, spinlocks don't exist at IRQL >= DISPATCH */
+        UNREFERENCED_PARAMETER(SpinLock);
+
+    /* Add an explicit memory barrier to prevent the compiler from reordering
+       memory accesses across the borders of spinlocks */
+    KeMemoryBarrierWithoutFence();
+}
+
 #else
-    _Unreferenced_parameter_
-#endif
-    PKSPIN_LOCK SpinLock)
+//#endif
+
+//
+// Spinlock Acquisition at IRQL >= DISPATCH_LEVEL
+//
+//_Acquires_nonreentrant_lock_(SpinLock)
+FORCEINLINE
+VOID
+KxAcquireSpinLock(IN PKSPIN_LOCK SpinLock)
+//KxAcquireSpinLock(
+//#if defined(CONFIG_SMP) || DBG
+//    _Inout_
+//#else
+//    _Unreferenced_parameter_
+//#endif
+//    PKSPIN_LOCK SpinLock)
 {
 #if DBG
     /* Make sure that we don't own the lock already */
@@ -35,7 +70,7 @@ KxAcquireSpinLock(
     }
 #endif
 
-#ifdef CONFIG_SMP
+//#ifdef CONFIG_SMP
     /* Try to acquire the lock */
     while (InterlockedBitTestAndSet((PLONG)SpinLock, 0))
     {
@@ -51,12 +86,12 @@ KxAcquireSpinLock(
         }
 #endif
     }
-#endif
-
-    /* Add an explicit memory barrier to prevent the compiler from reordering
-       memory accesses across the borders of spinlocks */
-    KeMemoryBarrierWithoutFence();
-
+//#endif
+//
+//    /* Add an explicit memory barrier to prevent the compiler from reordering
+//       memory accesses across the borders of spinlocks */
+//    KeMemoryBarrierWithoutFence();
+//
 #if DBG
     /* On debug builds, we OR in the KTHREAD */
     *SpinLock = (KSPIN_LOCK)KeGetCurrentThread() | 1;
@@ -66,16 +101,17 @@ KxAcquireSpinLock(
 //
 // Spinlock Release at IRQL >= DISPATCH_LEVEL
 //
-_Releases_nonreentrant_lock_(SpinLock)
+//_Releases_nonreentrant_lock_(SpinLock)
 FORCEINLINE
 VOID
-KxReleaseSpinLock(
-#if defined(CONFIG_SMP) || DBG
-    _Inout_
-#else
-    _Unreferenced_parameter_
-#endif
-    PKSPIN_LOCK SpinLock)
+KxReleaseSpinLock(IN PKSPIN_LOCK SpinLock)
+//KxReleaseSpinLock(
+//#if defined(CONFIG_SMP) || DBG
+//    _Inout_
+//#else
+//    _Unreferenced_parameter_
+//#endif
+//    PKSPIN_LOCK SpinLock)
 {
 #if DBG
     /* Make sure that the threads match */
@@ -85,17 +121,19 @@ KxReleaseSpinLock(
         KeBugCheckEx(SPIN_LOCK_NOT_OWNED, (ULONG_PTR)SpinLock, 0, 0, 0);
     }
 #endif
-
-#if defined(CONFIG_SMP) || DBG
-    /* Clear the lock  */
+//
+//#if defined(CONFIG_SMP) || DBG
+//    /* Clear the lock  */
 #ifdef _WIN64
     InterlockedAnd64((PLONG64)SpinLock, 0);
 #else
     InterlockedAnd((PLONG)SpinLock, 0);
 #endif
-#endif
-
-    /* Add an explicit memory barrier to prevent the compiler from reordering
-       memory accesses across the borders of spinlocks */
-    KeMemoryBarrierWithoutFence();
 }
+
+#endif
+//
+//    /* Add an explicit memory barrier to prevent the compiler from reordering
+//       memory accesses across the borders of spinlocks */
+//    KeMemoryBarrierWithoutFence();
+//}
diff --git a/ntoskrnl/ke/spinlock.c b/ntoskrnl/ke/spinlock.c
index d382cbf5055..4d39166a336 100644
--- a/ntoskrnl/ke/spinlock.c
+++ b/ntoskrnl/ke/spinlock.c
@@ -112,10 +112,11 @@ KeAcquireQueuedSpinLockAtDpcLevel(_Inout_ PKSPIN_LOCK_QUEUE LockHandle)
                      0,
                      0);
     }
-#endif
+//#endif
 
     /* Do the inlined function */
     KxAcquireSpinLock(LockHandle->Lock);
+#endif
 }
 
 _IRQL_requires_min_(DISPATCH_LEVEL)
@@ -136,10 +137,11 @@ KeReleaseQueuedSpinLockFromDpcLevel(_Inout_ PKSPIN_LOCK_QUEUE LockHandle)
                      0,
                      0);
     }
-#endif
+//#endif
 
     /* Do the inlined function */
     KxReleaseSpinLock(LockHandle->Lock);
+#endif
 }
 
 #endif
@@ -320,12 +322,12 @@ KeTryToAcquireSpinLockAtDpcLevel(IN OUT PKSPIN_LOCK SpinLock)
                      0);
     }
 
-    /* Make sure that we don't own the lock already */
-    if (((KSPIN_LOCK)KeGetCurrentThread() | 1) == *SpinLock)
-    {
-        /* We do, bugcheck! */
-        KeBugCheckEx(SPIN_LOCK_ALREADY_OWNED, (ULONG_PTR)SpinLock, 0, 0, 0);
-    }
+//    /* Make sure that we don't own the lock already */
+//    if (((KSPIN_LOCK)KeGetCurrentThread() | 1) == *SpinLock)
+//    {
+//        /* We do, bugcheck! */
+//        KeBugCheckEx(SPIN_LOCK_ALREADY_OWNED, (ULONG_PTR)SpinLock, 0, 0, 0);
+//    }
 #endif
 
 #ifdef CONFIG_SMP
@@ -344,11 +346,12 @@ KeTryToAcquireSpinLockAtDpcLevel(IN OUT PKSPIN_LOCK SpinLock)
         /* It was already acquired */
         return FALSE;
     }
-#endif
+//#endif
 
 #if DBG
     /* On debug builds, we OR in the KTHREAD */
     *SpinLock = (ULONG_PTR)KeGetCurrentThread() | 1;
+#endif
 #endif
 
     /* All is well, return TRUE */
@@ -363,10 +366,11 @@ FASTCALL
 KeAcquireInStackQueuedSpinLockAtDpcLevel(IN PKSPIN_LOCK SpinLock,
                                          IN PKLOCK_QUEUE_HANDLE LockHandle)
 {
+#ifdef CONFIG_SMP
     /* Set it up properly */
     LockHandle->LockQueue.Next = NULL;
     LockHandle->LockQueue.Lock = SpinLock;
-#ifdef CONFIG_SMP
+//#ifdef CONFIG_SMP
 #if 0
     KeAcquireQueuedSpinLockAtDpcLevel(LockHandle->LockQueue.Next);
 #else
@@ -380,11 +384,13 @@ KeAcquireInStackQueuedSpinLockAtDpcLevel(IN PKSPIN_LOCK SpinLock,
                      0,
                      0);
     }
-#endif
-#endif
+//#endif
+//#endif
 
     /* Acquire the lock */
     KxAcquireSpinLock(LockHandle->LockQueue.Lock); // HACK
+#endif
+#endif
 }
 
 /*
@@ -409,11 +415,13 @@ KeReleaseInStackQueuedSpinLockFromDpcLevel(IN PKLOCK_QUEUE_HANDLE LockHandle)
                      0,
                      0);
     }
-#endif
-#endif
+//#endif
+//#endif
 
     /* Release the lock */
     KxReleaseSpinLock(LockHandle->LockQueue.Lock); // HACK
+#endif
+#endif
 }
 
 /*
diff --git a/ntoskrnl/mm/section.c b/ntoskrnl/mm/section.c
index 44b5710f6f4..d108998dffe 100644
--- a/ntoskrnl/mm/section.c
+++ b/ntoskrnl/mm/section.c
@@ -987,11 +987,11 @@ FreeSegmentPage(PMM_SECTION_SEGMENT Segment, PLARGE_INTEGER Offset)
     MmReleasePageMemoryConsumer(MC_USER, Page);
 }
 
-_When_(OldIrql == MM_NOIRQL, _IRQL_requires_max_(DISPATCH_LEVEL))
-_When_(OldIrql == MM_NOIRQL, _Requires_lock_not_held_(MmPfnLock))
-_When_(OldIrql != MM_NOIRQL, _Requires_lock_held_(MmPfnLock))
-_When_(OldIrql != MM_NOIRQL, _Releases_lock_(MmPfnLock))
-_When_(OldIrql != MM_NOIRQL, _IRQL_requires_(DISPATCH_LEVEL))
+//_When_(OldIrql == MM_NOIRQL, _IRQL_requires_max_(DISPATCH_LEVEL))
+//_When_(OldIrql == MM_NOIRQL, _Requires_lock_not_held_(MmPfnLock))
+//_When_(OldIrql != MM_NOIRQL, _Requires_lock_held_(MmPfnLock))
+//_When_(OldIrql != MM_NOIRQL, _Releases_lock_(MmPfnLock))
+//_When_(OldIrql != MM_NOIRQL, _IRQL_requires_(DISPATCH_LEVEL))
 VOID
 NTAPI
 MmDereferenceSegmentWithLock(
