kaiser: kaiser_flush_tlb_on_return_to_user() check PCID
authorHugh Dickins <hughd@google.com>
Sun, 5 Nov 2017 01:43:06 +0000 (18:43 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Jan 2018 14:44:26 +0000 (15:44 +0100)
commit8eaca4c7d9f167209a9cc568ff028c0a3b0deb2d
tree48ec83c343ba139184c0c2b470c3e2181dfaaae6
parent0651b3ad99dd59269e2ec883338ab8fba617e203
kaiser: kaiser_flush_tlb_on_return_to_user() check PCID

Let kaiser_flush_tlb_on_return_to_user() do the X86_FEATURE_PCID
check, instead of each caller doing it inline first: nobody needs
to optimize for the noPCID case, it's clearer this way, and better
suits later changes.  Replace those no-op X86_CR3_PCID_KERN_FLUSH lines
by a BUILD_BUG_ON() in load_new_mm_cr3(), in case something changes.

Signed-off-by: Hugh Dickins <hughd@google.com>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/include/asm/tlbflush.h
arch/x86/mm/kaiser.c
arch/x86/mm/tlb.c