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
167 setCx86(CX86_CCR3, ccr3);167 setCx86(CX86_CCR3, ccr3);
168 168
169 /* Enable caches */169 /* Enable caches */
170 write_cr0(read_cr0() & 0xbfffffff);170 write_cr0(read_cr0() & ~X86_CR0_CD);
171 171
172 /* Restore value of CR4 */172 /* Restore value of CR4 */
173 if (cpu_has_pge)173 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
701 mtrr_wrmsr(MSR_MTRRdefType, deftype_lo, deftype_hi);701 mtrr_wrmsr(MSR_MTRRdefType, deftype_lo, deftype_hi);
702 702
703 /* Enable caches */703 /* Enable caches */
704 write_cr0(read_cr0() & 0xbfffffff);704 write_cr0(read_cr0() & ~X86_CR0_CD);
705 705
706 /* Restore value of CR4 */706 /* Restore value of CR4 */
707 if (cpu_has_pge)707 if (cpu_has_pge)
arch/x86/kernel/relocate_kernel_32.S+1−1
@@ -186,7 +186,7 @@ identity_mapped: · 185 unmodified lines
186 movl CP_PA_PGD(%ebx), %eax186 movl CP_PA_PGD(%ebx), %eax
187 movl %eax, %cr3187 movl %eax, %cr3
188 movl %cr0, %eax188 movl %cr0, %eax
189 orl $(1<<31), %eax189 orl $X86_CR0_PG, %eax
190 movl %eax, %cr0190 movl %eax, %cr0
191 lea PAGE_SIZE(%edi), %esp191 lea PAGE_SIZE(%edi), %esp
192 movl %edi, %eax192 movl %edi, %eax