Author: tkreuzer
Date: Sat Dec 5 19:46:22 2009
New Revision: 44415
URL:
http://svn.reactos.org/svn/reactos?rev=44415&view=rev
Log:
Move architecture specific inline functions in into the respective headers. Remove some
unused definitions from amd64 header.
Modified:
branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/ke.h
branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/arm/ke.h
branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/i386/ke.h
branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/ke_x.h
branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/powerpc/ke.h
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/ke.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/ke.h [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/ke.h [iso-8859-1]
Sat Dec 5 19:46:22 2009
@@ -68,13 +68,6 @@
PVOID ServiceRoutine;
} KIDT_INIT, *PKIDT_INIT;
-//#define KeArchFnInit() Ke386FnInit()
-#define KeArchFnInit() DbgPrint("KeArchFnInit is unimplemented!\n");
-#define KeArchHaltProcessor() Ke386HaltProcessor()
-#define KfLowerIrql KeLowerIrql
-#define KfAcquireSpinLock KeAcquireSpinLock
-#define KfReleaseSpinLock KeReleaseSpinLock
-
extern ULONG Ke386CacheAlignment;
extern ULONG KeI386NpxPresent;
extern ULONG KeI386XMMIPresent;
@@ -125,6 +118,32 @@
{
/* Invalidate the TLB entry for this address */
__invlpg(Address);
+}
+
+FORCEINLINE
+VOID
+KeFlushProcessTb(VOID)
+{
+ /* Flush the TLB by resetting CR3 */
+ __writecr3(__readcr3());
+}
+
+FORCEINLINE
+PRKTHREAD
+KeGetCurrentThread(VOID)
+{
+ return (PRKTHREAD)__readgsqword(FIELD_OFFSET(KIPCR, Prcb.CurrentThread));
+}
+
+FORCEINLINE
+VOID
+KiRundownThread(IN PKTHREAD Thread)
+{
+#ifndef CONFIG_SMP
+ DbgPrint("KiRundownThread is unimplemented\n");
+#else
+ /* Nothing to do */
+#endif
}
struct _KPCR;
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/arm/ke.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/arm/ke.h [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/arm/ke.h [iso-8859-1] Sat
Dec 5 19:46:22 2009
@@ -51,6 +51,23 @@
KeArmInvalidateTlbEntry(Address);
}
+FORCEINLINE
+VOID
+KeFlushProcessTb(VOID)
+{
+ //
+ // We need to implement this!
+ //
+ ASSERTMSG("Need ARM flush routine\n", FALSE);
+}
+
+FORCEINLINE
+VOID
+KiRundownThread(IN PKTHREAD Thread)
+{
+ /* FIXME */
+}
+
VOID
KiPassiveRelease(
VOID
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/i386/ke.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/i386/ke.h [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/i386/ke.h [iso-8859-1]
Sat Dec 5 19:46:22 2009
@@ -57,6 +57,39 @@
{
/* Invalidate the TLB entry for this address */
__invlpg(Address);
+}
+
+FORCEINLINE
+VOID
+KeFlushProcessTb(VOID)
+{
+ /* Flush the TLB by resetting CR3 */
+ __writecr3(__readcr3());
+}
+
+FORCEINLINE
+PRKTHREAD
+KeGetCurrentThread(VOID)
+{
+ /* Return the current thread */
+ return ((PKIPCR)KeGetPcr())->PrcbData.CurrentThread;
+}
+
+FORCEINLINE
+VOID
+KiRundownThread(IN PKTHREAD Thread)
+{
+#ifndef CONFIG_SMP
+ /* Check if this is the NPX Thread */
+ if (KeGetCurrentPrcb()->NpxThread == Thread)
+ {
+ /* Clear it */
+ KeGetCurrentPrcb()->NpxThread = NULL;
+ Ke386FnInit();
+ }
+#else
+ /* Nothing to do */
+#endif
}
VOID
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/ke_x.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/ke_x.h [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/ke_x.h [iso-8859-1] Sat
Dec 5 19:46:22 2009
@@ -8,21 +8,6 @@
#ifndef _M_ARM
FORCEINLINE
-PRKTHREAD
-KeGetCurrentThread(VOID)
-{
-#ifdef _M_IX86
- /* Return the current thread */
- return ((PKIPCR)KeGetPcr())->PrcbData.CurrentThread;
-#elif defined (_M_AMD64)
- return (PRKTHREAD)__readgsqword(FIELD_OFFSET(KIPCR, Prcb.CurrentThread));
-#else
- PKPRCB Prcb = KeGetCurrentPrcb();
- return Prcb->CurrentThread;
-#endif
-}
-
-FORCEINLINE
UCHAR
KeGetPreviousMode(VOID)
{
@@ -30,23 +15,6 @@
return KeGetCurrentThread()->PreviousMode;
}
#endif
-
-FORCEINLINE
-VOID
-KeFlushProcessTb(VOID)
-{
- /* Flush the TLB by resetting CR3 */
-#ifdef _M_PPC
- __asm__("sync\n\tisync\n\t");
-#elif _M_ARM
- //
- // We need to implement this!
- //
- ASSERTMSG("Need ARM flush routine\n", FALSE);
-#else
- __writecr3(__readcr3());
-#endif
-}
//
// Enters a Guarded Region
@@ -304,21 +272,6 @@
FORCEINLINE
VOID
-KiRundownThread(IN PKTHREAD Thread)
-{
-#if defined(_M_IX86)
- /* Check if this is the NPX Thread */
- if (KeGetCurrentPrcb()->NpxThread == Thread)
- {
- /* Clear it */
- KeGetCurrentPrcb()->NpxThread = NULL;
- Ke386FnInit();
- }
-#endif
-}
-
-FORCEINLINE
-VOID
KiRequestApcInterrupt(IN BOOLEAN NeedApc,
IN UCHAR Processor)
{
@@ -657,14 +610,6 @@
{
/* Scan the deferred ready lists if required */
if (Prcb->DeferredReadyListHead.Next) KiProcessDeferredReadyList(Prcb);
-}
-
-FORCEINLINE
-VOID
-KiRundownThread(IN PKTHREAD Thread)
-{
- /* Nothing to do */
- return;
}
FORCEINLINE
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/powerpc/ke.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/powerpc/ke.h [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/powerpc/ke.h [iso-8859-1]
Sat Dec 5 19:46:22 2009
@@ -77,6 +77,29 @@
return (struct _KPCR *)__readfsdword(0x1c);
}
+FORCEINLINE
+VOID
+KeFlushProcessTb(VOID)
+{
+ /* Flush the TLB */
+ __asm__("sync\n\tisync\n\t");
+}
+
+FORCEINLINE
+PRKTHREAD
+KeGetCurrentThread(VOID)
+{
+ /* Return the current thread */
+ return KeGetCurrentPrcb()->CurrentThread;
+}
+
+FORCEINLINE
+VOID
+KiRundownThread(IN PKTHREAD Thread)
+{
+ /* FIXME */
+}
+
#ifdef _NTOSKRNL_ /* FIXME: Move flags above to NDK instead of here */
VOID
NTAPI