x86: Clean up cr4 manipulation
[sfrench/cifs-2.6.git] / drivers / lguest / x86 / core.c
index 922a1acbf652b9376e4b2dd39ba6be2859307594..6adfd7ba4c977434221d859185772f26530c8bc7 100644 (file)
@@ -47,6 +47,7 @@
 #include <asm/lguest.h>
 #include <asm/uaccess.h>
 #include <asm/i387.h>
+#include <asm/tlbflush.h>
 #include "../lg.h"
 
 static int cpu_had_pge;
@@ -452,9 +453,9 @@ void lguest_arch_handle_trap(struct lg_cpu *cpu)
 static void adjust_pge(void *on)
 {
        if (on)
-               write_cr4(read_cr4() | X86_CR4_PGE);
+               cr4_set_bits(X86_CR4_PGE);
        else
-               write_cr4(read_cr4() & ~X86_CR4_PGE);
+               cr4_clear_bits(X86_CR4_PGE);
 }
 
 /*H:020