]> Gentwo Git Trees - linux/.git/commit
x86/mm: Change cpa_flush() to call flush_kernel_range() directly
authorYu-cheng Yu <yu-cheng.yu@intel.com>
Fri, 6 Jun 2025 17:10:35 +0000 (13:10 -0400)
committerDave Hansen <dave.hansen@linux.intel.com>
Fri, 22 Aug 2025 14:55:21 +0000 (07:55 -0700)
commit86e6815b316ec0ea8c4bb3c16a033219a52b6060
treeda55e95401e110e9026da49aefb1bbf8eef72d00
parentc17b750b3ad9f45f2b6f7e6f7f4679844244f0b9
x86/mm: Change cpa_flush() to call flush_kernel_range() directly

The function cpa_flush() calls __flush_tlb_one_kernel() and
flush_tlb_all().

Replacing that with a call to flush_tlb_kernel_range() allows
cpa_flush() to make use of INVLPGB or RAR without any additional
changes.

Initialize invlpgb_count_max to 1, since flush_tlb_kernel_range()
can now be called before invlpgb_count_max has been initialized
to the value read from CPUID.

[riel: remove now unused __cpa_flush_tlb]

Signed-off-by: Yu-cheng Yu <yu-cheng.yu@intel.com>
Signed-off-by: Rik van Riel <riel@surriel.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Acked-by: Dave Hansen <dave.hansen@linux.intel.com>
Link: https://lore.kernel.org/all/20250606171112.4013261-4-riel%40surriel.com
arch/x86/mm/pat/set_memory.c