Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'x86_mm_for_6.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 mm update from Dave Hansen:
"A single change to remove an open-coded TLB flush operation by using
an existing helper. This came out of Rik van Riel's work to get the
INVLPGB instruction working.

- Change cpa_flush() to call flush_kernel_range() directly"

* tag 'x86_mm_for_6.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/mm: Change cpa_flush() to call flush_kernel_range() directly

+7 -13
+7 -13
arch/x86/mm/pat/set_memory.c
··· 399 399 on_each_cpu(__cpa_flush_all, (void *) cache, 1); 400 400 } 401 401 402 - static void __cpa_flush_tlb(void *data) 403 - { 404 - struct cpa_data *cpa = data; 405 - unsigned int i; 406 - 407 - for (i = 0; i < cpa->numpages; i++) 408 - flush_tlb_one_kernel(fix_addr(__cpa_addr(cpa, i))); 409 - } 410 - 411 402 static int collapse_large_pages(unsigned long addr, struct list_head *pgtables); 412 403 413 404 static void cpa_collapse_large_pages(struct cpa_data *cpa) ··· 435 444 436 445 static void cpa_flush(struct cpa_data *cpa, int cache) 437 446 { 447 + unsigned long start, end; 438 448 unsigned int i; 439 449 440 450 BUG_ON(irqs_disabled() && !early_boot_irqs_disabled); ··· 445 453 goto collapse_large_pages; 446 454 } 447 455 448 - if (cpa->force_flush_all || cpa->numpages > tlb_single_page_flush_ceiling) 449 - flush_tlb_all(); 450 - else 451 - on_each_cpu(__cpa_flush_tlb, cpa, 1); 456 + start = fix_addr(__cpa_addr(cpa, 0)); 457 + end = fix_addr(__cpa_addr(cpa, cpa->numpages)); 458 + if (cpa->force_flush_all) 459 + end = TLB_FLUSH_ALL; 460 + 461 + flush_tlb_kernel_range(start, end); 452 462 453 463 if (!cache) 454 464 goto collapse_large_pages;