diff options
author | Andy Lutomirski <luto@kernel.org> | 2016-09-29 12:48:12 -0700 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2016-09-30 12:40:12 +0200 |
commit | 1ef55be16ed69538f89e0a6508be5e62fdc9851c (patch) | |
tree | 623f3cb97a13b616e813aeadb46a56689d555141 /arch/x86/include/asm/tlbflush.h | |
parent | d7e25c66c9bf882450060fd9464e784bd229d3ae (diff) | |
download | linux-stable-1ef55be16ed69538f89e0a6508be5e62fdc9851c.tar.gz linux-stable-1ef55be16ed69538f89e0a6508be5e62fdc9851c.tar.bz2 linux-stable-1ef55be16ed69538f89e0a6508be5e62fdc9851c.zip |
x86/asm: Get rid of __read_cr4_safe()
We use __read_cr4() vs __read_cr4_safe() inconsistently. On
CR4-less CPUs, all CR4 bits are effectively clear, so we can make
the code simpler and more robust by making __read_cr4() always fix
up faults on 32-bit kernels.
This may fix some bugs on old 486-like CPUs, but I don't have any
easy way to test that.
Signed-off-by: Andy Lutomirski <luto@kernel.org>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: david@saggiorato.net
Link: http://lkml.kernel.org/r/ea647033d357d9ce2ad2bbde5a631045f5052fb6.1475178370.git.luto@kernel.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/include/asm/tlbflush.h')
-rw-r--r-- | arch/x86/include/asm/tlbflush.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/include/asm/tlbflush.h index dee8a70382ba..6fa85944af83 100644 --- a/arch/x86/include/asm/tlbflush.h +++ b/arch/x86/include/asm/tlbflush.h @@ -81,7 +81,7 @@ DECLARE_PER_CPU_SHARED_ALIGNED(struct tlb_state, cpu_tlbstate); /* Initialize cr4 shadow for this CPU. */ static inline void cr4_init_shadow(void) { - this_cpu_write(cpu_tlbstate.cr4, __read_cr4_safe()); + this_cpu_write(cpu_tlbstate.cr4, __read_cr4()); } /* Set in this cpu's CR4. */ |