Commit 68799c0
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
(cherry picked from commit 86e6815)
Signed-off-by: Michael Roth <michael.roth@amd.com>1 parent 4ccd326 commit 68799c0
1 file changed
+7
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
399 | 399 | | |
400 | 400 | | |
401 | 401 | | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | 402 | | |
412 | 403 | | |
413 | 404 | | |
| |||
444 | 435 | | |
445 | 436 | | |
446 | 437 | | |
| 438 | + | |
447 | 439 | | |
448 | 440 | | |
449 | 441 | | |
| |||
453 | 445 | | |
454 | 446 | | |
455 | 447 | | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
460 | 454 | | |
461 | 455 | | |
462 | 456 | | |
| |||
0 commit comments