Re: [PATCH v3 22/34] superh: Implement the new page table range API
From: Geert Uytterhoeven
Date: Wed Mar 01 2023 - 03:06:40 EST
Hi Willy,
On Tue, Feb 28, 2023 at 10:39 PM Matthew Wilcox (Oracle)
<willy@xxxxxxxxxxxxx> wrote:
> Add set_ptes(), update_mmu_cache_range(), flush_dcache_folio() and
> flush_icache_pages(). Change the PG_dcache_clean flag from being
> per-page to per-folio. Flush the entire folio containing the pages in
> flush_icache_pages() for ease of implementation.
>
> Signed-off-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx>
Thanks for your patch!
> --- a/arch/sh/mm/cache.c
> +++ b/arch/sh/mm/cache.c
> void __flush_anon_page(struct page *page, unsigned long vmaddr)
> {
> + struct folio *folio = page_folio(page);
> unsigned long addr = (unsigned long) page_address(page);
>
> if (pages_do_alias(addr, vmaddr)) {
> - if (boot_cpu_data.dcache.n_aliases && page_mapcount(page) &&
> - test_bit(PG_dcache_clean, &page->flags)) {
> + if (boot_cpu_data.dcache.n_aliases && folio_mapped(folio) &&
> + test_bit(PG_dcache_clean, &folio->flags)) {
> void *kaddr;
>
> kaddr = kmap_coherent(page, vmaddr);
> /* XXX.. For now kunmap_coherent() does a purge */
> /* __flush_purge_region((void *)kaddr, PAGE_SIZE); */
> kunmap_coherent(kaddr);
> - } else
> - __flush_purge_region((void *)addr, PAGE_SIZE);
> + } else
Trailing whitespace. Please run scripts/checkpath.pl (on the full series).
> + __flush_purge_region(folio_address(folio),
> + folio_size(folio));
> }
> }
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds