x86/mm: Refactor cond_ibpb() to support other use cases
authorBalbir Singh <sblbir@amazon.com>
Fri, 8 Jan 2021 12:10:53 +0000 (23:10 +1100)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 28 Jul 2021 09:42:24 +0000 (11:42 +0200)
commit371b09c6fdc436f2c7bb67fc90df5eec8ce90f06
tree949e5b76dda3e20cbc5eceadbadaf9476aeda12c
parentc52787b590634646d4da3d8f23c4532ba050d40d
x86/mm: Refactor cond_ibpb() to support other use cases

cond_ibpb() has the necessary bits required to track the previous mm in
switch_mm_irqs_off(). This can be reused for other use cases like L1D
flushing on context switch.

Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Balbir Singh <sblbir@amazon.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20210108121056.21940-3-sblbir@amazon.com
arch/x86/include/asm/tlbflush.h
arch/x86/mm/tlb.c