From: Ingo Molnar Date: Thu, 20 Apr 2017 08:07:12 +0000 (+0200) Subject: Merge branch 'WIP.x86/process' into perf/core X-Git-Tag: v4.12-rc1~152^2^2~23 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=afa7a17f3aafb64647ba4cd38e20f3d678c7949b;hp=-c;p=karo-tx-linux.git Merge branch 'WIP.x86/process' into perf/core --- afa7a17f3aafb64647ba4cd38e20f3d678c7949b diff --combined arch/x86/include/asm/tlbflush.h index fc5abff9b7fd,ff4923a19f79..75d002bdb3f3 --- a/arch/x86/include/asm/tlbflush.h +++ b/arch/x86/include/asm/tlbflush.h @@@ -110,6 -110,16 +110,16 @@@ static inline void cr4_clear_bits(unsig } } + static inline void cr4_toggle_bits(unsigned long mask) + { + unsigned long cr4; + + cr4 = this_cpu_read(cpu_tlbstate.cr4); + cr4 ^= mask; + this_cpu_write(cpu_tlbstate.cr4, cr4); + __write_cr4(cr4); + } + /* Read the CR4 shadow. */ static inline unsigned long cr4_read_shadow(void) { @@@ -188,7 -198,7 +198,7 @@@ static inline void __native_flush_tlb_s static inline void __flush_tlb_all(void) { - if (static_cpu_has(X86_FEATURE_PGE)) + if (boot_cpu_has(X86_FEATURE_PGE)) __flush_tlb_global(); else __flush_tlb();