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

2022-06-26 Thread Christophe Leroy
Le 27/06/2022 à 06:58, 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 V5 07/26] mm/mmap: Build protect protection_map[] with ARCH_HAS_VM_GET_PAGE_PROT

2022-06-26 Thread Christophe Leroy
Le 27/06/2022 à 06:58, Anshuman Khandual a écrit : > Now that protection_map[] has been moved inside those platforms that 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

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

2022-06-26 Thread Christophe Leroy
Le 27/06/2022 à 06:58, 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 and nohash 64 (aka book3e/64) platforms > via DECLARE_VM_GET_PAGE_PROT. > > Cc: Michael Ellerman > Cc: Paul Mackerras > Cc:

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

2022-06-26 Thread Christophe Leroy
Le 27/06/2022 à 06:58, 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 >

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

2022-06-26 Thread Christophe Leroy
Le 27/06/2022 à 06:58, Anshuman Khandual a écrit : > 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

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

2022-06-26 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-26 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 >

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

2022-06-26 Thread Christophe Leroy
Le 24/06/2022 à 06:43, Anshuman Khandual a écrit : > 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

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

2022-06-26 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. > > Cc: Michael Ellerman > Cc: Paul Mackerras > Cc: Nicholas Piggin > Cc:

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

2022-06-26 Thread Christophe Leroy
Le 24/06/2022 à 06:43, Anshuman Khandual a écrit : > 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

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

2022-06-26 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 V5 26/26] mm/mmap: Drop ARCH_HAS_VM_GET_PAGE_PROT

2022-06-26 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.

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

2022-06-26 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 V5 24/26] um/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-26 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

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

2022-06-26 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 V5 22/26] arc/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-26 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

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

2022-06-26 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 V5 20/26] mips/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-26 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 V5 19/26] ia64/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-26 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 V5 18/26] s390/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-26 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 V5 17/26] csky/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-26 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 V5 16/26] riscv/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-26 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 V5 15/26] nios2/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-26 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 V5 14/26] alpha/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-26 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 V5 13/26] parisc/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-26 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 V5 12/26] hexagon/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-26 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 V5 11/26] xtensa/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-26 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 V5 10/26] openrisc/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-26 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 V5 09/26] loongarch/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-26 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 V5 08/26] microblaze/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-26 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 V5 07/26] mm/mmap: Build protect protection_map[] with ARCH_HAS_VM_GET_PAGE_PROT

2022-06-26 Thread Anshuman Khandual
Now that protection_map[] has been moved inside those platforms that 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 V5 06/26] x86/mm: Move protection_map[] inside the platform

2022-06-26 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 V5 05/26] arm64/mm: Move protection_map[] inside the platform

2022-06-26 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 V5 04/26] sparc/mm: Move protection_map[] inside the platform

2022-06-26 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 V5 01/26] mm/mmap: Build protect protection_map[] with __P000

2022-06-26 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 V5 03/26] powerpc/mm: Move protection_map[] inside the platform

2022-06-26 Thread Anshuman Khandual
This moves protection_map[] inside the platform and while here, also enable ARCH_HAS_VM_GET_PAGE_PROT on 32 bit and nohash 64 (aka book3e/64) platforms via DECLARE_VM_GET_PAGE_PROT. Cc: Michael Ellerman Cc: Paul Mackerras Cc: Nicholas Piggin Cc: linuxppc-...@lists.ozlabs.org Cc:

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

2022-06-26 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

Re: (subset) [PATCH RESEND v9 5/5] arm64: dts: apm: Harmonize DWC USB3 DT nodes name

2022-06-26 Thread Krzysztof Kozlowski
On Fri, 24 Jun 2022 17:16:21 +0300, Serge Semin wrote: > In accordance with the DWC USB3 bindings the corresponding node > name is suppose to comply with the Generic USB HCD DT schema, which > requires the USB nodes to have the name acceptable by the regexp: > "^usb(@.*)?" . Make sure the

Re: [PATCH RESEND v9 5/5] arm64: dts: apm: Harmonize DWC USB3 DT nodes name

2022-06-26 Thread Krzysztof Kozlowski
On 24/06/2022 22:59, Serge Semin wrote: > On Fri, Jun 24, 2022 at 07:17:53PM +0200, Krzysztof Kozlowski wrote: >> On 24/06/2022 16:16, Serge Semin wrote: >>> In accordance with the DWC USB3 bindings the corresponding node >>> name is suppose to comply with the Generic USB HCD DT schema, which >>>

Re: [PATCH RESEND v9 4/5] arm: dts: stih407-family: Harmonize DWC USB3 DT nodes name

2022-06-26 Thread Krzysztof Kozlowski
On 24/06/2022 16:16, Serge Semin wrote: > In accordance with the DWC USB3 bindings the corresponding node > name is suppose to comply with the Generic USB HCD DT schema, which > requires the USB nodes to have the name acceptable by the regexp: > "^usb(@.*)?" . Make sure the "snps,dwc3"-compatible

Re: [PATCH RESEND v9 4/5] arm: dts: stih407-family: Harmonize DWC USB3 DT nodes name

2022-06-26 Thread Krzysztof Kozlowski
On 24/06/2022 22:45, Serge Semin wrote: > On Fri, Jun 24, 2022 at 07:18:57PM +0200, Krzysztof Kozlowski wrote: >> On 24/06/2022 16:16, Serge Semin wrote: >>> In accordance with the DWC USB3 bindings the corresponding node >>> name is suppose to comply with the Generic USB HCD DT schema, which >>>