summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/relocate_kernel_32.S
diff options
context:
space:
mode:
authorgorcunov@gmail.com <gorcunov@gmail.com>2008-03-23 00:00:08 +0300
committerIngo Molnar <mingo@elte.hu>2008-04-17 17:41:29 +0200
commitfd3af53122e616c0ddba44a3da6d1c1877f72d29 (patch)
tree34f1d9d653087ae76e528186c288dd5507f5afe0 /arch/x86/kernel/relocate_kernel_32.S
parenta7bba17bf09e1c5bdbdd6c0ab0c7833baedf4653 (diff)
x86: relocate_kernel - use predefined macroses for processor state
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/relocate_kernel_32.S')
-rw-r--r--arch/x86/kernel/relocate_kernel_32.S17
1 files changed, 9 insertions, 8 deletions
diff --git a/arch/x86/kernel/relocate_kernel_32.S b/arch/x86/kernel/relocate_kernel_32.S
index ce12bb8678ad..a7ecc8e0bc67 100644
--- a/arch/x86/kernel/relocate_kernel_32.S
+++ b/arch/x86/kernel/relocate_kernel_32.S
@@ -9,6 +9,7 @@
#include <linux/linkage.h>
#include <asm/page.h>
#include <asm/kexec.h>
+#include <asm/processor-flags.h>
/*
* Must be relocatable PIC code callable as a C function
@@ -167,16 +168,16 @@ identity_mapped:
pushl %edx
/* Set cr0 to a known state:
- * 31 0 == Paging disabled
- * 18 0 == Alignment check disabled
- * 16 0 == Write protect disabled
- * 3 0 == No task switch
- * 2 0 == Don't do FP software emulation.
- * 0 1 == Proctected mode enabled
+ * - Paging disabled
+ * - Alignment check disabled
+ * - Write protect disabled
+ * - No task switch
+ * - Don't do FP software emulation.
+ * - Proctected mode enabled
*/
movl %cr0, %eax
- andl $~((1<<31)|(1<<18)|(1<<16)|(1<<3)|(1<<2)), %eax
- orl $(1<<0), %eax
+ andl $~(X86_CR0_PG | X86_CR0_AM | X86_CR0_WP | X86_CR0_TS | X86_CR0_EM), %eax
+ orl $(X86_CR0_PE), %eax
movl %eax, %cr0
/* clear cr4 if applicable */