Re: [PATCH v2 07/13] powerpc: add support for folded p4d page tables

2020-02-26 Thread Mike Rapoport
On Wed, Feb 26, 2020 at 10:46:13AM +0100, Christophe Leroy wrote: > > > Le 26/02/2020 à 10:13, Mike Rapoport a écrit : > > On Tue, Feb 18, 2020 at 12:54:40PM +0200, Mike Rapoport wrote: > > > On Sun, Feb 16, 2020 at 11:41:07AM +0100, Christophe Leroy wrote: > >

Re: [PATCH v2 07/13] powerpc: add support for folded p4d page tables

2020-02-26 Thread Mike Rapoport
On Tue, Feb 18, 2020 at 12:54:40PM +0200, Mike Rapoport wrote: > On Sun, Feb 16, 2020 at 11:41:07AM +0100, Christophe Leroy wrote: > > > > > > Le 16/02/2020 à 09:18, Mike Rapoport a écrit : > > > From: Mike Rapoport > > > > > > Implement pri

[PATCH v3 00/14] mm: remove __ARCH_HAS_5LEVEL_HACK

2020-02-27 Thread Mike Rapoport
From: Mike Rapoport Hi, These patches convert several architectures to use page table folding and remove __ARCH_HAS_5LEVEL_HACK along with include/asm-generic/5level-fixup.h and include/asm-generic/pgtable-nop4d-hack.h. With that we'll have a single and consistent way of dealing with page table

[PATCH v3 01/14] arm/arm64: add support for folded p4d page tables

2020-02-27 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate, replace 5level-fixup.h with pgtable-nop4d.h and remove __ARCH_USE_5LEVEL_HACK. Since arm and arm64 share kvm memory management bits, make the conversion for both variants

[PATCH v3 13/14] asm-generic: remove pgtable-nop4d-hack.h

2020-02-27 Thread Mike Rapoport
From: Mike Rapoport No architecture defines __ARCH_USE_5LEVEL_HACK and therefore pgtable-nop4d-hack.h will be never actually included. Remove it. Signed-off-by: Mike Rapoport --- include/asm-generic/pgtable-nop4d-hack.h | 64 include/asm-generic/pgtable-nopud.h

[PATCH v3 14/14] mm: remove __ARCH_HAS_5LEVEL_HACK and include/asm-generic/5level-fixup.h

2020-02-27 Thread Mike Rapoport
From: Mike Rapoport There are no architectures that use include/asm-generic/5level-fixup.h therefore it can be removed along with __ARCH_HAS_5LEVEL_HACK define and the code it surrounds Signed-off-by: Mike Rapoport --- include/asm-generic/5level-fixup.h | 58

[PATCH v3 08/14] powerpc: add support for folded p4d page tables

2020-02-27 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate and replace 5level-fixup.h with pgtable-nop4d.h. Signed-off-by: Mike Rapoport Tested-by: Christophe Leroy # 8xx and 83xx --- arch/powerpc/include/asm/book3s/32/pgtable.h

[PATCH v3 11/14] sh: add support for folded p4d page tables

2020-02-27 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate and remove usage of __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike Rapoport --- arch/sh/include/asm/pgtable-2level.h | 1 - arch/sh/include/asm/pgtable-3level.h | 1 - arch/sh

[PATCH v3 04/14] ia64: add support for folded p4d page tables

2020-02-27 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate, remove usage of __ARCH_USE_5LEVEL_HACK and replace 5level-fixup.h with pgtable-nop4d.h Signed-off-by: Mike Rapoport --- arch/ia64/include/asm/pgalloc.h | 4 ++-- arch/ia64

[PATCH v3 02/14] h8300: remove usage of __ARCH_USE_5LEVEL_HACK

2020-02-27 Thread Mike Rapoport
From: Mike Rapoport h8300 is a nommu architecture and does not require fixup for upper layers of the page tables because it is already handled by the generic nommu implementation. Remove definition of __ARCH_USE_5LEVEL_HACK in arch/h8300/include/asm/pgtable.h Signed-off-by: Mike Rapoport

[PATCH v3 03/14] hexagon: remove __ARCH_USE_5LEVEL_HACK

2020-02-27 Thread Mike Rapoport
From: Mike Rapoport The hexagon architecture has 2 level page tables and as such most of the page table folding is already implemented in asm-generic/pgtable-nopmd.h. Fixup the only place in arch/hexagon to unfold the p4d level and remove __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike Rapoport

[PATCH v3 10/14] sh: drop __pXd_offset() macros that duplicate pXd_index() ones

2020-02-27 Thread Mike Rapoport
From: Mike Rapoport The __pXd_offset() macros are identical to the pXd_index() macros and there is no point to keep both of them. All architectures define and use pXd_index() so let's keep only those to make mips consistent with the rest of the kernel. Signed-off-by: Mike Rapoport --- arch/sh

[PATCH v3 07/14] powerpc/32: drop get_pteptr()

2020-02-27 Thread Mike Rapoport
y user of get_pteptr() is __change_page_attr() which operates on kernel context and on lowmem pages only. Move page table traversal to __change_page_attr() and drop get_pteptr(). Signed-off-by: Christophe Leroy Signed-off-by: Mike Rapoport --- arch/powerpc/

[PATCH v3 09/14] sh: fault: Modernize printing of kernel messages

2020-02-27 Thread Mike Rapoport
From: Geert Uytterhoeven - Convert from printk() to pr_*(), - Add missing continuations, - Use "%llx" to format u64, - Join multiple prints in show_fault_oops() into a single print. Signed-off-by: Geert Uytterhoeven Signed-off-by: Mike Rapoport --- arch/sh/mm/fa

[PATCH v3 05/14] nios2: add support for folded p4d page tables

2020-02-27 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate and remove usage of __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike Rapoport --- arch/nios2/include/asm/pgtable.h | 3 +-- arch/nios2/mm/fault.c| 9 +++-- arch

[PATCH v3 12/14] unicore32: remove __ARCH_USE_5LEVEL_HACK

2020-02-27 Thread Mike Rapoport
From: Mike Rapoport The unicore32 architecture has 2 level page tables and asm-generic/pgtable-nopmd.h and explicit casts from pud_t to pgd_t for page table folding. Add p4d walk in the only place that actually unfolds the pud level and remove __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike

[PATCH v3 06/14] openrisc: add support for folded p4d page tables

2020-02-27 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate and remove usage of __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike Rapoport --- arch/openrisc/include/asm/pgtable.h | 1 - arch/openrisc/mm/fault.c| 10

Re: [PATCH v2 0/1] arm/arm64: add support for folded p4d page tables

2020-01-23 Thread Mike Rapoport
On Wed, Jan 22, 2020 at 06:50:17PM +, Will Deacon wrote: > On Mon, Jan 13, 2020 at 01:13:22PM +0200, Mike Rapoport wrote: > > From: Mike Rapoport > > > > This is a part of clean up of the page table manipulation code that aims to > > remove asm-generic/5level-fixu

Re: [PATCH v2 07/13] powerpc: add support for folded p4d page tables

2020-02-18 Thread Mike Rapoport
On Sun, Feb 16, 2020 at 11:41:07AM +0100, Christophe Leroy wrote: > > > Le 16/02/2020 à 09:18, Mike Rapoport a écrit : > > From: Mike Rapoport > > > > Implement primitives necessary for the 4th level folding, add walks of p4d > > level where appropriate and re

Re: [PATCH v2 07/13] powerpc: add support for folded p4d page tables

2020-02-19 Thread Mike Rapoport
On Wed, Feb 19, 2020 at 01:07:55PM +0100, Christophe Leroy wrote: > > Le 16/02/2020 à 09:18, Mike Rapoport a écrit : > > diff --git a/arch/powerpc/mm/ptdump/ptdump.c > > b/arch/powerpc/mm/ptdump/ptdump.c > > index 206156255247..7bd4b81d5b5d 100644 > > --- a/a

[PATCH v2 09/13] sh: drop __pXd_offset() macros that duplicate pXd_index() ones

2020-02-16 Thread Mike Rapoport
From: Mike Rapoport The __pXd_offset() macros are identical to the pXd_index() macros and there is no point to keep both of them. All architectures define and use pXd_index() so let's keep only those to make mips consistent with the rest of the kernel. Signed-off-by: Mike Rapoport --- arch/sh

[PATCH v2 06/13] openrisc: add support for folded p4d page tables

2020-02-16 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate and remove usage of __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike Rapoport --- arch/openrisc/include/asm/pgtable.h | 1 - arch/openrisc/mm/fault.c| 10

[PATCH v2 07/13] powerpc: add support for folded p4d page tables

2020-02-16 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate and replace 5level-fixup.h with pgtable-nop4d.h. Signed-off-by: Mike Rapoport Tested-by: Christophe Leroy # 8xx and 83xx --- arch/powerpc/include/asm/book3s/32/pgtable.h

[PATCH v2 11/13] unicore32: remove __ARCH_USE_5LEVEL_HACK

2020-02-16 Thread Mike Rapoport
From: Mike Rapoport The unicore32 architecture has 2 level page tables and asm-generic/pgtable-nopmd.h and explicit casts from pud_t to pgd_t for page table folding. Add p4d walk in the only place that actually unfolds the pud level and remove __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike

[PATCH v2 10/13] sh: add support for folded p4d page tables

2020-02-16 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate and remove usage of __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike Rapoport --- arch/sh/include/asm/pgtable-2level.h | 1 - arch/sh/include/asm/pgtable-3level.h | 1 - arch/sh

[PATCH v2 05/13] nios2: add support for folded p4d page tables

2020-02-16 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate and remove usage of __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike Rapoport --- arch/nios2/include/asm/pgtable.h | 3 +-- arch/nios2/mm/fault.c| 9 +++-- arch

[PATCH v2 08/13] sh: fault: Modernize printing of kernel messages

2020-02-16 Thread Mike Rapoport
From: Geert Uytterhoeven - Convert from printk() to pr_*(), - Add missing continuations, - Use "%llx" to format u64, - Join multiple prints in show_fault_oops() into a single print. Signed-off-by: Geert Uytterhoeven Signed-off-by: Mike Rapoport --- arch/sh/mm/fa

[PATCH v2 13/13] mm: remove __ARCH_HAS_5LEVEL_HACK and include/asm-generic/5level-fixup.h

2020-02-16 Thread Mike Rapoport
From: Mike Rapoport There are no architectures that use include/asm-generic/5level-fixup.h therefore it can be removed along with __ARCH_HAS_5LEVEL_HACK define and the code it surrounds Signed-off-by: Mike Rapoport --- include/asm-generic/5level-fixup.h | 58

[PATCH v2 12/13] asm-generic: remove pgtable-nop4d-hack.h

2020-02-16 Thread Mike Rapoport
From: Mike Rapoport No architecture defines __ARCH_USE_5LEVEL_HACK and therefore pgtable-nop4d-hack.h will be never actually included. Remove it. Signed-off-by: Mike Rapoport --- include/asm-generic/pgtable-nop4d-hack.h | 64 include/asm-generic/pgtable-nopud.h

Re: [PATCH v2 00/13] mm: remove __ARCH_HAS_5LEVEL_HACK

2020-02-16 Thread Mike Rapoport
On Sun, Feb 16, 2020 at 08:22:30AM +, Russell King - ARM Linux admin wrote: > On Sun, Feb 16, 2020 at 10:18:30AM +0200, Mike Rapoport wrote: > > From: Mike Rapoport > > > > Hi, > > > > These patches convert several architectures to use

[PATCH v2 04/13] ia64: add support for folded p4d page tables

2020-02-16 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate, remove usage of __ARCH_USE_5LEVEL_HACK and replace 5level-fixup.h with pgtable-nop4d.h Signed-off-by: Mike Rapoport --- arch/ia64/include/asm/pgalloc.h | 4 ++-- arch/ia64

[PATCH v2 01/13] arm/arm64: add support for folded p4d page tables

2020-02-16 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate, replace 5level-fixup.h with pgtable-nop4d.h and remove __ARCH_USE_5LEVEL_HACK. Since arm and arm64 share kvm memory management bits, make the conversion for both variants

[PATCH v2 02/13] h8300: remove usage of __ARCH_USE_5LEVEL_HACK

2020-02-16 Thread Mike Rapoport
From: Mike Rapoport h8300 is a nommu architecture and does not require fixup for upper layers of the page tables because it is already handled by the generic nommu implementation. Remove definition of __ARCH_USE_5LEVEL_HACK in arch/h8300/include/asm/pgtable.h Signed-off-by: Mike Rapoport

[PATCH v2 03/13] hexagon: remove __ARCH_USE_5LEVEL_HACK

2020-02-16 Thread Mike Rapoport
From: Mike Rapoport The hexagon architecture has 2 level page tables and as such most of the page table folding is already implemented in asm-generic/pgtable-nopmd.h. Fixup the only place in arch/hexagon to unfold the p4d level and remove __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike Rapoport

[PATCH v2 00/13] mm: remove __ARCH_HAS_5LEVEL_HACK

2020-02-16 Thread Mike Rapoport
From: Mike Rapoport Hi, These patches convert several architectures to use page table folding and remove __ARCH_HAS_5LEVEL_HACK along with include/asm-generic/5level-fixup.h. The changes are mostly about mechanical replacement of pgd accessors with p4d ones and the addition of higher levels

[PATCH v2 1/1] arm/arm64: add support for folded p4d page tables

2020-01-13 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate, replace 5level-fixup.h with pgtable-nop4d.h and remove __ARCH_USE_5LEVEL_HACK. Since arm and arm64 share kvm memory management bits, make the conversion for both variants

[PATCH v2 0/1] arm/arm64: add support for folded p4d page tables

2020-01-13 Thread Mike Rapoport
From: Mike Rapoport Hi, This is a part of clean up of the page table manipulation code that aims to remove asm-generic/5level-fixup.h and asm-generic/pgtable-nop4d-hack.h There is a single patch for both arm and arm64 because doing the conversion separately would mean breaking the shared mmu

Re: [PATCH 0/1] arm/arm64: add support for folded p4d page tables

2020-01-09 Thread Mike Rapoport
On Thu, Jan 09, 2020 at 08:38:54AM +0530, Anshuman Khandual wrote: > > > On 12/30/2019 01:57 PM, Mike Rapoport wrote: > > From: Mike Rapoport > > > > Hi, > > Hello Mike, > > > > > This is a part of clean up of the page table manipulation

[PATCH 1/1] arm/arm64: add support for folded p4d page tables

2019-12-30 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate, replace 5level-fixup.h with pgtable-nop4d.h and remove __ARCH_USE_5LEVEL_HACK. Since arm and arm64 share kvm memory management bits, make the conversion for both variants

[PATCH 0/1] arm/arm64: add support for folded p4d page tables

2019-12-30 Thread Mike Rapoport
From: Mike Rapoport Hi, This is a part of clean up of the page table manipulation code that aims to remove asm-generic/5level-fixup.h and asm-generic/pgtable-nop4d-hack.h There is a single patch for both arm and arm64 because doing the conversion separately would mean breaking the shared mmu

[PATCH v4 03/14] arm64: add support for folded p4d page tables

2020-04-14 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate, replace 5level-fixup.h with pgtable-nop4d.h and remove __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike Rapoport --- arch/arm64/include/asm/kvm_mmu.h| 10 +- arch/arm64

[PATCH v4 05/14] ia64: add support for folded p4d page tables

2020-04-14 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate, remove usage of __ARCH_USE_5LEVEL_HACK and replace 5level-fixup.h with pgtable-nop4d.h Signed-off-by: Mike Rapoport --- arch/ia64/include/asm/pgalloc.h | 4 ++-- arch/ia64

[PATCH v4 04/14] hexagon: remove __ARCH_USE_5LEVEL_HACK

2020-04-14 Thread Mike Rapoport
From: Mike Rapoport The hexagon architecture has 2 level page tables and as such most of the page table folding is already implemented in asm-generic/pgtable-nopmd.h. Fixup the only place in arch/hexagon to unfold the p4d level and remove __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike Rapoport

[PATCH v4 01/14] h8300: remove usage of __ARCH_USE_5LEVEL_HACK

2020-04-14 Thread Mike Rapoport
From: Mike Rapoport h8300 is a nommu architecture and does not require fixup for upper layers of the page tables because it is already handled by the generic nommu implementation. Remove definition of __ARCH_USE_5LEVEL_HACK in arch/h8300/include/asm/pgtable.h Signed-off-by: Mike Rapoport

[PATCH v4 02/14] arm: add support for folded p4d page tables

2020-04-14 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate, and remove __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike Rapoport --- arch/arm/include/asm/pgtable.h | 1 - arch/arm/lib/uaccess_with_memcpy.c | 7 +- arch/arm/mach

[PATCH v4 00/14] mm: remove __ARCH_HAS_5LEVEL_HACK

2020-04-14 Thread Mike Rapoport
From: Mike Rapoport Hi, These patches convert several architectures to use page table folding and remove __ARCH_HAS_5LEVEL_HACK along with include/asm-generic/5level-fixup.h and include/asm-generic/pgtable-nop4d-hack.h. With that we'll have a single and consistent way of dealing with page table

[PATCH v4 14/14] mm: remove __ARCH_HAS_5LEVEL_HACK and include/asm-generic/5level-fixup.h

2020-04-14 Thread Mike Rapoport
From: Mike Rapoport There are no architectures that use include/asm-generic/5level-fixup.h therefore it can be removed along with __ARCH_HAS_5LEVEL_HACK define and the code it surrounds Signed-off-by: Mike Rapoport --- include/asm-generic/5level-fixup.h | 58

[PATCH v4 12/14] unicore32: remove __ARCH_USE_5LEVEL_HACK

2020-04-14 Thread Mike Rapoport
From: Mike Rapoport The unicore32 architecture has 2 level page tables and asm-generic/pgtable-nopmd.h and explicit casts from pud_t to pgd_t for page table folding. Add p4d walk in the only place that actually unfolds the pud level and remove __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike

[PATCH v4 06/14] nios2: add support for folded p4d page tables

2020-04-14 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate and remove usage of __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike Rapoport --- arch/nios2/include/asm/pgtable.h | 3 +-- arch/nios2/mm/fault.c| 9 +++-- arch

[PATCH v4 08/14] powerpc: add support for folded p4d page tables

2020-04-14 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate and replace 5level-fixup.h with pgtable-nop4d.h. Signed-off-by: Mike Rapoport Tested-by: Christophe Leroy # 8xx and 83xx --- arch/powerpc/include/asm/book3s/32/pgtable.h

[PATCH v4 09/14] sh: fault: Modernize printing of kernel messages

2020-04-14 Thread Mike Rapoport
From: Geert Uytterhoeven - Convert from printk() to pr_*(), - Add missing continuations, - Use "%llx" to format u64, - Join multiple prints in show_fault_oops() into a single print. Signed-off-by: Geert Uytterhoeven Signed-off-by: Mike Rapoport --- arch/sh/mm/fa

[PATCH v4 11/14] sh: add support for folded p4d page tables

2020-04-14 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate and remove usage of __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike Rapoport --- arch/sh/include/asm/pgtable-2level.h | 1 - arch/sh/include/asm/pgtable-3level.h | 1 - arch/sh

[PATCH v4 13/14] asm-generic: remove pgtable-nop4d-hack.h

2020-04-14 Thread Mike Rapoport
From: Mike Rapoport No architecture defines __ARCH_USE_5LEVEL_HACK and therefore pgtable-nop4d-hack.h will be never actually included. Remove it. Signed-off-by: Mike Rapoport --- include/asm-generic/pgtable-nop4d-hack.h | 64 include/asm-generic/pgtable-nopud.h

[PATCH v4 10/14] sh: drop __pXd_offset() macros that duplicate pXd_index() ones

2020-04-14 Thread Mike Rapoport
From: Mike Rapoport The __pXd_offset() macros are identical to the pXd_index() macros and there is no point to keep both of them. All architectures define and use pXd_index() so let's keep only those to make mips consistent with the rest of the kernel. Signed-off-by: Mike Rapoport --- arch/sh

[PATCH v4 07/14] openrisc: add support for folded p4d page tables

2020-04-14 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate and remove usage of __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike Rapoport --- arch/openrisc/include/asm/pgtable.h | 1 - arch/openrisc/mm/fault.c| 10

Re: [PATCH v4 03/14] arm64: add support for folded p4d page tables

2020-05-16 Thread Mike Rapoport
On Fri, May 15, 2020 at 11:40:12AM -0700, Andrew Morton wrote: > On Tue, 14 Apr 2020 18:34:44 +0300 Mike Rapoport wrote: > > > Implement primitives necessary for the 4th level folding, add walks of p4d > > level where appropriate, replace 5level-fixup.h with pgtable-nop4

Re: [PATCH v4 02/14] arm: add support for folded p4d page tables

2020-05-11 Thread Mike Rapoport
Hi Marek, On Mon, May 11, 2020 at 08:36:41AM +0200, Marek Szyprowski wrote: > Hi Mike, > > On 08.05.2020 19:42, Mike Rapoport wrote: > > On Fri, May 08, 2020 at 08:53:27AM +0200, Marek Szyprowski wrote: > >> On 07.05.2020 18:11, Mike Rapoport wrote: > >>> On T

Re: [PATCH v4 02/14] arm: add support for folded p4d page tables

2020-05-08 Thread Mike Rapoport
On Fri, May 08, 2020 at 08:53:27AM +0200, Marek Szyprowski wrote: > Hi Mike, > > On 07.05.2020 18:11, Mike Rapoport wrote: > > On Thu, May 07, 2020 at 02:16:56PM +0200, Marek Szyprowski wrote: > >> On 14.04.2020 17:34, Mike Rapoport wrote: > >>> From:

Re: [PATCH v3 07/14] powerpc/32: drop get_pteptr()

2020-03-08 Thread Mike Rapoport
On Fri, Mar 06, 2020 at 08:00:16PM -0800, Andrew Morton wrote: > On Thu, 27 Feb 2020 10:46:01 +0200 Mike Rapoport wrote: > > > Commit 8d30c14cab30 ("powerpc/mm: Rework I$/D$ coherency (v3)") and > > commit 90ac19a8b21b ("[POWERPC] Abolish iopa(), mm_ptov(),

Re: [PATCH v4 02/14] arm: add support for folded p4d page tables

2020-05-07 Thread Mike Rapoport
Hi, On Thu, May 07, 2020 at 02:16:56PM +0200, Marek Szyprowski wrote: > Hi > > On 14.04.2020 17:34, Mike Rapoport wrote: > > From: Mike Rapoport > > > > Implement primitives necessary for the 4th level folding, add walks of p4d > > level where appropriate,

Re: [PATCH v4 0/4] arm64: drop pfn_valid_within() and simplify pfn_valid()

2021-05-12 Thread Mike Rapoport
On Wed, May 12, 2021 at 09:00:02AM +0200, Ard Biesheuvel wrote: > On Tue, 11 May 2021 at 12:05, Mike Rapoport wrote: > > > > From: Mike Rapoport > > > > Hi, > > > > These patches aim to remove CONFIG_HOLES_IN_ZONE and essentially hardwire > > pfn_val

Re: [PATCH v4 0/4] arm64: drop pfn_valid_within() and simplify pfn_valid()

2021-05-12 Thread Mike Rapoport
On Wed, May 12, 2021 at 09:59:33AM +0200, Ard Biesheuvel wrote: > On Wed, 12 May 2021 at 09:34, Mike Rapoport wrote: > > > > On Wed, May 12, 2021 at 09:00:02AM +0200, Ard Biesheuvel wrote: > > > On Tue, 11 May 2021 at 12:05, Mike Rapoport wrote: > > &

Re: [PATCH v4 4/4] arm64: drop pfn_valid_within() and simplify pfn_valid()

2021-05-11 Thread Mike Rapoport
On Tue, May 11, 2021 at 04:40:01PM -0700, Andrew Morton wrote: > On Tue, 11 May 2021 13:05:50 +0300 Mike Rapoport wrote: > > > From: Mike Rapoport > > > > The arm64's version of pfn_valid() differs from the generic because of two > > reasons: > > > >

Re: arm32: panic in move_freepages (Was [PATCH v2 0/4] arm64: drop pfn_valid_within() and simplify pfn_valid())

2021-05-12 Thread Mike Rapoport
On Wed, May 12, 2021 at 11:08:14AM +0800, Kefeng Wang wrote: > > On 2021/5/11 16:48, Mike Rapoport wrote: > > On Mon, May 10, 2021 at 11:10:20AM +0800, Kefeng Wang wrote: > > > > > > > > The memory is not continuous, see MEMBLOCK: > > > > >

[PATCH v4 0/4] arm64: drop pfn_valid_within() and simplify pfn_valid()

2021-05-11 Thread Mike Rapoport
From: Mike Rapoport Hi, These patches aim to remove CONFIG_HOLES_IN_ZONE and essentially hardwire pfn_valid_within() to 1. The idea is to mark NOMAP pages as reserved in the memory map and restore the intended semantics of pfn_valid() to designate availability of struct page for a pfn

[PATCH v4 1/4] include/linux/mmzone.h: add documentation for pfn_valid()

2021-05-11 Thread Mike Rapoport
From: Mike Rapoport Add comment describing the semantics of pfn_valid() that clarifies that pfn_valid() only checks for availability of a memory map entry (i.e. struct page) for a PFN rather than availability of usable memory backing that PFN. The most "generic" version of pfn_va

[PATCH v4 2/4] memblock: update initialization of reserved pages

2021-05-11 Thread Mike Rapoport
From: Mike Rapoport The struct pages representing a reserved memory region are initialized using reserve_bootmem_range() function. This function is called for each reserved region just before the memory is freed from memblock to the buddy page allocator. The struct pages for MEMBLOCK_NOMAP

[PATCH v4 3/4] arm64: decouple check whether pfn is in linear map from pfn_valid()

2021-05-11 Thread Mike Rapoport
From: Mike Rapoport The intended semantics of pfn_valid() is to verify whether there is a struct page for the pfn in question and nothing else. Yet, on arm64 it is used to distinguish memory areas that are mapped in the linear map vs those that require ioremap() to access them. Introduce

[PATCH v4 4/4] arm64: drop pfn_valid_within() and simplify pfn_valid()

2021-05-11 Thread Mike Rapoport
From: Mike Rapoport The arm64's version of pfn_valid() differs from the generic because of two reasons: * Parts of the memory map are freed during boot. This makes it necessary to verify that there is actual physical memory that corresponds to a pfn which is done by querying memblock

Re: arm32: panic in move_freepages (Was [PATCH v2 0/4] arm64: drop pfn_valid_within() and simplify pfn_valid())

2021-05-11 Thread Mike Rapoport
On Mon, May 10, 2021 at 11:10:20AM +0800, Kefeng Wang wrote: > > > > The memory is not continuous, see MEMBLOCK: > > > memory size = 0x4c0f reserved size = 0x027ef058 > > > memory.cnt = 0xa > > > memory[0x0][0x80a0-0x855f], 0x04c0 bytes flags: 0x0 > > > memory[0x1]

Re: arm32: panic in move_freepages (Was [PATCH v2 0/4] arm64: drop pfn_valid_within() and simplify pfn_valid())

2021-05-07 Thread Mike Rapoport
On Fri, May 07, 2021 at 03:17:08PM +0800, Kefeng Wang wrote: > > On 2021/5/6 20:47, Kefeng Wang wrote: > > > > > > > > > > no, the CONFIG_ARM_LPAE is not set, and yes with same panic at > > > > > > move_freepages at > > > > > > > > > > > > start_pfn/end_pfn [de600, de7ff], [de60, de7ff000]

Re: arm32: panic in move_freepages (Was [PATCH v2 0/4] arm64: drop pfn_valid_within() and simplify pfn_valid())

2021-05-08 Thread Mike Rapoport
On Fri, May 07, 2021 at 08:34:52PM +0800, Kefeng Wang wrote: > > > On 2021/5/7 18:30, Mike Rapoport wrote: > > On Fri, May 07, 2021 at 03:17:08PM +0800, Kefeng Wang wrote: > > > > > > On 2021/5/6 20:47, Kefeng Wang wrote: > > > > > > >

Re: arm32: panic in move_freepages (Was [PATCH v2 0/4] arm64: drop pfn_valid_within() and simplify pfn_valid())

2021-05-13 Thread Mike Rapoport
On Thu, May 13, 2021 at 11:44:00AM +0800, Kefeng Wang wrote: > On 2021/5/12 16:26, Mike Rapoport wrote: > > On Wed, May 12, 2021 at 11:08:14AM +0800, Kefeng Wang wrote: > > > > > > On 2021/5/11 16:48, Mike Rapoport wrote: > > > > On Mon, May 10, 2021

Re: arm32: panic in move_freepages (Was [PATCH v2 0/4] arm64: drop pfn_valid_within() and simplify pfn_valid())

2021-04-25 Thread Mike Rapoport
On Sun, Apr 25, 2021 at 03:51:56PM +0800, Kefeng Wang wrote: > > On 2021/4/25 15:19, Mike Rapoport wrote: > > On Fri, Apr 23, 2021 at 04:11:16PM +0800, Kefeng Wang wrote: > > I tested this patchset(plus arm32 change, like arm64 does) based on > l

Re: arm32: panic in move_freepages (Was [PATCH v2 0/4] arm64: drop pfn_valid_within() and simplify pfn_valid())

2021-04-27 Thread Mike Rapoport
On Mon, Apr 26, 2021 at 11:26:38PM +0800, Kefeng Wang wrote: > > On 2021/4/26 13:20, Mike Rapoport wrote: > > On Sun, Apr 25, 2021 at 03:51:56PM +0800, Kefeng Wang wrote: > > > On 2021/4/25 15:19, Mike Rapoport wrote: > > > > > > On Fri, Apr 23, 2021

Re: arm32: panic in move_freepages (Was [PATCH v2 0/4] arm64: drop pfn_valid_within() and simplify pfn_valid())

2021-04-30 Thread Mike Rapoport
On Thu, Apr 29, 2021 at 06:22:55PM +0800, Kefeng Wang wrote: > > On 2021/4/29 14:57, Mike Rapoport wrote: > > > > > Do you use SPARSMEM? If yes, what is your section size? > > > > What is the value if CONFIG_FORCE_MAX_ZONEORDER in your configuration? > >

Re: arm32: panic in move_freepages (Was [PATCH v2 0/4] arm64: drop pfn_valid_within() and simplify pfn_valid())

2021-05-03 Thread Mike Rapoport
On Fri, Apr 30, 2021 at 07:24:37PM +0800, Kefeng Wang wrote: > > > On 2021/4/30 17:51, Mike Rapoport wrote: > > On Thu, Apr 29, 2021 at 06:22:55PM +0800, Kefeng Wang wrote: > > > > > > On 2021/4/29 14:57, Mike Rapoport wrote: > > > > > > >

Re: [PATCH v2 0/4] arm64: drop pfn_valid_within() and simplify pfn_valid()

2021-04-22 Thread Mike Rapoport
On Thu, Apr 22, 2021 at 03:00:20PM +0800, Kefeng Wang wrote: > > On 2021/4/21 14:51, Mike Rapoport wrote: > > From: Mike Rapoport > > > > Hi, > > > > These patches aim to remove CONFIG_HOLES_IN_ZONE and essentially hardwire > > pfn_valid_within() to 1

Re: arm32: panic in move_freepages (Was [PATCH v2 0/4] arm64: drop pfn_valid_within() and simplify pfn_valid())

2021-04-27 Thread Mike Rapoport
On Tue, Apr 27, 2021 at 07:08:59PM +0800, Kefeng Wang wrote: > > On 2021/4/27 14:23, Mike Rapoport wrote: > > On Mon, Apr 26, 2021 at 11:26:38PM +0800, Kefeng Wang wrote: > > > On 2021/4/26 13:20, Mike Rapoport wrote: > > > > On Sun, Apr 25, 2021 at 03

Re: [PATCH v2 0/4] arm64: drop pfn_valid_within() and simplify pfn_valid()

2021-04-25 Thread Mike Rapoport
On Thu, Apr 22, 2021 at 11:28:24PM +0800, Kefeng Wang wrote: > > On 2021/4/22 15:29, Mike Rapoport wrote: > > On Thu, Apr 22, 2021 at 03:00:20PM +0800, Kefeng Wang wrote: > > > On 2021/4/21 14:51, Mike Rapoport wrote: > > > > From: M

Re: arm32: panic in move_freepages (Was [PATCH v2 0/4] arm64: drop pfn_valid_within() and simplify pfn_valid())

2021-04-25 Thread Mike Rapoport
On Fri, Apr 23, 2021 at 04:11:16PM +0800, Kefeng Wang wrote: > > I tested this patchset(plus arm32 change, like arm64 does) based on lts > 5.10,add > > some debug log, the useful info shows below, if we enable HOLES_IN_ZONE, no > panic, > > any idea, thanks. Are there any changes on top of

Re: arm32: panic in move_freepages (Was [PATCH v2 0/4] arm64: drop pfn_valid_within() and simplify pfn_valid())

2021-05-03 Thread Mike Rapoport
On Mon, May 03, 2021 at 10:07:01AM +0200, David Hildenbrand wrote: > On 03.05.21 08:26, Mike Rapoport wrote: > > On Fri, Apr 30, 2021 at 07:24:37PM +0800, Kefeng Wang wrote: > > > > > > > > > On 2021/4/30 17:51, Mike Rapoport wrote: > > > > On Th

[RFC/RFT PATCH 0/3] arm64: drop pfn_valid_within() and simplify pfn_valid()

2021-04-07 Thread Mike Rapoport
From: Mike Rapoport Hi, These patches aim to remove CONFIG_HOLES_IN_ZONE and essentially hardwire pfn_valid_within() to 1. The idea is to mark NOMAP pages as reserved in the memory map and restore the intended semantics of pfn_valid() to designate availability of struct page for a pfn

[RFC/RFT PATCH 2/3] arm64: decouple check whether pfn is normal memory from pfn_valid()

2021-04-07 Thread Mike Rapoport
From: Mike Rapoport The intended semantics of pfn_valid() is to verify whether there is a struct page for the pfn in question and nothing else. Yet, on arm64 it is used to distinguish memory areas that are mapped in the linear map vs those that require ioremap() to access them. Introduce

[RFC/RFT PATCH 3/3] arm64: drop pfn_valid_within() and simplify pfn_valid()

2021-04-07 Thread Mike Rapoport
From: Mike Rapoport The arm64's version of pfn_valid() differs from the generic because of two reasons: * Parts of the memory map are freed during boot. This makes it necessary to verify that there is actual physical memory that corresponds to a pfn which is done by querying memblock

[RFC/RFT PATCH 1/3] memblock: update initialization of reserved pages

2021-04-07 Thread Mike Rapoport
From: Mike Rapoport The struct pages representing a reserved memory region are initialized using reserve_bootmem_range() function. This function is called for each reserved region just before the memory is freed from memblock to the buddy page allocator. The struct pages for MEMBLOCK_NOMAP

Re: [RFC/RFT PATCH 1/3] memblock: update initialization of reserved pages

2021-04-07 Thread Mike Rapoport
On Thu, Apr 08, 2021 at 10:46:18AM +0530, Anshuman Khandual wrote: > > > On 4/7/21 10:56 PM, Mike Rapoport wrote: > > From: Mike Rapoport > > > > The struct pages representing a reserved memory region are initialized > > using reserve_bootmem_range() function.

Re: [RFC/RFT PATCH 3/3] arm64: drop pfn_valid_within() and simplify pfn_valid()

2021-04-08 Thread Mike Rapoport
On Thu, Apr 08, 2021 at 10:42:43AM +0530, Anshuman Khandual wrote: > > On 4/7/21 10:56 PM, Mike Rapoport wrote: > > From: Mike Rapoport > > > > The arm64's version of pfn_valid() differs from the generic because of two > > reasons: > > > > * Par

Re: [RFC/RFT PATCH 2/3] arm64: decouple check whether pfn is normal memory from pfn_valid()

2021-04-08 Thread Mike Rapoport
On Thu, Apr 08, 2021 at 10:44:58AM +0530, Anshuman Khandual wrote: > > On 4/7/21 10:56 PM, Mike Rapoport wrote: > > From: Mike Rapoport > > > > The intended semantics of pfn_valid() is to verify whether there is a > > struct page for the pfn in question

Re: [RFC/RFT PATCH 0/3] arm64: drop pfn_valid_within() and simplify pfn_valid()

2021-04-08 Thread Mike Rapoport
On Thu, Apr 08, 2021 at 10:49:02AM +0530, Anshuman Khandual wrote: > Adding James here. > > + James Morse > > On 4/7/21 10:56 PM, Mike Rapoport wrote: > > From: Mike Rapoport > > > > Hi, > > > > These patches aim to remove CONFIG_HOLES_IN_ZONE

Re: [RFC/RFT PATCH 2/3] arm64: decouple check whether pfn is normal memory from pfn_valid()

2021-04-16 Thread Mike Rapoport
On Thu, Apr 15, 2021 at 11:31:26AM +0200, David Hildenbrand wrote: > On 14.04.21 22:29, Mike Rapoport wrote: > > On Wed, Apr 14, 2021 at 05:58:26PM +0200, David Hildenbrand wrote: > > > On 08.04.21 07:14, Anshuman Khandual wrote: > > > > > > > &g

Re: [RFC/RFT PATCH 1/3] memblock: update initialization of reserved pages

2021-04-16 Thread Mike Rapoport
On Thu, Apr 15, 2021 at 11:30:12AM +0200, David Hildenbrand wrote: > > Not sure we really need a new pagetype here, PG_Reserved seems to be quite > > enough to say "don't touch this". I generally agree that we could make > > PG_Reserved a PageType and then have several sub-types for reserved

Re: [RFC/RFT PATCH 1/3] memblock: update initialization of reserved pages

2021-04-14 Thread Mike Rapoport
On Wed, Apr 14, 2021 at 05:27:53PM +0200, Ard Biesheuvel wrote: > On Wed, 14 Apr 2021 at 17:14, David Hildenbrand wrote: > > > > On 07.04.21 19:26, Mike Rapoport wrote: > > > From: Mike Rapoport > > > > > > The struct pages representing a reserved

Re: [RFC/RFT PATCH 1/3] memblock: update initialization of reserved pages

2021-04-14 Thread Mike Rapoport
On Wed, Apr 14, 2021 at 05:52:57PM +0200, David Hildenbrand wrote: > On 14.04.21 17:27, Ard Biesheuvel wrote: > > On Wed, 14 Apr 2021 at 17:14, David Hildenbrand wrote: > > > > > > On 07.04.21 19:26, Mike Rapoport wrote: > > > > From: Mike Rapoport > &g

Re: [RFC/RFT PATCH 2/3] arm64: decouple check whether pfn is normal memory from pfn_valid()

2021-04-14 Thread Mike Rapoport
On Wed, Apr 14, 2021 at 05:58:26PM +0200, David Hildenbrand wrote: > On 08.04.21 07:14, Anshuman Khandual wrote: > > > > On 4/7/21 10:56 PM, Mike Rapoport wrote: > > > From: Mike Rapoport > > > > > > The intended semantics of pfn_valid() is to v

Re: [RFC/RFT PATCH 1/3] memblock: update initialization of reserved pages

2021-04-14 Thread Mike Rapoport
On Wed, Apr 14, 2021 at 05:12:11PM +0200, David Hildenbrand wrote: > On 07.04.21 19:26, Mike Rapoport wrote: > > From: Mike Rapoport > > > > The struct pages representing a reserved memory region are initialized > > using reserve_bootmem_range() function. This

[PATCH v1 0/4] arm64: drop pfn_valid_within() and simplify pfn_valid()

2021-04-20 Thread Mike Rapoport
From: Mike Rapoport Hi, These patches aim to remove CONFIG_HOLES_IN_ZONE and essentially hardwire pfn_valid_within() to 1. The idea is to mark NOMAP pages as reserved in the memory map and restore the intended semantics of pfn_valid() to designate availability of struct page for a pfn

[PATCH v1 3/4] arm64: decouple check whether pfn is in linear map from pfn_valid()

2021-04-20 Thread Mike Rapoport
From: Mike Rapoport The intended semantics of pfn_valid() is to verify whether there is a struct page for the pfn in question and nothing else. Yet, on arm64 it is used to distinguish memory areas that are mapped in the linear map vs those that require ioremap() to access them. Introduce

[PATCH v1 2/4] memblock: update initialization of reserved pages

2021-04-20 Thread Mike Rapoport
From: Mike Rapoport The struct pages representing a reserved memory region are initialized using reserve_bootmem_range() function. This function is called for each reserved region just before the memory is freed from memblock to the buddy page allocator. The struct pages for MEMBLOCK_NOMAP

[PATCH v1 1/4] include/linux/mmzone.h: add documentation for pfn_valid()

2021-04-20 Thread Mike Rapoport
From: Mike Rapoport Add comment describing the semantics of pfn_valid() that clarifies that pfn_valid() only checks for availability of a memory map entry (i.e. struct page) for a PFN rather than availability of usable memory backing that PFN. The most "generic" version of pfn_va

  1   2   >