summaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/cpu/mtrr/cyrix.c
diff options
context:
space:
mode:
authorBrian Gerst <bgerst@didntduck.org>2007-05-21 14:31:53 +0200
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-21 09:56:57 -0700
commit17304383ebc1ce68a88030ac4d18ea549d9578c7 (patch)
treeddeebffef6841cc421e9fc9bf5429b4a97057363 /arch/i386/kernel/cpu/mtrr/cyrix.c
parentd0aff6e6f4e54f79f9c89d147d371bad384454e9 (diff)
downloadlinux-0-day-17304383ebc1ce68a88030ac4d18ea549d9578c7.tar.gz
linux-0-day-17304383ebc1ce68a88030ac4d18ea549d9578c7.tar.xz
i386: fix PGE mask
cr4 is a 32-bit register, so casting the mask to an unsigned char is wrong, as it clears more than the PGE bit. Signed-off-by: Brian Gerst <bgerst@didntduck.org> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/i386/kernel/cpu/mtrr/cyrix.c')
-rw-r--r--arch/i386/kernel/cpu/mtrr/cyrix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/i386/kernel/cpu/mtrr/cyrix.c b/arch/i386/kernel/cpu/mtrr/cyrix.c
index 0737a596db434..9edf5625584fc 100644
--- a/arch/i386/kernel/cpu/mtrr/cyrix.c
+++ b/arch/i386/kernel/cpu/mtrr/cyrix.c
@@ -136,7 +136,7 @@ static void prepare_set(void)
/* Save value of CR4 and clear Page Global Enable (bit 7) */
if ( cpu_has_pge ) {
cr4 = read_cr4();
- write_cr4(cr4 & (unsigned char) ~(1 << 7));
+ write_cr4(cr4 & ~X86_CR4_PGE);
}
/* Disable and flush caches. Note that wbinvd flushes the TLBs as