x86/mm/cpa: Fold cpa_flush_range() and cpa_flush_array() into a single cpa_flush...
authorPeter Zijlstra <peterz@infradead.org>
Mon, 3 Dec 2018 17:03:51 +0000 (18:03 +0100)
committerIngo Molnar <mingo@kernel.org>
Mon, 17 Dec 2018 17:54:28 +0000 (18:54 +0100)
commitfe0937b24ff5d7b343b9922201e469f9a6009d9d
treecf1135d30172decce155f63d648bb4e27fd8e1f2
parent83b4e39146aa70913580966e0f2b78b7c3492760
x86/mm/cpa: Fold cpa_flush_range() and cpa_flush_array() into a single cpa_flush() function

Note that the cache flush loop in cpa_flush_*() is identical when we
use __cpa_addr(); further observe that flush_tlb_kernel_range() is a
special case of to the cpa_flush_array() TLB invalidation code.

This then means the two functions are virtually identical. Fold these
two functions into a single cpa_flush() call.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rik van Riel <riel@surriel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tom.StDenis@amd.com
Cc: dave.hansen@intel.com
Link: http://lkml.kernel.org/r/20181203171043.559855600@infradead.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/mm/pageattr.c