History

x86, asm, cleanup: Replace open-coded control register values with symbolic

Clean up an unnecessary open-coded control register values.

H. Peter Anvin committed 13 years ago

Commit a3d7b7d1 parent d1fbefc3 files · +3 −3Browse files

Unified · Split

3 files
  1. arch/x86/kernel/cpu/mtrr/cyrix.c +1 −1
  2. arch/x86/kernel/cpu/mtrr/generic.c +1 −1
  3. arch/x86/kernel/relocate_kernel_32.S +1 −1
arch/x86/kernel/cpu/mtrr/cyrix.c+1−1
@@ -167,7 +167,7 @@ static void post_set(void) · 166 unmodified lines
167167 setCx86(CX86_CCR3, ccr3);
168168
169169 /* Enable caches */
170− write_cr0(read_cr0() & 0xbfffffff);
170+ write_cr0(read_cr0() & ~X86_CR0_CD);
171171
172172 /* Restore value of CR4 */
173173 if (cpu_has_pge)
arch/x86/kernel/cpu/mtrr/generic.c+1−1
@@ -701,7 +701,7 @@ static void post_set(void) __releases(set_atomicity_lock) · 700 unmodified lines
701701 mtrr_wrmsr(MSR_MTRRdefType, deftype_lo, deftype_hi);
702702
703703 /* Enable caches */
704− write_cr0(read_cr0() & 0xbfffffff);
704+ write_cr0(read_cr0() & ~X86_CR0_CD);
705705
706706 /* Restore value of CR4 */
707707 if (cpu_has_pge)
arch/x86/kernel/relocate_kernel_32.S+1−1
@@ -186,7 +186,7 @@ identity_mapped: · 185 unmodified lines
186186 movl CP_PA_PGD(%ebx), %eax
187187 movl %eax, %cr3
188188 movl %cr0, %eax
189− orl $(1<<31), %eax
189+ orl $X86_CR0_PG, %eax
190190 movl %eax, %cr0
191191 lea PAGE_SIZE(%edi), %esp
192192 movl %edi, %eax