[PATCH] ARC: Fix spelling mistake

2022-06-23 Thread Zhang Jiaming
Change 'seperate' to 'separate'. Signed-off-by: Zhang Jiaming --- arch/arc/include/asm/entry-compact.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arc/include/asm/entry-compact.h b/arch/arc/include/asm/entry-compact.h index 5aab4f93ab8a..67ff06e15cea 100644 ---

Re: [PATCH] ARC:mm:Fix syntax errors in comments

2022-06-23 Thread Bagas Sanjaya
On 6/23/22 09:50, Vineet Gupta wrote: >> The patch is OK, but its subject is wrong. > > Right. > >> The patch above isn't fixing any syntax errors, but rather minor cleanup. >> The subject should have been "Remove duplicate 'to' in the >> flush_dcache_page() comment". > > I'd just say "ARC: mm:

Re: [PATCH] ARC:mm:Fix syntax errors in comments

2022-06-23 Thread Bagas Sanjaya
On 6/24/22 08:57, Vineet Gupta wrote: > "Repeated" is the key - First time I'd politely tell them to DTRT but will > just ignore if things continue. > >> Lazily speaking, I'd like to privately notice the >> submitter about the situation, and I withhold these for now. > > Funny that you say

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

2022-06-23 Thread Anshuman Khandual
This just converts the generic vm_get_page_prot() implementation into a new macro i.e DECLARE_VM_GET_PAGE_PROT which later can be used across platforms when enabling them with ARCH_HAS_VM_GET_PAGE_PROT. This does not create any functional change. Cc: Andrew Morton Cc: linux...@kvack.org Cc:

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

2022-06-23 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: Michael Ellerman Cc: Paul Mackerras Cc: Nicholas Piggin Cc: linuxppc-...@lists.ozlabs.org Cc: linux-ker...@vger.kernel.org Signed-off-by:

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

2022-06-23 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Huacai

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

2022-06-23 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Jonas

[PATCH V4 11/26] extensa/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-23 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Chris

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

2022-06-23 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc:

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

2022-06-23 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Heiko

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

2022-06-23 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Thomas

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

2022-06-23 Thread Christoph Hellwig
On Fri, Jun 24, 2022 at 10:13:13AM +0530, Anshuman Khandual wrote: > vm_get_page_prot(), in order for it to be reused on platforms that do not > require custom implementation. Finally, ARCH_HAS_VM_GET_PAGE_PROT can just > be dropped, as all platforms now define and export vm_get_page_prot(), via >

Re: [PATCH V4 26/26] mm/mmap: Drop ARCH_HAS_VM_GET_PAGE_PROT

2022-06-23 Thread Christoph Hellwig
Looks good: Reviewed-by: Christoph Hellwig ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc

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

2022-06-23 Thread Anshuman Khandual
On 6/24/22 10:42, Christoph Hellwig wrote: > On Fri, Jun 24, 2022 at 10:13:13AM +0530, Anshuman Khandual wrote: >> vm_get_page_prot(), in order for it to be reused on platforms that do not >> require custom implementation. Finally, ARCH_HAS_VM_GET_PAGE_PROT can just >> be dropped, as all

Re: [PATCH V4 08/26] microblaze/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-23 Thread Christophe Leroy
Le 24/06/2022 à 06:43, Anshuman Khandual a écrit : > This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard > vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks > up a private and static protection_map[] array. Subsequently all __SXXX and > __PXXX

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

2022-06-23 Thread Anshuman Khandual
__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_map[] for all possible vm_flags access permission combinations and

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

2022-06-23 Thread Anshuman Khandual
Build protect generic protection_map[] array with __P000, so that it can be moved inside all the platforms one after the other. Otherwise there will be build failures during this process. CONFIG_ARCH_HAS_VM_GET_PAGE_PROT cannot be used for this purpose as only certain platforms enable this config

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

2022-06-23 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Brian

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

2022-06-23 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Thomas

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

2022-06-23 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Vineet

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

2022-06-23 Thread Anshuman Khandual
On 6/24/22 10:48, Christophe Leroy wrote: > > > Le 24/06/2022 à 06:43, Anshuman Khandual a écrit : >> 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. > > Not only 32 bit platforms, also

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

2022-06-23 Thread Christophe Leroy
Le 24/06/2022 à 06:43, Anshuman Khandual a écrit : > protection_map[] has already been moved inside those platforms which enable Usually "already" means before your series. Your series is the one that moves protection_map[] so I would have just said "Now that protection_map[] has been moved

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

2022-06-23 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Richard

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

2022-06-23 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: "James

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

2022-06-23 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc:

Re: [PATCH V4 02/26] mm/mmap: Define DECLARE_VM_GET_PAGE_PROT

2022-06-23 Thread Christoph Hellwig
On Fri, Jun 24, 2022 at 10:13:15AM +0530, Anshuman Khandual wrote: > This just converts the generic vm_get_page_prot() implementation into a new > macro i.e DECLARE_VM_GET_PAGE_PROT which later can be used across platforms > when enabling them with ARCH_HAS_VM_GET_PAGE_PROT. This does not create

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

2022-06-23 Thread Christoph Hellwig
Looks good: Reviewed-by: Christoph Hellwig ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc

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

2022-06-23 Thread Christophe Leroy
Le 24/06/2022 à 06:43, Anshuman Khandual a écrit : > 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. Not only 32 bit platforms, also nohash 64 (aka book3e/64) > > Cc: Michael Ellerman >

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

2022-06-23 Thread Christoph Hellwig
On Fri, Jun 24, 2022 at 10:50:33AM +0530, Anshuman Khandual wrote: > > On most architectures this should be const now, only very few ever > > modify it. > > Will make it a 'static const pgprot_t protection_map[16] __ro_after_init' > on platforms that do not change the protection_map[] even during

Re: [PATCH V4 26/26] mm/mmap: Drop ARCH_HAS_VM_GET_PAGE_PROT

2022-06-23 Thread Christophe Leroy
Le 24/06/2022 à 06:43, Anshuman Khandual a écrit : > Now all the platforms enable ARCH_HAS_GET_PAGE_PROT. They define and export > own vm_get_page_prot() whether custom or standard DECLARE_VM_GET_PAGE_PROT. > Hence there is no need for default generic fallback for vm_get_page_prot(). > Just drop

Re: [PATCH V4 02/26] mm/mmap: Define DECLARE_VM_GET_PAGE_PROT

2022-06-23 Thread Christophe Leroy
Le 24/06/2022 à 06:43, Anshuman Khandual a écrit : > This just converts the generic vm_get_page_prot() implementation into a new > macro i.e DECLARE_VM_GET_PAGE_PROT which later can be used across platforms > when enabling them with ARCH_HAS_VM_GET_PAGE_PROT. This does not create any >

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

2022-06-23 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 Signed-off-by: Anshuman Khandual --- arch/sparc/Kconfig

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

2022-06-23 Thread Anshuman Khandual
protection_map[] has already been moved inside those platforms which enable ARCH_HAS_VM_GET_PAGE_PROT. Hence generic protection_map[] array now can be protected with CONFIG_ARCH_HAS_VM_GET_PAGE_PROT intead of __P000. Cc: Andrew Morton Cc: linux...@kvack.org Cc: linux-ker...@vger.kernel.org

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

2022-06-23 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Michal

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

2022-06-23 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Geert

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

2022-06-23 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Russell

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

2022-06-23 Thread Anshuman Khandual
Now all the platforms enable ARCH_HAS_GET_PAGE_PROT. They define and export own vm_get_page_prot() whether custom or standard DECLARE_VM_GET_PAGE_PROT. Hence there is no need for default generic fallback for vm_get_page_prot(). Just drop this fallback and also ARCH_HAS_GET_PAGE_PROT mechanism.

Re: [PATCH] ARC:mm:Fix syntax errors in comments

2022-06-23 Thread Vineet Gupta
On 6/23/22 00:56, Bagas Sanjaya wrote: In an ideal world yes. But sometimes maintainer complain to break whitespacxe fixes and such into independent fix. Also as someone said later in the thread, for somebody just getting into kernel and figuring out patch submission etc this could be a

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

2022-06-23 Thread Anshuman Khandual
This moves protection_map[] inside the platform and makes it a static. This also defines a helper function add_encrypt_protection_map() that can update the protection_map[] array with pgprot_encrypted(). Cc: Thomas Gleixner Cc: Ingo Molnar Cc: x...@kernel.org Cc: linux-ker...@vger.kernel.org

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

2022-06-23 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 Signed-off-by: Anshuman Khandual --- arch/arm64/include/asm/pgtable-prot.h | 18 --

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

2022-06-23 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Paul

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

2022-06-23 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Dinh

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

2022-06-23 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Jeff

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

2022-06-23 Thread Christoph Hellwig
Looks good: Reviewed-by: Christoph Hellwig ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc

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

2022-06-23 Thread Anshuman Khandual
On 6/24/22 10:52, Christophe Leroy wrote: > > > Le 24/06/2022 à 06:43, Anshuman Khandual a écrit : >> protection_map[] has already been moved inside those platforms which enable > > Usually "already" means before your series. > > Your series is the one that moves protection_map[] so I would