Skip to content

Commit

Permalink
mm: Use flush_icache_pages() in do_set_pmd()
Browse files Browse the repository at this point in the history
Push the iteration over each page down to the architectures (many
can flush the entire THP without iteration).

Signed-off-by: Matthew Wilcox (Oracle) <[email protected]>
  • Loading branch information
Matthew Wilcox (Oracle) authored and xen0n committed Mar 7, 2023
1 parent 4a47638 commit 68e994b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mm/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -4231,8 +4231,7 @@ vm_fault_t do_set_pmd(struct vm_fault *vmf, struct page *page)
if (unlikely(!pmd_none(*vmf->pmd)))
goto out;

for (i = 0; i < HPAGE_PMD_NR; i++)
flush_icache_page(vma, page + i);
flush_icache_pages(vma, page, HPAGE_PMD_NR);

entry = mk_huge_pmd(page, vma->vm_page_prot);
if (write)
Expand Down

0 comments on commit 68e994b

Please sign in to comment.