[PATCH] mm/hugetlb: Move page order check inside hugetlb_cma_reserve()

2024-02-08 Thread Anshuman Khandual
...@lists.infradead.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux...@kvack.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Anshuman Khandual --- This applies on v6.8-rc3 arch/arm64/mm/hugetlbpage.c | 7 --- arch/powerpc/mm/hugetlbpage.c | 4 +--- mm/hugetlb.c | 7

Re: [PATCH] mm/debug_vm_pgtable: Fix BUG_ON with pud advanced test

2024-01-28 Thread Anshuman Khandual
On 1/29/24 11:56, Aneesh Kumar K.V wrote: > On 1/29/24 11:52 AM, Anshuman Khandual wrote: >> >> >> On 1/29/24 11:30, Aneesh Kumar K.V (IBM) wrote: >>> Architectures like powerpc add debug checks to ensure we find only devmap >>> PUD pte en

Re: [PATCH] mm/debug_vm_pgtable: Fix BUG_ON with pud advanced test

2024-01-28 Thread Anshuman Khandual
On 1/29/24 11:30, Aneesh Kumar K.V (IBM) wrote: > Architectures like powerpc add debug checks to ensure we find only devmap > PUD pte entries. These debug checks are only done with CONFIG_DEBUG_VM. > This patch marks the ptes used for PUD advanced test devmap pte entries > so that we don't hit

Re: mm/debug_vm_pgtable.c:860 warning triggered

2023-11-05 Thread Anshuman Khandual
Hello Daniel, This test just ensures that PFN is preserved during pte <--> swap pte transformations , and the warning here seems to have been caused by powerpc platform specific helpers and/or its pte_t representation. Adding powerpc folks and platform mailing list here. - Anshuman On

Re: [PATCH 0/4] Invalidate secondary IOMMU TLB on permission upgrade

2023-07-18 Thread Anshuman Khandual
On 7/18/23 13:26, Alistair Popple wrote: > The main change is to move secondary TLB invalidation mmu notifier > callbacks into the architecture specific TLB flushing functions. This > makes secondary TLB invalidation mostly match CPU invalidation while > still allowing efficient range based

Re: [PATCH V2] mm: Merge pte_mkhuge() call into arch_make_huge_pte()

2023-03-01 Thread Anshuman Khandual
On 3/1/23 12:26, Christophe Leroy wrote: > Hi, > > Le 03/02/2022 à 04:57, Anshuman Khandual a écrit : >> Each call into pte_mkhuge() is invariably followed by arch_make_huge_pte(). >> Instead arch_make_huge_pte() can accommodate pte_mkhuge() at the beginning. >> Th

Re: [PATCH v7 1/2] mm/tlbbatch: Introduce arch_tlbbatch_should_defer()

2022-11-29 Thread Anshuman Khandual
On 11/30/22 07:53, Yicong Yang wrote: > On 2022/11/30 7:23, Andrew Morton wrote: >> On Thu, 17 Nov 2022 16:26:47 +0800 Yicong Yang wrote: >> >>> From: Anshuman Khandual >>> >>> The entire scheme of deferred TLB flush in reclaim path rests on the &g

Re: [PATCH v7 2/2] arm64: support batched/deferred tlb shootdown during page reclamation

2022-11-23 Thread Anshuman Khandual
> This patch extends arch_tlbbatch_add_mm() to take an address of the > target page to support the feature on arm64. Also rename it to > arch_tlbbatch_add_pending() to better match its function since we > don't need to handle the mm on arm64 and add_mm is not proper. > add_pending will mak

Re: [PATCH v6 2/2] arm64: support batched/deferred tlb shootdown during page reclamation

2022-11-15 Thread Anshuman Khandual
On 11/16/22 07:26, Nadav Amit wrote: > On Nov 15, 2022, at 5:50 PM, Yicong Yang wrote: > >> !! External Email >> >> On 2022/11/16 7:38, Nadav Amit wrote: >>> On Nov 14, 2022, at 7:14 PM, Yicong Yang wrote: >>> diff --git a/arch/x86/include/asm/tlbflush.h

Re: [PATCH v5 2/2] arm64: support batched/deferred tlb shootdown during page reclamation

2022-11-14 Thread Anshuman Khandual
On 11/14/22 14:16, Yicong Yang wrote: > On 2022/11/14 11:29, Anshuman Khandual wrote: >> >> On 10/28/22 13:42, Yicong Yang wrote: >>> +static inline bool arch_tlbbatch_should_defer(struct mm_struct *mm) >>> +{ >>> + /* >>> +* TLB b

Re: [PATCH v5 2/2] arm64: support batched/deferred tlb shootdown during page reclamation

2022-11-13 Thread Anshuman Khandual
On 10/28/22 13:42, Yicong Yang wrote: > +static inline bool arch_tlbbatch_should_defer(struct mm_struct *mm) > +{ > + /* > + * TLB batched flush is proved to be beneficial for systems with large > + * number of CPUs, especially system with more than 8 CPUs. TLB shutdown > + *

Re: [PATCH v4 2/2] arm64: support batched/deferred tlb shootdown during page reclamation

2022-10-27 Thread Anshuman Khandual
On 10/28/22 03:25, Barry Song wrote: > On Fri, Oct 28, 2022 at 3:19 AM Punit Agrawal > wrote: >> >> [ Apologies for chiming in late in the conversation ] >> >> Anshuman Khandual writes: >> >>> On 9/28/22 05:53, Barry Song wrote: >>>

Re: [PATCH v4 2/2] arm64: support batched/deferred tlb shootdown during page reclamation

2022-10-27 Thread Anshuman Khandual
On 10/28/22 03:37, Barry Song wrote: > On Thu, Oct 27, 2022 at 11:42 PM Anshuman Khandual > wrote: >> >> >> >> On 9/28/22 05:53, Barry Song wrote: >>> On Tue, Sep 27, 2022 at 10:15 PM Yicong Yang wrote: >>>> >>>> On 2022/9/27 14:

Re: [PATCH v4 2/2] arm64: support batched/deferred tlb shootdown during page reclamation

2022-10-27 Thread Anshuman Khandual
On 9/28/22 05:53, Barry Song wrote: > On Tue, Sep 27, 2022 at 10:15 PM Yicong Yang wrote: >> >> On 2022/9/27 14:16, Anshuman Khandual wrote: >>> [...] >>> >>> On 9/21/22 14:13, Yicong Yang wrote: >>>> +static inlin

Re: [PATCH v4 2/2] arm64: support batched/deferred tlb shootdown during page reclamation

2022-09-27 Thread Anshuman Khandual
[...] On 9/21/22 14:13, Yicong Yang wrote: > +static inline bool arch_tlbbatch_should_defer(struct mm_struct *mm) > +{ > + /* for small systems with small number of CPUs, TLB shootdown is cheap > */ > + if (num_online_cpus() <= 4) It would be great to have some more inputs from others,

Re: [PATCH v3 4/4] arm64: support batched/deferred tlb shootdown during page reclamation

2022-09-21 Thread Anshuman Khandual
On 9/21/22 12:47, Nadav Amit wrote: > On Sep 20, 2022, at 11:53 PM, Anshuman Khandual > wrote: > >> ⚠ External Email >> >> On 8/22/22 13:51, Yicong Yang wrote: >>> +static inline void arch_tlbbatch_add_mm(struct a

Re: [PATCH v3 4/4] arm64: support batched/deferred tlb shootdown during page reclamation

2022-09-21 Thread Anshuman Khandual
On 8/22/22 13:51, Yicong Yang wrote: > +static inline void arch_tlbbatch_add_mm(struct arch_tlbflush_unmap_batch > *batch, > + struct mm_struct *mm, > + unsigned long uaddr) > +{ > + __flush_tlb_page_nosync(mm, uaddr);

Re: [PATCH v3 4/4] arm64: support batched/deferred tlb shootdown during page reclamation

2022-09-20 Thread Anshuman Khandual
On 9/21/22 07:21, Barry Song wrote: > On Wed, Sep 21, 2022 at 1:50 PM Barry Song <21cn...@gmail.com> wrote: >> >> On Tue, Sep 20, 2022 at 8:45 PM Anshuman Khandual >> wrote: >>> >>> >>> >>> On 9/20/22 09:09, Barry Song wrote: >

Re: [PATCH v3 4/4] arm64: support batched/deferred tlb shootdown during page reclamation

2022-09-20 Thread Anshuman Khandual
On 9/20/22 09:09, Barry Song wrote: > On Tue, Sep 20, 2022 at 3:00 PM Anshuman Khandual > wrote: >> >> >> On 8/22/22 13:51, Yicong Yang wrote: >>> +static inline bool arch_tlbbatch_should_defer(struct mm_struct *mm) >>> +{ >>> + ret

Re: [PATCH v3 4/4] arm64: support batched/deferred tlb shootdown during page reclamation

2022-09-19 Thread Anshuman Khandual
On 8/22/22 13:51, Yicong Yang wrote: > +static inline bool arch_tlbbatch_should_defer(struct mm_struct *mm) > +{ > + return true; > +} This needs to be conditional on systems, where there will be performance improvements, and should not just be enabled all the time on all systems.

Re: [PATCH v3 4/4] arm64: support batched/deferred tlb shootdown during page reclamation

2022-09-18 Thread Anshuman Khandual
On 9/15/22 12:12, Barry Song wrote: > On Thu, Sep 15, 2022 at 6:07 PM Anshuman Khandual > wrote: >> >> >> >> On 9/9/22 11:05, Barry Song wrote: >>> On Fri, Sep 9, 2022 at 5:24 PM Anshuman Khandual >>> wrote: >>>> >>>&g

Re: [PATCH v3 4/4] arm64: support batched/deferred tlb shootdown during page reclamation

2022-09-18 Thread Anshuman Khandual
On 9/15/22 20:01, Nadav Amit wrote: > > >> On Sep 14, 2022, at 11:42 PM, Barry Song <21cn...@gmail.com> wrote: >> >>> >>> The very idea behind TLB deferral is the opportunity it (might) provide >>> to accumulate address ranges and cpu masks so that individual TLB flush >>> can be replaced

Re: [PATCH v3 4/4] arm64: support batched/deferred tlb shootdown during page reclamation

2022-09-15 Thread Anshuman Khandual
On 9/9/22 11:05, Barry Song wrote: > On Fri, Sep 9, 2022 at 5:24 PM Anshuman Khandual > wrote: >> >> >> >> On 8/22/22 13:51, Yicong Yang wrote: >>> From: Barry Song >>> >>> on x86, batched and deferred tlb shootdown has lead to 90% &g

Re: [PATCH v3 4/4] arm64: support batched/deferred tlb shootdown during page reclamation

2022-09-08 Thread Anshuman Khandual
On 8/22/22 13:51, Yicong Yang wrote: > From: Barry Song > > on x86, batched and deferred tlb shootdown has lead to 90% > performance increase on tlb shootdown. on arm64, HW can do > tlb shootdown without software IPI. But sync tlbi is still > quite expensive. > > Even running a simplest

Re: [PATCH v3 3/4] mm: rmap: Extend tlbbatch APIs to fit new platforms

2022-09-08 Thread Anshuman Khandual
On 8/22/22 13:51, Yicong Yang wrote: > From: Barry Song > > Add uaddr to tlbbatch APIs so that platforms like ARM64 are I guess 'uaddr' refers to a virtual address from the process address space itself ? Please be more specific. > able to apply this on their specific hardware features. For

Re: [PATCH v3 1/4] Revert "Documentation/features: mark BATCHED_UNMAP_TLB_FLUSH doesn't apply to ARM64"

2022-09-08 Thread Anshuman Khandual
On 8/22/22 13:51, Yicong Yang wrote: > From: Barry Song > > This reverts commit 6bfef171d0d74cb050112e0e49feb20bfddf7f42. > > I was wrong. Though ARM64 has hardware TLB flush, but it is not free > and it is still expensive. > We still have a good chance to enable batched and deferred TLB

Re: [PATCH v3 2/4] mm/tlbbatch: Introduce arch_tlbbatch_should_defer()

2022-09-08 Thread Anshuman Khandual
On 8/22/22 13:51, Yicong Yang wrote: > From: Anshuman Khandual > > The entire scheme of deferred TLB flush in reclaim path rests on the > fact that the cost to refill TLB entries is less than flushing out > individual entries by sending IPI to remote CPUs. But architecture >

Re: [PATCH V7 00/26] mm/mmap: Drop __SXXX/__PXXX macros from across platforms

2022-07-11 Thread Anshuman Khandual
On 7/12/22 01:44, Andrew Morton wrote: > On Mon, 11 Jul 2022 12:35:34 +0530 Anshuman Khandual > wrote: > >> This series drops __SXXX/__PXXX macros from across platforms in the tree. > > I've updated mm-unstable to this version, thanks. I skipped the added-to-mm >

[PATCH V7 26/26] mm/mmap: Drop ARCH_HAS_VM_GET_PAGE_PROT

2022-07-11 Thread Anshuman Khandual
: Andrew Morton Cc: linux...@kvack.org Cc: linux-ker...@vger.kernel.org Reviewed-by: Geert Uytterhoeven Reviewed-by: Christoph Hellwig Reviewed-by: Christophe Leroy Acked-by: Geert Uytterhoeven Signed-off-by: Anshuman Khandual --- arch/alpha/Kconfig | 1 - arch/arc/Kconfig| 1

[PATCH V7 25/26] sh/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-07-11 Thread Anshuman Khandual
: Yoshinori Sato Cc: Rich Felker Cc: linux...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/sh/Kconfig | 1 + arch/sh/include/asm/pgtable.h | 17 - arch/sh/mm/mmap.c | 20 3 files changed, 21

[PATCH V7 24/26] um/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-07-11 Thread Anshuman Khandual
Dike Cc: linux...@lists.infradead.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/um/Kconfig | 1 + arch/um/include/asm/pgtable.h | 17 - arch/um/kernel/mem.c | 20 arch/x86/um/mem_32.c | 2 +- 4

[PATCH V7 23/26] arm/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-07-11 Thread Anshuman Khandual
King Cc: Arnd Bergmann Cc: linux-arm-ker...@lists.infradead.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/arm/Kconfig | 1 + arch/arm/include/asm/pgtable.h | 17 - arch/arm/lib/uaccess_with_memcpy.c | 2 +- arch/arm/mm

[PATCH V7 19/26] ia64/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-07-11 Thread Anshuman Khandual
...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/ia64/Kconfig | 1 + arch/ia64/include/asm/pgtable.h | 18 -- arch/ia64/mm/init.c | 28 +++- 3 files changed, 28 insertions(+), 19

[PATCH V7 22/26] arc/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-07-11 Thread Anshuman Khandual
Gupta Cc: linux-snps-...@lists.infradead.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/arc/Kconfig | 1 + arch/arc/include/asm/pgtable-bits-arcv2.h | 18 -- arch/arc/mm/mmap.c| 20

[PATCH V7 18/26] s390/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-07-11 Thread Anshuman Khandual
Carstens Cc: Vasily Gorbik Cc: linux-s...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/s390/Kconfig | 1 + arch/s390/include/asm/pgtable.h | 17 - arch/s390/mm/mmap.c | 20 3 files changed

[PATCH V7 21/26] m68k/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-07-11 Thread Anshuman Khandual
Bogendoerfer Cc: linux-m...@lists.linux-m68k.org Cc: linux-ker...@vger.kernel.org Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven Signed-off-by: Anshuman Khandual --- arch/m68k/Kconfig| 1 + arch/m68k/include/asm/mcf_pgtable.h | 59

[PATCH V7 17/26] csky/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-07-11 Thread Anshuman Khandual
Uytterhoeven Cc: linux-c...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Acked-by: Guo Ren Signed-off-by: Anshuman Khandual --- arch/csky/Kconfig | 1 + arch/csky/include/asm/pgtable.h | 18 -- arch/csky/mm/init.c | 20 3 files

[PATCH V7 20/26] mips/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-07-11 Thread Anshuman Khandual
Bogendoerfer Cc: linux-m...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/mips/Kconfig | 1 + arch/mips/include/asm/pgtable.h | 22 -- arch/mips/mm/cache.c| 3 +++ 3 files changed, 4 insertions(+), 22

[PATCH V7 16/26] riscv/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-07-11 Thread Anshuman Khandual
Walmsley Cc: Palmer Dabbelt Cc: linux-ri...@lists.infradead.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/riscv/Kconfig | 1 + arch/riscv/include/asm/pgtable.h | 20 arch/riscv/mm/init.c | 20 3

[PATCH V7 15/26] nios2/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-07-11 Thread Anshuman Khandual
Nguyen Cc: linux-ker...@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/nios2/Kconfig | 1 + arch/nios2/include/asm/pgtable.h | 16 arch/nios2/mm/init.c | 20 3 files changed, 21 insertions(+), 16 deletions(-) diff --git

[PATCH V7 14/26] alpha/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-07-11 Thread Anshuman Khandual
Henderson Cc: linux-al...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/alpha/Kconfig | 1 + arch/alpha/include/asm/pgtable.h | 17 - arch/alpha/mm/init.c | 22 ++ 3 files changed, 23

[PATCH V7 13/26] parisc/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-07-11 Thread Anshuman Khandual
James E.J. Bottomley" Cc: linux-par...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/parisc/Kconfig | 1 + arch/parisc/include/asm/pgtable.h | 18 -- arch/parisc/mm/init.c | 20 3 fil

[PATCH V7 12/26] hexagon/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-07-11 Thread Anshuman Khandual
Cain Cc: linux-hexa...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Acked-by: Brian Cain Signed-off-by: Anshuman Khandual --- arch/hexagon/Kconfig | 1 + arch/hexagon/include/asm/pgtable.h | 27 --- arch/hexagon/mm/init.c | 42

[PATCH V7 11/26] xtensa/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-07-11 Thread Anshuman Khandual
Zankel Cc: Guo Ren Cc: linux-xte...@linux-xtensa.org Cc: linux-c...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/xtensa/Kconfig | 1 + arch/xtensa/include/asm/pgtable.h | 18 -- arch/xtensa/mm/init.c | 22

[PATCH V7 09/26] loongarch/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-07-11 Thread Anshuman Khandual
Chen Cc: WANG Xuerui Cc: linux-ker...@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/loongarch/Kconfig| 1 + arch/loongarch/include/asm/pgtable-bits.h | 19 -- arch/loongarch/mm/cache.c | 46 +++ 3 files changed, 47

[PATCH V7 08/26] microblaze/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-07-11 Thread Anshuman Khandual
Simek Cc: linux-ker...@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/microblaze/Kconfig | 1 + arch/microblaze/include/asm/pgtable.h | 17 - arch/microblaze/mm/init.c | 20 3 files changed, 21 insertions(+), 17 deletions

[PATCH V7 07/26] mm/mmap: Build protect protection_map[] with ARCH_HAS_VM_GET_PAGE_PROT

2022-07-11 Thread Anshuman Khandual
Reviewed-by: Christophe Leroy Signed-off-by: Anshuman Khandual --- include/linux/mm.h | 2 +- mm/mmap.c | 5 + 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index 0ff0a1bad091..07b56995e0fe 100644 --- a/include/linux/mm.h +++ b

[PATCH V7 10/26] openrisc/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-07-11 Thread Anshuman Khandual
Bonn Cc: openr...@lists.librecores.org Cc: linux-ker...@vger.kernel.org Acked-by: Stafford Horne Signed-off-by: Anshuman Khandual --- arch/openrisc/Kconfig | 1 + arch/openrisc/include/asm/pgtable.h | 18 -- arch/openrisc/mm/init.c | 20

[PATCH V7 06/26] x86/mm: Move protection_map[] inside the platform

2022-07-11 Thread Anshuman Khandual
Reviewed-by: Christoph Hellwig Signed-off-by: Anshuman Khandual --- arch/x86/include/asm/mem_encrypt.h | 2 ++ arch/x86/include/asm/pgtable_types.h | 19 --- arch/x86/mm/mem_encrypt_amd.c| 6 ++ arch/x86/mm/pgprot.c | 28

[PATCH V7 05/26] arm64/mm: Move protection_map[] inside the platform

2022-07-11 Thread Anshuman Khandual
This moves protection_map[] inside the platform and makes it a static. Cc: Catalin Marinas Cc: Will Deacon Cc: linux-arm-ker...@lists.infradead.org Cc: linux-ker...@vger.kernel.org Reviewed-by: Catalin Marinas Signed-off-by: Anshuman Khandual --- arch/arm64/include/asm/pgtable-prot.h | 18

[PATCH V7 04/26] sparc/mm: Move protection_map[] inside the platform

2022-07-11 Thread Anshuman Khandual
This moves protection_map[] inside the platform and while here, also enable ARCH_HAS_VM_GET_PAGE_PROT on 32 bit platforms via DECLARE_VM_GET_PAGE_PROT. Cc: "David S. Miller" Cc: sparcli...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Reviewed-by: Sam Ravnborg Signed-off-by

[PATCH V7 03/26] powerpc/mm: Move protection_map[] inside the platform

2022-07-11 Thread Anshuman Khandual
...@vger.kernel.org Reviewed-by: Christophe Leroy Signed-off-by: Anshuman Khandual --- arch/powerpc/Kconfig | 2 +- arch/powerpc/include/asm/pgtable.h | 20 +--- arch/powerpc/mm/pgtable.c | 24 3 files changed, 26 insertions(+), 20

[PATCH V7 02/26] mm/mmap: Define DECLARE_VM_GET_PAGE_PROT

2022-07-11 Thread Anshuman Khandual
: linux-ker...@vger.kernel.org Reviewed-by: Christophe Leroy Suggested-by: Christoph Hellwig Signed-off-by: Anshuman Khandual --- include/linux/pgtable.h | 28 mm/mmap.c | 26 +- 2 files changed, 29 insertions(+), 25 deletions(-) diff

[PATCH V7 01/26] mm/mmap: Build protect protection_map[] with __P000

2022-07-11 Thread Anshuman Khandual
now. Cc: Andrew Morton Cc: linux...@kvack.org Cc: linux-ker...@vger.kernel.org Reviewed-by: Christoph Hellwig Reviewed-by: Christophe Leroy Suggested-by: Christophe Leroy Signed-off-by: Anshuman Khandual --- include/linux/mm.h | 2 ++ mm/mmap.c | 2 ++ 2 files changed, 4 insertions

[PATCH V7 00/26] mm/mmap: Drop __SXXX/__PXXX macros from across platforms

2022-07-11 Thread Anshuman Khandual
: linux-arm-ker...@lists.infradead.org Cc: linux...@lists.infradead.org Cc: linux...@vger.kernel.org Cc: linux...@kvack.org Cc: linux-ker...@vger.kernel.org Anshuman Khandual (26): mm/mmap: Build protect protection_map[] with __P000 mm/mmap: Define DECLARE_VM_GET_PAGE_PROT powerpc/mm: Move

Re: [PATCH V6 21/26] m68k/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-07-06 Thread Anshuman Khandual
On 7/6/22 15:33, Geert Uytterhoeven wrote: > Hi Anshuman, > > On Thu, Jun 30, 2022 at 7:19 AM Anshuman Khandual > wrote: >> This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard >> vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE

Re: [PATCH V6 00/26] mm/mmap: Drop __SXXX/__PXXX macros from across platforms

2022-07-06 Thread Anshuman Khandual
On 7/6/22 12:34, Arnd Bergmann wrote: > On Wed, Jul 6, 2022 at 8:33 AM Christophe Leroy > wrote: > >> As far as I can see in Kconfig, CONFIG_MMU is user selectable on the >> following architectures: >> - ARM >> - M68K >> - RISCV >> - SH >> >> And is disabled by default on XTENSA. > > Right,

Re: [PATCH V6 00/26] mm/mmap: Drop __SXXX/__PXXX macros from across platforms

2022-07-05 Thread Anshuman Khandual
On 6/30/22 10:46, Anshuman Khandual wrote: > __SXXX/__PXXX macros is an unnecessary abstraction layer in creating the > generic protection_map[] array which is used for vm_get_page_prot(). This > abstraction layer can be avoided, if the platforms just define the array > protection_m

[PATCH V6 26/26] mm/mmap: Drop ARCH_HAS_VM_GET_PAGE_PROT

2022-06-29 Thread Anshuman Khandual
: Andrew Morton Cc: linux...@kvack.org Cc: linux-ker...@vger.kernel.org Reviewed-by: Christoph Hellwig Reviewed-by: Christophe Leroy Signed-off-by: Anshuman Khandual --- arch/alpha/Kconfig | 1 - arch/arc/Kconfig| 1 - arch/arm/Kconfig| 1 - arch/arm64/Kconfig | 1

[PATCH V6 25/26] sh/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-29 Thread Anshuman Khandual
: Yoshinori Sato Cc: Rich Felker Cc: linux...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/sh/Kconfig | 1 + arch/sh/include/asm/pgtable.h | 17 - arch/sh/mm/mmap.c | 20 3 files changed, 21

[PATCH V6 24/26] um/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-29 Thread Anshuman Khandual
Dike Cc: linux...@lists.infradead.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/um/Kconfig | 1 + arch/um/include/asm/pgtable.h | 17 - arch/um/kernel/mem.c | 20 arch/x86/um/mem_32.c | 2 +- 4

[PATCH V6 23/26] arm/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-29 Thread Anshuman Khandual
King Cc: Arnd Bergmann Cc: linux-arm-ker...@lists.infradead.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/arm/Kconfig | 1 + arch/arm/include/asm/pgtable.h | 17 - arch/arm/lib/uaccess_with_memcpy.c | 2 +- arch/arm/mm

[PATCH V6 22/26] arc/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-29 Thread Anshuman Khandual
Gupta Cc: linux-snps-...@lists.infradead.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/arc/Kconfig | 1 + arch/arc/include/asm/pgtable-bits-arcv2.h | 18 -- arch/arc/mm/mmap.c| 20

[PATCH V6 21/26] m68k/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-29 Thread Anshuman Khandual
Bogendoerfer Cc: linux-m...@lists.linux-m68k.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/m68k/Kconfig| 1 + arch/m68k/include/asm/mcf_pgtable.h | 54 --- arch/m68k/include/asm/motorola_pgtable.h | 22

[PATCH V6 20/26] mips/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-29 Thread Anshuman Khandual
Bogendoerfer Cc: linux-m...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/mips/Kconfig | 1 + arch/mips/include/asm/pgtable.h | 22 -- arch/mips/mm/cache.c| 3 +++ 3 files changed, 4 insertions(+), 22

[PATCH V6 19/26] ia64/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-29 Thread Anshuman Khandual
...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/ia64/Kconfig | 1 + arch/ia64/include/asm/pgtable.h | 18 -- arch/ia64/mm/init.c | 28 +++- 3 files changed, 28 insertions(+), 19

[PATCH V6 18/26] s390/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-29 Thread Anshuman Khandual
Carstens Cc: Vasily Gorbik Cc: linux-s...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/s390/Kconfig | 1 + arch/s390/include/asm/pgtable.h | 17 - arch/s390/mm/mmap.c | 20 3 files changed

[PATCH V6 17/26] csky/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-29 Thread Anshuman Khandual
Uytterhoeven Cc: linux-c...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Acked-by: Guo Ren Signed-off-by: Anshuman Khandual --- arch/csky/Kconfig | 1 + arch/csky/include/asm/pgtable.h | 18 -- arch/csky/mm/init.c | 20 3 files

[PATCH V6 16/26] riscv/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-29 Thread Anshuman Khandual
Walmsley Cc: Palmer Dabbelt Cc: linux-ri...@lists.infradead.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/riscv/Kconfig | 1 + arch/riscv/include/asm/pgtable.h | 20 arch/riscv/mm/init.c | 20 3

[PATCH V6 15/26] nios2/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-29 Thread Anshuman Khandual
Nguyen Cc: linux-ker...@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/nios2/Kconfig | 1 + arch/nios2/include/asm/pgtable.h | 16 arch/nios2/mm/init.c | 20 3 files changed, 21 insertions(+), 16 deletions(-) diff --git

[PATCH V6 14/26] alpha/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-29 Thread Anshuman Khandual
Henderson Cc: linux-al...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/alpha/Kconfig | 1 + arch/alpha/include/asm/pgtable.h | 17 - arch/alpha/mm/init.c | 22 ++ 3 files changed, 23

[PATCH V6 13/26] parisc/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-29 Thread Anshuman Khandual
James E.J. Bottomley" Cc: linux-par...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/parisc/Kconfig | 1 + arch/parisc/include/asm/pgtable.h | 18 -- arch/parisc/mm/init.c | 20 3 fil

[PATCH V6 12/26] hexagon/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-29 Thread Anshuman Khandual
Cain Cc: linux-hexa...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Acked-by: Brian Cain Signed-off-by: Anshuman Khandual --- arch/hexagon/Kconfig | 1 + arch/hexagon/include/asm/pgtable.h | 27 --- arch/hexagon/mm/init.c | 42

[PATCH V6 11/26] xtensa/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-29 Thread Anshuman Khandual
Zankel Cc: Guo Ren Cc: linux-xte...@linux-xtensa.org Cc: linux-c...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/xtensa/Kconfig | 1 + arch/xtensa/include/asm/pgtable.h | 18 -- arch/xtensa/mm/init.c | 20

[PATCH V6 10/26] openrisc/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-29 Thread Anshuman Khandual
Bonn Cc: openr...@lists.librecores.org Cc: linux-ker...@vger.kernel.org Acked-by: Stafford Horne Signed-off-by: Anshuman Khandual --- arch/openrisc/Kconfig | 1 + arch/openrisc/include/asm/pgtable.h | 18 -- arch/openrisc/mm/init.c | 20

[PATCH V6 09/26] loongarch/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-29 Thread Anshuman Khandual
Chen Cc: WANG Xuerui Cc: linux-ker...@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/loongarch/Kconfig| 1 + arch/loongarch/include/asm/pgtable-bits.h | 19 -- arch/loongarch/mm/cache.c | 46 +++ 3 files changed, 47

[PATCH V6 08/26] microblaze/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-29 Thread Anshuman Khandual
Simek Cc: linux-ker...@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/microblaze/Kconfig | 1 + arch/microblaze/include/asm/pgtable.h | 17 - arch/microblaze/mm/init.c | 20 3 files changed, 21 insertions(+), 17 deletions

[PATCH V6 07/26] mm/mmap: Build protect protection_map[] with ARCH_HAS_VM_GET_PAGE_PROT

2022-06-29 Thread Anshuman Khandual
Reviewed-by: Christophe Leroy Signed-off-by: Anshuman Khandual --- include/linux/mm.h | 2 +- mm/mmap.c | 5 + 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index 0ff0a1bad091..07b56995e0fe 100644 --- a/include/linux/mm.h +++ b

[PATCH V6 06/26] x86/mm: Move protection_map[] inside the platform

2022-06-29 Thread Anshuman Khandual
Reviewed-by: Christoph Hellwig Signed-off-by: Anshuman Khandual --- arch/x86/include/asm/pgtable_types.h | 19 --- arch/x86/mm/mem_encrypt_amd.c| 7 +++ arch/x86/mm/pgprot.c | 27 +++ 3 files changed, 30 insertions(+), 23

[PATCH V6 05/26] arm64/mm: Move protection_map[] inside the platform

2022-06-29 Thread Anshuman Khandual
This moves protection_map[] inside the platform and makes it a static. Cc: Catalin Marinas Cc: Will Deacon Cc: linux-arm-ker...@lists.infradead.org Cc: linux-ker...@vger.kernel.org Reviewed-by: Catalin Marinas Signed-off-by: Anshuman Khandual --- arch/arm64/include/asm/pgtable-prot.h | 18

[PATCH V6 04/26] sparc/mm: Move protection_map[] inside the platform

2022-06-29 Thread Anshuman Khandual
This moves protection_map[] inside the platform and while here, also enable ARCH_HAS_VM_GET_PAGE_PROT on 32 bit platforms via DECLARE_VM_GET_PAGE_PROT. Cc: "David S. Miller" Cc: sparcli...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Reviewed-by: Sam Ravnborg Signed-off-by

[PATCH V6 03/26] powerpc/mm: Move protection_map[] inside the platform

2022-06-29 Thread Anshuman Khandual
...@vger.kernel.org Reviewed-by: Christophe Leroy Signed-off-by: Anshuman Khandual --- arch/powerpc/Kconfig | 2 +- arch/powerpc/include/asm/pgtable.h | 20 +--- arch/powerpc/mm/pgtable.c | 24 3 files changed, 26 insertions(+), 20

[PATCH V6 02/26] mm/mmap: Define DECLARE_VM_GET_PAGE_PROT

2022-06-29 Thread Anshuman Khandual
: linux-ker...@vger.kernel.org Reviewed-by: Christophe Leroy Suggested-by: Christoph Hellwig Signed-off-by: Anshuman Khandual --- include/linux/pgtable.h | 28 mm/mmap.c | 26 +- 2 files changed, 29 insertions(+), 25 deletions(-) diff

[PATCH V6 01/26] mm/mmap: Build protect protection_map[] with __P000

2022-06-29 Thread Anshuman Khandual
now. Cc: Andrew Morton Cc: linux...@kvack.org Cc: linux-ker...@vger.kernel.org Reviewed-by: Christoph Hellwig Reviewed-by: Christophe Leroy Suggested-by: Christophe Leroy Signed-off-by: Anshuman Khandual --- include/linux/mm.h | 2 ++ mm/mmap.c | 2 ++ 2 files changed, 4 insertions

[PATCH V6 00/26] mm/mmap: Drop __SXXX/__PXXX macros from across platforms

2022-06-29 Thread Anshuman Khandual
...@lists.infradead.org Cc: linux...@vger.kernel.org Cc: linux...@kvack.org Cc: linux-ker...@vger.kernel.org Anshuman Khandual (26): mm/mmap: Build protect protection_map[] with __P000 mm/mmap: Define DECLARE_VM_GET_PAGE_PROT powerpc/mm: Move protection_map[] inside the platform sparc/mm: Move

Re: [PATCH V5 04/26] sparc/mm: Move protection_map[] inside the platform

2022-06-27 Thread Anshuman Khandual
On 6/27/22 22:44, Sam Ravnborg wrote: > Hi Anshuman, > > On Mon, Jun 27, 2022 at 10:28:11AM +0530, Anshuman Khandual wrote: >> This moves protection_map[] inside the platform and while here, also enable >> ARCH_HAS_VM_GET_PAGE_PROT on 32 bit platforms via DECLARE_VM_GE

[PATCH V5 18/26] s390/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-26 Thread Anshuman Khandual
Carstens Cc: Vasily Gorbik Cc: linux-s...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/s390/Kconfig | 1 + arch/s390/include/asm/pgtable.h | 17 - arch/s390/mm/mmap.c | 20 3 files changed

[PATCH V5 23/26] arm/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-26 Thread Anshuman Khandual
King Cc: Arnd Bergmann Cc: linux-arm-ker...@lists.infradead.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/arm/Kconfig | 1 + arch/arm/include/asm/pgtable.h | 17 - arch/arm/lib/uaccess_with_memcpy.c | 2 +- arch/arm/mm

[PATCH V5 26/26] mm/mmap: Drop ARCH_HAS_VM_GET_PAGE_PROT

2022-06-26 Thread Anshuman Khandual
: Andrew Morton Cc: linux...@kvack.org Cc: linux-ker...@vger.kernel.org Reviewed-by: Christoph Hellwig Signed-off-by: Anshuman Khandual --- arch/alpha/Kconfig | 1 - arch/arc/Kconfig| 1 - arch/arm/Kconfig| 1 - arch/arm64/Kconfig | 1 - arch/csky/Kconfig | 1

[PATCH V5 25/26] sh/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-26 Thread Anshuman Khandual
: Yoshinori Sato Cc: Rich Felker Cc: linux...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/sh/Kconfig | 1 + arch/sh/include/asm/pgtable.h | 17 - arch/sh/mm/mmap.c | 20 3 files changed, 21

[PATCH V5 24/26] um/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-26 Thread Anshuman Khandual
Dike Cc: linux...@lists.infradead.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/um/Kconfig | 1 + arch/um/include/asm/pgtable.h | 17 - arch/um/kernel/mem.c | 20 arch/x86/um/mem_32.c | 2 +- 4

[PATCH V5 22/26] arc/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-26 Thread Anshuman Khandual
Gupta Cc: linux-snps-...@lists.infradead.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/arc/Kconfig | 1 + arch/arc/include/asm/pgtable-bits-arcv2.h | 18 -- arch/arc/mm/mmap.c| 20

[PATCH V5 21/26] m68k/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-26 Thread Anshuman Khandual
Bogendoerfer Cc: linux-m...@lists.linux-m68k.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/m68k/Kconfig| 1 + arch/m68k/include/asm/mcf_pgtable.h | 54 --- arch/m68k/include/asm/motorola_pgtable.h | 22

[PATCH V5 20/26] mips/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-26 Thread Anshuman Khandual
Bogendoerfer Cc: linux-m...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/mips/Kconfig | 1 + arch/mips/include/asm/pgtable.h | 22 -- arch/mips/mm/cache.c| 3 +++ 3 files changed, 4 insertions(+), 22

[PATCH V5 19/26] ia64/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-26 Thread Anshuman Khandual
...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/ia64/Kconfig | 1 + arch/ia64/include/asm/pgtable.h | 18 -- arch/ia64/mm/init.c | 28 +++- 3 files changed, 28 insertions(+), 19

[PATCH V5 17/26] csky/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-26 Thread Anshuman Khandual
Uytterhoeven Cc: linux-c...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Acked-by: Guo Ren Signed-off-by: Anshuman Khandual --- arch/csky/Kconfig | 1 + arch/csky/include/asm/pgtable.h | 18 -- arch/csky/mm/init.c | 20 3 files

[PATCH V5 13/26] parisc/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-26 Thread Anshuman Khandual
James E.J. Bottomley" Cc: linux-par...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/parisc/Kconfig | 1 + arch/parisc/include/asm/pgtable.h | 18 -- arch/parisc/mm/init.c | 20 3 fil

[PATCH V5 12/26] hexagon/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-26 Thread Anshuman Khandual
Cain Cc: linux-hexa...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/hexagon/Kconfig | 1 + arch/hexagon/include/asm/pgtable.h | 27 --- arch/hexagon/mm/init.c | 42 ++ 3 files

[PATCH V5 16/26] riscv/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-26 Thread Anshuman Khandual
Walmsley Cc: Palmer Dabbelt Cc: linux-ri...@lists.infradead.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/riscv/Kconfig | 1 + arch/riscv/include/asm/pgtable.h | 20 arch/riscv/mm/init.c | 20 3

[PATCH V5 15/26] nios2/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-26 Thread Anshuman Khandual
Nguyen Cc: linux-ker...@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/nios2/Kconfig | 1 + arch/nios2/include/asm/pgtable.h | 16 arch/nios2/mm/init.c | 20 3 files changed, 21 insertions(+), 16 deletions(-) diff --git

  1   2   3   4   5   6   7   8   9   10   >