x86, asm, cleanup: Replace open-coded control register values with symbolic
authorH. Peter Anvin <hpa@linux.intel.com>
Sat, 27 Apr 2013 23:22:32 +0000 (16:22 -0700)
committerH. Peter Anvin <hpa@linux.intel.com>
Tue, 25 Jun 2013 23:26:06 +0000 (16:26 -0700)
Clean up an unnecessary open-coded control register values.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Link: http://lkml.kernel.org/n/tip-um7za1nzf6brb17o0h4om6e3@git.kernel.org
arch/x86/kernel/cpu/mtrr/cyrix.c
arch/x86/kernel/cpu/mtrr/generic.c
arch/x86/kernel/relocate_kernel_32.S

index 68a3343e57980a4149a00a4f9d609b69b67eba35..9e451b0876b513ff34c38ba5cad0862b1f5fc3db 100644 (file)
@@ -167,7 +167,7 @@ static void post_set(void)
        setCx86(CX86_CCR3, ccr3);
 
        /* Enable caches */
-       write_cr0(read_cr0() & 0xbfffffff);
+       write_cr0(read_cr0() & ~X86_CR0_CD);
 
        /* Restore value of CR4 */
        if (cpu_has_pge)
index fa72a39e5d463a248a5b5a4a18f7860a1cbb8a77..00f557b95b165587e70f48df9d9603835297eafa 100644 (file)
@@ -701,7 +701,7 @@ static void post_set(void) __releases(set_atomicity_lock)
        mtrr_wrmsr(MSR_MTRRdefType, deftype_lo, deftype_hi);
 
        /* Enable caches */
-       write_cr0(read_cr0() & 0xbfffffff);
+       write_cr0(read_cr0() & ~X86_CR0_CD);
 
        /* Restore value of CR4 */
        if (cpu_has_pge)
index 36818f8ec2be08dd8ccdc6872992e5877eba40cd..e13f8e7c22a68c3d9590b8deb69e116d2f625f68 100644 (file)
@@ -186,7 +186,7 @@ identity_mapped:
        movl    CP_PA_PGD(%ebx), %eax
        movl    %eax, %cr3
        movl    %cr0, %eax
-       orl     $(1<<31), %eax
+       orl     $X86_CR0_PG, %eax
        movl    %eax, %cr0
        lea     PAGE_SIZE(%edi), %esp
        movl    %edi, %eax