Re: [PATCH v1 20/36] mips: mm: convert __flush_dcache_pages() to __flush_dcache_folio_pages()
David Hildenbrand <[email protected]>
| Newsgroups | com.zx2c4.lists.wireguard,dev.linux.lists.iommu,dev.linux.lists.virtualization,org.freedesktop.lists.dri-devel,org.freedesktop.lists.intel-gfx,org.infradead.lists.linux-arm-kernel,org.infradead.lists.linux-riscv,org.kernel.vger.io-uring,org.kernel.vger.kvm,org.kernel.vger.linux-crypto,org.kernel.vger.linux-ide,org.kernel.vger.linux-kernel,org.kernel.vger.linux-kselftest,org.kernel.vger.linux-mips,org.kernel.vger.linux-mmc,org.kernel.vger.linux-s390,org.kernel.vger.linux-scsi,org.kernel.vger.netdev,org.kvack.linux-mm |
|---|---|
| Message-ID | <[email protected]> |
On 29.08.25 14:51, Lorenzo Stoakes wrote: > On Thu, Aug 28, 2025 at 10:51:46PM +0200, David Hildenbrand wrote: >> On 28.08.25 18:57, Lorenzo Stoakes wrote: >>> On Thu, Aug 28, 2025 at 12:01:24AM +0200, David Hildenbrand wrote: >>>> Let's make it clearer that we are operating within a single folio by >>>> providing both the folio and the page. >>>> >>>> This implies that for flush_dcache_folio() we'll now avoid one more >>>> page->folio lookup, and that we can safely drop the "nth_page" usage. >>>> >>>> Cc: Thomas Bogendoerfer <[email protected]> >>>> Signed-off-by: David Hildenbrand <[email protected]> >>>> --- >>>> arch/mips/include/asm/cacheflush.h | 11 +++++++---- >>>> arch/mips/mm/cache.c | 8 ++++---- >>>> 2 files changed, 11 insertions(+), 8 deletions(-) >>>> >>>> diff --git a/arch/mips/include/asm/cacheflush.h b/arch/mips/include/asm/cacheflush.h >>>> index 5d283ef89d90d..8d79bfc687d21 100644 >>>> --- a/arch/mips/include/asm/cacheflush.h >>>> +++ b/arch/mips/include/asm/cacheflush.h >>>> @@ -50,13 +50,14 @@ extern void (*flush_cache_mm)(struct mm_struct *mm); >>>> extern void (*flush_cache_range)(struct vm_area_struct *vma, >>>> unsigned long start, unsigned long end); >>>> extern void (*flush_cache_page)(struct vm_area_struct *vma, unsigned long page, unsigned long pfn); >>>> -extern void __flush_dcache_pages(struct page *page, unsigned int nr); >>>> +extern void __flush_dcache_folio_pages(struct folio *folio, struct page *page, unsigned int nr); >>> >>> NIT: Be good to drop the extern. >> >> I think I'll leave the one in, though, someone should clean up all of them >> in one go. > > This is how we always clean these up though, buuut to be fair that's in mm. > Well, okay, I'll make all the other functions jealous and blame it on you! :P -- Cheers David / dhildenb