]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-i386/mmu_context.h
i386: fix early usage of atomic_add_return and local_add_return on real i386
[linux-2.6-omap-h63xx.git] / include / asm-i386 / mmu_context.h
index e6aa30f8de5b6d47666894711d39492b2774eaed..8198d1cca1f31264dc6b0ee4da90cdd0c13cd323 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