aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/tlbflush.h
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2018-07-25 17:34:32 +0100
committerMark Brown <broonie@kernel.org>2018-07-25 17:34:32 +0100
commit606b3effb9ce2ab6f67eeecace381c701d411ecf (patch)
tree2f9478b4cdd0703734c76570f61309b304de0933 /arch/x86/include/asm/tlbflush.h
parent1c6a1d5ae62dbaec8922761f56332e6e830b32a4 (diff)
parent762b585c492fedda1b0bc4c6d0a867307bf7cd0f (diff)
Merge tag 'v4.4.144' into linux-linaro-lsk-v4.4lsk-v4.4-18.07
This is the 4.4.144 stable release
Diffstat (limited to 'arch/x86/include/asm/tlbflush.h')
-rw-r--r--arch/x86/include/asm/tlbflush.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/include/asm/tlbflush.h
index e2a89d2577fb..72cfe3e53af1 100644
--- a/arch/x86/include/asm/tlbflush.h
+++ b/arch/x86/include/asm/tlbflush.h
@@ -68,6 +68,8 @@ static inline void invpcid_flush_all_nonglobals(void)
struct tlb_state {
struct mm_struct *active_mm;
int state;
+ /* last user mm's ctx id */
+ u64 last_ctx_id;
/*
* Access to this CR4 shadow and to H/W CR4 is protected by
@@ -109,6 +111,16 @@ static inline void cr4_clear_bits(unsigned long mask)
}
}
+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)
{