[PATCH] x86: Use RDTSCP for synchronous get_cycles if possible
[powerpc.git] / include / asm-i386 / mmu_context.h
index e6aa30f..8198d1c 100644 (file)
@@ -5,6 +5,16 @@
 #include <asm/atomic.h>
 #include <asm/pgalloc.h>
 #include <asm/tlbflush.h>
+#include <asm/paravirt.h>
+#ifndef CONFIG_PARAVIRT
+#include <asm-generic/mm_hooks.h>
+
+static inline void paravirt_activate_mm(struct mm_struct *prev,
+                                       struct mm_struct *next)
+{
+}
+#endif /* !CONFIG_PARAVIRT */
+
 
 /*
  * Used for LDT copy/destruction.
@@ -65,7 +75,10 @@ static inline void switch_mm(struct mm_struct *prev,
 #define deactivate_mm(tsk, mm)                 \
        asm("movl %0,%%gs": :"r" (0));
 
-#define activate_mm(prev, next) \
-       switch_mm((prev),(next),NULL)
+#define activate_mm(prev, next)                                \
+       do {                                            \
+               paravirt_activate_mm(prev, next);       \
+               switch_mm((prev),(next),NULL);          \
+       } while(0);
 
 #endif