[PATCH 2/2] sparc: Allow nesting of lazy MMU mode

2023-10-12 Thread Matthew Wilcox (Oracle)
As noted in commit 49147beb0ccb ("x86/xen: allow nesting of same lazy mode"), we can now nest calls to arch_enter_lazy_mmu_mode(). Use ->active as a counter instead of a flag and only drain the batch when the counter hits 0. Signed-off-by: Matthew Wilcox (Oracle) Fixes: bcc6cc832

[PATCH 1/2] powerpc: Allow nesting of lazy MMU mode

2023-10-12 Thread Matthew Wilcox (Oracle)
As noted in commit 49147beb0ccb ("x86/xen: allow nesting of same lazy mode"), we can now nest calls to arch_enter_lazy_mmu_mode(). Use ->active as a counter instead of a flag and only drain the batch when the counter hits 0. Signed-off-by: Matthew Wilcox (Oracle) Fixes: bcc6cc832

[PATCH 0/2] Allow nesting of lazy MMU mode

2023-10-12 Thread Matthew Wilcox (Oracle)
e problem that Erhard reported. Matthew Wilcox (Oracle) (2): powerpc: Allow nesting of lazy MMU mode sparc: Allow nesting of lazy MMU mode arch/powerpc/include/asm/book3s/64/tlbflush-hash.h | 5 ++--- arch/sparc/mm/tlb.c| 5 ++--- 2 files changed, 4 inserti

[PATCH v6 21/38] powerpc: Implement the new page table range API

2023-08-02 Thread Matthew Wilcox (Oracle)
Add set_ptes(), update_mmu_cache_range() and flush_dcache_folio(). Change the PG_arch_1 (aka PG_dcache_dirty) flag from being per-page to per-folio. Signed-off-by: Matthew Wilcox (Oracle) Acked-by: Mike Rapoport (IBM) Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: linuxppc

[PATCH v5 21/38] powerpc: Implement the new page table range API

2023-07-10 Thread Matthew Wilcox (Oracle)
Add set_ptes(), update_mmu_cache_range() and flush_dcache_folio(). Change the PG_arch_1 (aka PG_dcache_dirty) flag from being per-page to per-folio. Signed-off-by: Matthew Wilcox (Oracle) Acked-by: Mike Rapoport (IBM) Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: linuxppc

[PATCH v4 20/36] powerpc: Implement the new page table range API

2023-03-14 Thread Matthew Wilcox (Oracle)
Add set_ptes(), update_mmu_cache_range() and flush_dcache_folio(). Change the PG_arch_1 (aka PG_dcache_dirty) flag from being per-page to per-folio. Signed-off-by: Matthew Wilcox (Oracle) Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: linuxppc-dev@lists.ozlabs.org --- arch

[PATCH v3 19/34] powerpc: Implement the new page table range API

2023-02-28 Thread Matthew Wilcox (Oracle)
Add set_ptes(), update_mmu_cache_range() and flush_dcache_folio(). Change the PG_arch_1 (aka PG_dcache_dirty) flag from being per-page to per-folio. Signed-off-by: Matthew Wilcox (Oracle) Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: linuxppc-dev@lists.ozlabs.org --- arch

[PATCH v2 18/30] powerpc: Implement the new page table range API

2023-02-27 Thread Matthew Wilcox (Oracle)
moval of flush_dcache_icache_phys(). Please review. Signed-off-by: Matthew Wilcox (Oracle) Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: linuxppc-dev@lists.ozlabs.org --- arch/powerpc/include/asm/book3s/pgtable.h | 10 +-- arch/powerpc/include/asm/cacheflush.h

[PATCH v5 25/32] powerpc: Convert to printbuf

2022-08-07 Thread Matthew Wilcox (Oracle)
From: Kent Overstreet This converts from seq_buf to printbuf. We're using printbuf in external buffer mode, so it's a direct conversion, aside from some trivial refactoring in cpu_show_meltdown() to make the code more consistent. Signed-off-by: Kent Overstreet Cc: linuxppc-dev@lists.ozlabs.org

[PATCH 2/2] mm: Indicate pfmemalloc pages in compound_head

2021-04-16 Thread Matthew Wilcox (Oracle)
loc(). Since page_pool doesn't want to set its magic value on pages which are pfmemalloc, we can use bit 1 of compound_head to indicate that the page came from the memory reserves. Signed-off-by: Matthew Wilcox (Oracle) --- include/linux/mm.h | 12 +++- include/linux/mm_type

[PATCH 1/2] mm: Fix struct page layout on 32-bit systems

2021-04-16 Thread Matthew Wilcox (Oracle)
d a racing get_user_pages_fast() could dereference a bogus compound_head(). Fixes: c25fff7171be ("mm: add dma_addr_t to struct page") Signed-off-by: Matthew Wilcox (Oracle) --- include/linux/mm_types.h | 4 ++-- include/net/page_pool.h | 12 +++- net/core/page_pool.c | 12 +

[PATCH 0/2] Change struct page layout for page_pool

2021-04-16 Thread Matthew Wilcox (Oracle)
s new functionality. It is much less urgent. I'd really like to see Mel & Michal's thoughts on it. I have only compile-tested these patches. Matthew Wilcox (Oracle) (2): mm: Fix struct page layout on 32-bit systems mm: Indicate pfmemalloc pages in compound_head include/li

[PATCH 1/1] mm: Fix struct page layout on 32-bit systems

2021-04-10 Thread Matthew Wilcox (Oracle)
be cleared on free. To avoid this, insert three words of padding and use the same bits as ->index and ->private, neither of which have to be cleared on free. Fixes: c25fff7171be ("mm: add dma_addr_t to struct page") Signed-off-by: Matthew Wilco

[PATCH 0/1] Fix struct page layout on 32-bit systems

2021-04-10 Thread Matthew Wilcox (Oracle)
I'd really appreciate people testing this, particularly on arm32/mips32/ppc32 systems with a 64-bit dma_addr_t. Matthew Wilcox (Oracle) (1): mm: Fix struct page layout on 32-bit systems include/linux/mm_types.h | 38 ++ 1 file changed, 26 insertions(+

[PATCH v2 1/4] mm/vmalloc: Change the 'caller' type to unsigned long

2021-03-24 Thread Matthew Wilcox (Oracle)
explicit function name. Signed-off-by: Matthew Wilcox (Oracle) --- arch/arm/include/asm/io.h | 6 +-- arch/arm/include/asm/mach/map.h | 3 -- arch/arm/kernel/module.c | 4 +- arch/arm/mach-imx/mm-imx3.c | 2 +- arch/arm/mach-ixp4xx/common.c