implemented as static
inline functions. Add a #define so we don't pick up the generic version
introduced in a later patch.
CC: Martin Schwidefsky
CC: Heiko Carstens
CC: linux-s...@vger.kernel.org
Signed-off-by: Steven Price
---
arch/s390/include/asm/pgtable.h | 2 ++
1 file changed, 2 insertions
-...@vger.kernel.org
Signed-off-by: Steven Price
---
arch/powerpc/include/asm/book3s/64/pgtable.h | 30 ++--
arch/powerpc/kvm/book3s_64_mmu_radix.c | 12 ++--
2 files changed, 24 insertions(+), 18 deletions(-)
diff --git a/arch/powerpc/include/asm/book3s/64/pgtable.h
b/arch
() is needed.
CC: Vineet Gupta
CC: linux-snps-...@lists.infradead.org
Signed-off-by: Steven Price
Acked-by: Vineet Gupta
---
arch/arc/include/asm/pgtable.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arc/include/asm/pgtable.h b/arch/arc/include/asm/pgtable.h
index cf4be70d5892
or execute bit
set on it.
CC: Palmer Dabbelt
CC: Albert Ou
CC: linux-ri...@lists.infradead.org
Signed-off-by: Steven Price
---
arch/riscv/include/asm/pgtable-64.h | 7 +++
arch/riscv/include/asm/pgtable.h| 7 +++
2 files changed, 14 insertions(+)
diff --git a/arch/riscv/include/asm
...@vger.kernel.org
Signed-off-by: Steven Price
---
arch/mips/include/asm/pgtable-64.h | 8
1 file changed, 8 insertions(+)
diff --git a/arch/mips/include/asm/pgtable-64.h
b/arch/mips/include/asm/pgtable-64.h
index 93a9dce31f25..42162877ac62 100644
--- a/arch/mips/include/asm/pgtable-64.h
+++ b/arch
we can reuse for
p?d_large().
CC: Catalin Marinas
CC: Will Deacon
Signed-off-by: Steven Price
---
arch/arm64/include/asm/pgtable.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
index de70c1eabf33..6eef345dbaf4 100644
in
mm/pagewalk.c)
Steven Price (19):
arc: mm: Add p?d_large() definitions
arm64: mm: Add p?d_large() definitions
mips: mm: Add p?d_large() definitions
powerpc: mm: Add p?d_large() definitions
riscv: mm: Add p?d_large() definitions
s390: mm: Add p?d_large() definitions
sparc: mm
On 04/03/2019 19:06, Luck, Tony wrote:
> On Mon, Mar 04, 2019 at 01:16:47PM +0000, Steven Price wrote:
>> On 01/03/2019 21:57, Kirill A. Shutemov wrote:
>>> On Wed, Feb 27, 2019 at 05:05:42PM +, Steven Price wrote:
>>>> walk_page_range() is going to be allowed
On 03/03/2019 07:12, Mike Rapoport wrote:
> On Fri, Mar 01, 2019 at 01:39:30PM +0000, Steven Price wrote:
>> On 01/03/2019 12:30, Kirill A. Shutemov wrote:
>>> On Fri, Mar 01, 2019 at 01:53:01PM +0200, Mike Rapoport wrote:
>>>> Him Kirill,
>>>>
>>>
On 01/03/2019 21:57, Kirill A. Shutemov wrote:
> On Wed, Feb 27, 2019 at 05:05:42PM +0000, Steven Price wrote:
>> walk_page_range() is going to be allowed to walk page tables other than
>> those of user space. For this it needs to know when it has reached a
>> 'leaf' ent
On 01/03/2019 21:48, Kirill A. Shutemov wrote:
> On Wed, Feb 27, 2019 at 05:05:39PM +0000, Steven Price wrote:
>> walk_page_range() is going to be allowed to walk page tables other than
>> those of user space. For this it needs to know when it has reached a
>> 'leaf' ent
On 01/03/2019 21:47, Kirill A. Shutemov wrote:
> On Wed, Feb 27, 2019 at 05:05:37PM +0000, Steven Price wrote:
>> walk_page_range() is going to be allowed to walk page tables other than
>> those of user space. For this it needs to know when it has reached a
>> 'leaf' ent
On 01/03/2019 12:30, Kirill A. Shutemov wrote:
> On Fri, Mar 01, 2019 at 01:53:01PM +0200, Mike Rapoport wrote:
>> Him Kirill,
>>
>> On Fri, Feb 22, 2019 at 12:06:18AM +0300, Kirill A. Shutemov wrote:
>>> On Thu, Feb 21, 2019 at 05:16:46PM +, Steven Price wr
On 28/02/2019 19:00, Dave Hansen wrote:
> On 2/28/19 3:28 AM, Steven Price wrote:
>> static int get_level(unsigned long addr, unsigned long end)
>> {
>> /* Add 1 to account for ~0ULL */
>> unsigned long size = (end - addr) + 1;
>> if (size <
On 28/02/2019 18:55, Paul Burton wrote:
> Hi Steven,
>
> On Thu, Feb 28, 2019 at 12:11:24PM +0000, Steven Price wrote:
>> On 28/02/2019 02:15, Paul Burton wrote:
>>> On Wed, Feb 27, 2019 at 05:05:45PM +, Steven Price wrote:
>>>> For mips, we don't suppor
On 28/02/2019 02:15, Paul Burton wrote:
> Hi Steven,
>
> On Wed, Feb 27, 2019 at 05:05:45PM +0000, Steven Price wrote:
>> For mips, we don't support large pages on 32 bit so add stubs returning 0.
>
> So far so good :)
>
>> For 64 bit look for _PAGE_HUGE flag
On 28/02/2019 11:53, Geert Uytterhoeven wrote:
> Hi Mike,
>
> On Thu, Feb 28, 2019 at 12:37 PM Mike Rapoport wrote:
>> On Wed, Feb 27, 2019 at 08:27:40PM +0100, Geert Uytterhoeven wrote:
>>> On Wed, Feb 27, 2019 at 6:07 PM Steven Price wrote:
>>>> walk
On 27/02/2019 18:38, David Miller wrote:
> From: Steven Price
> Date: Wed, 27 Feb 2019 17:05:54 +
>
>> walk_page_range() is going to be allowed to walk page tables other than
>> those of user space. For this it needs to know when it has reached a
>> 'lea
On 27/02/2019 17:40, Martin Schwidefsky wrote:
> On Wed, 27 Feb 2019 17:05:52 +
> Steven Price wrote:
>
>> walk_page_range() is going to be allowed to walk page tables other than
>> those of user space. For this it needs to know when it has reached a
>> 'lea
On 27/02/2019 17:38, Dave Hansen wrote:
> On 2/27/19 9:06 AM, Steven Price wrote:
>> #ifdef CONFIG_SHMEM
>> static int smaps_pte_hole(unsigned long addr, unsigned long end,
>> -struct mm_walk *walk)
>> + __always_unused int
r.
Remove the requirement to have a vma except when trying to split huge
pages.
Signed-off-by: Steven Price
---
mm/pagewalk.c | 25 +
1 file changed, 17 insertions(+), 8 deletions(-)
diff --git a/mm/pagewalk.c b/mm/pagewalk.c
index 98373a9f88b8..dac0c848b458 10064
To enable x86 to use the generic walk_page_range() function, the
callers of ptdump_walk_pgd_level_debugfs() need to pass in the mm_struct.
This means that ptdump_walk_pgd_level_core() is now always passed a
valid pgd, so drop the support for pgd==NULL.
Signed-off-by: Steven Price
---
arch/x86
-by: Steven Price
---
arch/x86/mm/dump_pagetables.c | 69 ++-
1 file changed, 35 insertions(+), 34 deletions(-)
diff --git a/arch/x86/mm/dump_pagetables.c b/arch/x86/mm/dump_pagetables.c
index e3cdc85ce5b6..ecbaf30a6a2f 100644
--- a/arch/x86/mm/dump_pagetables.c
+++ b/arch
().
For x86 move the existing definitions of p?d_large() so that they are
only defined when the corresponding levels are not folded.
Signed-off-by: Steven Price
---
arch/x86/include/asm/pgtable.h | 21 -
include/asm-generic/4level-fixup.h | 1 +
include/asm
callbacks
which can decide to skip an entire tree of entries
Signed-off-by: Steven Price
---
arch/x86/mm/dump_pagetables.c | 279 ++
1 file changed, 146 insertions(+), 133 deletions(-)
diff --git a/arch/x86/mm/dump_pagetables.c b/arch/x86/mm/dump_pagetables.c
index
that is reported is the actual level where the entry is
missing (ignoring any folding that is in place), i.e. any levels where
PTRS_PER_P?D is set to 1 are ignored.
Note that depth starts at 0 for a PGD so that PUD/PMD/PTE retain their
natural numbers as levels 2/3/4.
Signed-off-by: Steven Price
---
fs
page tables. This fake_mm structure is
initialised with the minimum necessary for the generic page walk code.
Signed-off-by: Steven Price
---
arch/x86/mm/dump_pagetables.c | 36 ---
1 file changed, 21 insertions(+), 15 deletions(-)
diff --git a/arch/x86/mm
ll entries, not
just transparent huge pages.
Signed-off-by: Steven Price
---
include/linux/mm.h | 9 ++---
mm/pagewalk.c | 27 ---
2 files changed, 22 insertions(+), 14 deletions(-)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 80bb6408fe73.
returning 0.
CC: Chris Zankel
CC: Max Filippov
CC: linux-xte...@linux-xtensa.org
Signed-off-by: Steven Price
---
arch/xtensa/include/asm/pgtable.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/xtensa/include/asm/pgtable.h
b/arch/xtensa/include/asm/pgtable.h
index 29cfe421cf41
Signed-off-by: Steven Price
---
arch/x86/include/asm/pgtable.h | 2 +-
arch/x86/mm/dump_pagetables.c | 4 ++--
arch/x86/platform/efi/efi_32.c | 2 +-
arch/x86/platform/efi/efi_64.c | 4 ++--
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/i
It is useful to be able to skip parts of the page table tree even when
walking without VMAs. Add test_p?d callbacks similar to test_walk but
which are called just before a table at that level is walked. If the
callback returns non-zero then the entire table is skipped.
Signed-off-by: Steven Price
Now walk_page_range() can walk kernel page tables, we can switch the
arm64 ptdump code over to using it, simplifying the code.
Signed-off-by: Steven Price
---
arch/arm64/mm/dump.c | 108 +--
1 file changed, 53 insertions(+), 55 deletions(-)
diff --git
a stub returning 0.
CC: Guan Xuetao
Signed-off-by: Steven Price
---
arch/unicore32/include/asm/pgtable.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/unicore32/include/asm/pgtable.h
b/arch/unicore32/include/asm/pgtable.h
index a4f2bef37e70..b45429df8b99 100644
--- a/arch/unicore32
stubs returning 0.
CC: Michal Simek
Signed-off-by: Steven Price
---
arch/microblaze/include/asm/pgtable.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/microblaze/include/asm/pgtable.h
b/arch/microblaze/include/asm/pgtable.h
index 142d3f004848..044ea7dbb4cc 100644
--- a/arch/microblaze
returning 0.
CC: Ley Foon Tan
CC: nios2-...@lists.rocketboards.org
Signed-off-by: Steven Price
---
arch/nios2/include/asm/pgtable.h | 5 +
1 file changed, 5 insertions(+)
diff --git a/arch/nios2/include/asm/pgtable.h b/arch/nios2/include/asm/pgtable.h
index db4f7d179220..b6ee0c205279 100644
returning 0.
CC: Jonas Bonn
CC: Stefan Kristiansson
CC: Stafford Horne
CC: openr...@lists.librecores.org
Signed-off-by: Steven Price
---
arch/openrisc/include/asm/pgtable.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/openrisc/include/asm/pgtable.h
b/arch/openrisc/include/asm
returning 0.
CC: Greentime Hu
CC: Vincent Chen
Signed-off-by: Steven Price
---
arch/nds32/include/asm/pgtable.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/nds32/include/asm/pgtable.h b/arch/nds32/include/asm/pgtable.h
index 9f52db930c00..202ac93c0a6b 100644
--- a/arch/nds32/include
returning 0.
CC: "James E.J. Bottomley"
CC: Helge Deller
CC: linux-par...@vger.kernel.org
Signed-off-by: Steven Price
---
arch/parisc/include/asm/pgtable.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/parisc/include/asm/pgtable.h
b/arch/parisc/include/asm/pgtab
returning 0.
CC: "David S. Miller"
CC: sparcli...@vger.kernel.org
Signed-off-by: Steven Price
---
arch/sparc/include/asm/pgtable_32.h | 10 ++
arch/sparc/include/asm/pgtable_64.h | 1 +
2 files changed, 11 insertions(+)
diff --git a/arch/sparc/include/asm/pgtable_32.h
b/
CC: linuxppc-...@lists.ozlabs.org
CC: kvm-...@vger.kernel.org
Signed-off-by: Steven Price
---
arch/powerpc/include/asm/book3s/32/pgtable.h | 1 +
arch/powerpc/include/asm/book3s/64/pgtable.h | 27 ---
arch/powerpc/include/asm/nohash/32/pgtable.h | 1 +
.../include/asm/nohash/64
or execute bit
set on it.
CC: Palmer Dabbelt
CC: Albert Ou
CC: linux-ri...@lists.infradead.org
Signed-off-by: Steven Price
---
arch/riscv/include/asm/pgtable-64.h | 6 ++
arch/riscv/include/asm/pgtable.h| 6 ++
2 files changed, 12 insertions(+)
diff --git a/arch/riscv/include/asm
returning 0.
CC: Yoshinori Sato
CC: Rich Felker
CC: linux...@vger.kernel.org
Signed-off-by: Steven Price
---
arch/sh/include/asm/pgtable-3level.h | 1 +
arch/sh/include/asm/pgtable_32.h | 1 +
arch/sh/include/asm/pgtable_64.h | 1 +
3 files changed, 3 insertions(+)
diff --git a/arch/sh
returning 0
CC: Geert Uytterhoeven
CC: linux-m...@lists.linux-m68k.org
Signed-off-by: Steven Price
---
arch/m68k/include/asm/mcf_pgtable.h | 2 ++
arch/m68k/include/asm/motorola_pgtable.h | 2 ++
arch/m68k/include/asm/pgtable_no.h | 1 +
arch/m68k/include/asm/sun3_pgtable.h | 2 ++
4
returning 0.
CC: Martin Schwidefsky
CC: Heiko Carstens
CC: linux-s...@vger.kernel.org
Signed-off-by: Steven Price
---
arch/s390/include/asm/pgtable.h | 10 ++
1 file changed, 10 insertions(+)
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h
index 063732414dfb
returning 0.
CC: Jeff Dike
CC: Richard Weinberger
CC: Anton Ivanov
CC: linux...@lists.infradead.org
Signed-off-by: Steven Price
---
arch/um/include/asm/pgtable-3level.h | 1 +
arch/um/include/asm/pgtable.h| 1 +
2 files changed, 2 insertions(+)
diff --git a/arch/um/include/asm/pgtable
stubs returning 0.
For 64 bit look for _PAGE_HUGE flag being set. This means exposing the
flag when !CONFIG_MIPS_HUGE_TLB_SUPPORT.
CC: Ralf Baechle
CC: Paul Burton
CC: James Hogan
CC: linux-m...@vger.kernel.org
Signed-off-by: Steven Price
---
arch/mips/include/asm/pgtable-32.h | 5
returning 0.
CC: linux-al...@vger.kernel.org
CC: Richard Henderson
CC: Ivan Kokshaysky
CC: Matt Turner
Signed-off-by: Steven Price
---
arch/alpha/include/asm/pgtable.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/alpha/include/asm/pgtable.h b/arch/alpha/include/asm/pgtable.h
implement
stubs returning 0.
CC: Tony Luck
CC: Fenghua Yu
CC: linux-i...@vger.kernel.org
Signed-off-by: Steven Price
---
arch/ia64/include/asm/pgtable.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/ia64/include/asm/pgtable.h b/arch/ia64/include/asm/pgtable.h
index b1e7468eb65a
returning 0.
CC: Richard Kuo
CC: linux-hexa...@vger.kernel.org
Signed-off-by: Steven Price
---
arch/hexagon/include/asm/pgtable.h | 5 +
1 file changed, 5 insertions(+)
diff --git a/arch/hexagon/include/asm/pgtable.h
b/arch/hexagon/include/asm/pgtable.h
index 65125d0b02dd..422e6aa2a6ef
just add stubs.
CC: Mark Salter
CC: Aurelien Jacquiot
CC: linux-c6x-...@linux-c6x.org
Signed-off-by: Steven Price
---
arch/c6x/include/asm/pgtable.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/c6x/include/asm/pgtable.h b/arch/c6x/include/asm/pgtable.h
index ec4db6df5e0d
() function in
mm/pagewalk.c)
Steven Price (34):
alpha: mm: Add p?d_large() definitions
arc: mm: Add p?d_large() definitions
arm: mm: Add p?d_large() definitions
arm64: mm: Add p?d_large() definitions
c6x: mm: Add p?d_large() definitions
csky: mm: Add p?d_large() definitions
hexagon: mm
returning 0.
CC: Guo Ren
Signed-off-by: Steven Price
---
arch/csky/include/asm/pgtable.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/csky/include/asm/pgtable.h b/arch/csky/include/asm/pgtable.h
index edfcbb25fd9f..4ffdb6bfbede 100644
--- a/arch/csky/include/asm/pgtable.h
+++ b/arch
. Add a stub for PUD
as we don't have huge pages at that level.
CC: Russell King
Signed-off-by: Steven Price
---
arch/arm/include/asm/pgtable-2level.h | 1 +
arch/arm/include/asm/pgtable-3level.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/arch/arm/include/asm/pgtable-2level.h
b/arch
we can reuse for
p?d_large().
CC: Catalin Marinas
CC: Will Deacon
Signed-off-by: Steven Price
---
arch/arm64/include/asm/pgtable.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
index de70c1eabf33..6eef345dbaf4 100644
() is needed.
CC: Vineet Gupta
CC: linux-snps-...@lists.infradead.org
Signed-off-by: Steven Price
---
arch/arc/include/asm/pgtable.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arc/include/asm/pgtable.h b/arch/arc/include/asm/pgtable.h
index cf4be70d5892..0edd27bc7018 100644
On 21/02/2019 21:06, Kirill A. Shutemov wrote:
> On Thu, Feb 21, 2019 at 05:16:46PM +0000, Steven Price wrote:
>>>> Note that in terms of the new page walking code, these new defines are
>>>> only used when walking a page table without a VMA (which isn't currently
&
On 21/02/2019 14:57, Kirill A. Shutemov wrote:
> On Thu, Feb 21, 2019 at 02:46:18PM +0000, Steven Price wrote:
>> On 21/02/2019 14:28, Kirill A. Shutemov wrote:
>>> On Thu, Feb 21, 2019 at 11:34:52AM +, Steven Price wrote:
>>>> From: James Morse
>>
On 21/02/2019 14:28, Kirill A. Shutemov wrote:
> On Thu, Feb 21, 2019 at 11:34:52AM +0000, Steven Price wrote:
>> From: James Morse
>>
>> Exposing the pud/pgd levels of the page tables to walk_page_range() means
>> we may come across the exotic large mappings
-by: Steven Price
---
arch/x86/mm/dump_pagetables.c | 69 ++-
1 file changed, 35 insertions(+), 34 deletions(-)
diff --git a/arch/x86/mm/dump_pagetables.c b/arch/x86/mm/dump_pagetables.c
index cf37abc0f58a..b1b86157d456 100644
--- a/arch/x86/mm/dump_pagetables.c
+++ b/arch
that is reported is the actual level where the entry is
missing (ignoring any folding that is in place), i.e. any levels where
PTRS_PER_P?D is set to 1 are ignored.
Note that depth starts at 0 for a PGD so that PUD/PMD/PTE retain their
natural numbers as levels 2/3/4.
Signed-off-by: Steven Price
---
fs
callbacks
which can decide to skip an entire tree of entries
Signed-off-by: Steven Price
---
arch/x86/mm/dump_pagetables.c | 282 ++
1 file changed, 146 insertions(+), 136 deletions(-)
diff --git a/arch/x86/mm/dump_pagetables.c b/arch/x86/mm/dump_pagetables.c
index
page tables. This fake_mm structure is
initialised with the minimum necessary for the generic page walk code.
Signed-off-by: Steven Price
---
arch/x86/mm/dump_pagetables.c | 36 ---
1 file changed, 21 insertions(+), 15 deletions(-)
diff --git a/arch/x86/mm
Now walk_page_range() can walk kernel page tables, we can switch the
arm64 ptdump code over to using it, simplifying the code.
Signed-off-by: Steven Price
---
arch/arm64/mm/dump.c | 108 +--
1 file changed, 53 insertions(+), 55 deletions(-)
diff --git
Signed-off-by: Steven Price
---
arch/x86/include/asm/pgtable.h | 2 +-
arch/x86/mm/dump_pagetables.c | 4 ++--
arch/x86/platform/efi/efi_32.c | 2 +-
arch/x86/platform/efi/efi_64.c | 4 ++--
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/i
To enable x86 to use the generic walk_page_range() function, the
callers of ptdump_walk_pgd_level_debugfs() need to pass in the mm_struct.
This means that ptdump_walk_pgd_level_core() is now always passed a
valid pgd, so drop the support for pgd==NULL.
Signed-off-by: Steven Price
---
arch/x86
It is useful to be able to skip parts of the page table tree even when
walking without VMAs. Add test_p?d callbacks similar to test_walk but
which are called just before a table at that level is walked. If the
callback returns non-zero then the entire table is skipped.
Signed-off-by: Steven Price
these defined as inline functions, add a macro of the
same name so we don't end up with the generic version too.
Signed-off-by: James Morse
Signed-off-by: Steven Price
---
arch/x86/include/asm/pgtable.h | 3 +++
arch/x86/mm/dump_pagetables.c | 3 +++
2 files changed, 6 insertions(+)
diff --git
ll entries, not
just transparent huge pages.
Signed-off-by: Steven Price
---
include/linux/mm.h | 9 ++---
mm/pagewalk.c | 27 ---
2 files changed, 22 insertions(+), 14 deletions(-)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 80bb6408fe73.
nothing default.
Signed-off-by: James Morse
Signed-off-by: Steven Price
---
include/asm-generic/pgtable.h | 19 +++
1 file changed, 19 insertions(+)
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
index 05e61e6c843f..f0de24100ac6 100644
--- a/include/asm
r.
Remove the requirement to have a vma except when trying to split huge
pages.
Signed-off-by: Steven Price
---
mm/pagewalk.c | 25 +
1 file changed, 17 insertions(+), 8 deletions(-)
diff --git a/mm/pagewalk.c b/mm/pagewalk.c
index 98373a9f88b8..dac0c848b458 10064
to explain mapping between
depth and P?D
* Handle folded page tables at all levels, so depth from pte_hole()
ignores folding at any level (see real_depth() function in
mm/pagewalk.c)
James Morse (2):
arm64: mm: Add p?d_large() definitions
mm: Add generic p?d_large() macros
Steven Price (11
.
arm64 already has these macros defined, but with a different name.
p?d_large() is used by s390, sparc and x86. Only arm/arm64 use p?d_sect().
Add a macro to allow both names.
Signed-off-by: James Morse
Signed-off-by: Steven Price
---
arch/arm64/include/asm/pgtable.h | 2 ++
1 file changed, 2
On 20/02/2019 11:35, William Kucharski wrote:
>
>
>> On Feb 15, 2019, at 10:02 AM, Steven Price wrote:
>>
>> The pte_hole() callback is called at multiple levels of the page tables.
>> Code dumping the kernel page tables needs to know what at what dept
On 19/02/2019 03:44, Liang, Kan wrote:
>
>
> On 2/18/2019 9:19 AM, Steven Price wrote:
>> On 18/02/2019 11:31, Peter Zijlstra wrote:
>>> On Fri, Feb 15, 2019 at 05:02:24PM +, Steven Price wrote:
>>>> From: James Morse
>>>>
>
On 18/02/2019 17:04, Mark Rutland wrote:
> On Mon, Feb 18, 2019 at 03:30:38PM +0000, Steven Price wrote:
>> On 18/02/2019 15:06, Peter Zijlstra wrote:
>>> On Mon, Feb 18, 2019 at 02:29:52PM +, Mark Rutland wrote:
>>>> I think that Peter means p?d_huge(x)
On 18/02/2019 15:06, Peter Zijlstra wrote:
> On Mon, Feb 18, 2019 at 02:29:52PM +, Mark Rutland wrote:
>> I think that Peter means p?d_huge(x) should imply p?d_large(x), e.g.
>>
>> #define pmd_large(x) \
>> (pmd_sect(x) || pmd_huge(x) || pmd_trans_huge(x))
>>
>> ... which should work
On 18/02/2019 11:23, Mark Rutland wrote:
> On Fri, Feb 15, 2019 at 05:02:27PM +0000, Steven Price wrote:
>> +/* If the p4ds are actually just pgds then we should report a depth
>> + * of 0 not 1 (as a missing entry is really a missing pgd
>> + */
>
> Nit: comment style
On 18/02/2019 12:53, Peter Zijlstra wrote:
> On Mon, Feb 18, 2019 at 11:14:23AM +, Mark Rutland wrote:
>>> +#ifndef pgd_large
>>> +#define pgd_large(x)0
>>> +#endif
>>> +#ifndef pud_large
>>> +#define pud_large(x)0
>>> +#endif
>>> +#ifndef pmd_large
>>> +#define pmd_large(x)0
>>> +#endif
>>
>>
On 18/02/2019 11:31, Peter Zijlstra wrote:
> On Fri, Feb 15, 2019 at 05:02:24PM +0000, Steven Price wrote:
>> From: James Morse
>>
>> Exposing the pud/pgd levels of the page tables to walk_page_range() means
>> we may come across the exotic large mappings
On 18/02/2019 11:29, Peter Zijlstra wrote:
> On Fri, Feb 15, 2019 at 05:02:22PM +0000, Steven Price wrote:
>
>> diff --git a/arch/arm64/include/asm/pgtable.h
>> b/arch/arm64/include/asm/pgtable.h
>> index de70c1eabf33..09d308921625 100644
>> --- a/arch/arm64/inclu
On 15/02/2019 17:16, Dave Hansen wrote:
> On 2/15/19 9:02 AM, Steven Price wrote:
>> arch/x86/mm/dump_pagetables.c | 281 ++
>> 1 file changed, 146 insertions(+), 135 deletions(-)
>
> I'll look through this in more detail in a bit. But, I
r.
Remove the requirement to have a vma except when trying to split huge
pages.
Signed-off-by: Steven Price
---
mm/pagewalk.c | 25 +
1 file changed, 17 insertions(+), 8 deletions(-)
diff --git a/mm/pagewalk.c b/mm/pagewalk.c
index 98373a9f88b8..dac0c848b458 10064
Signed-off-by: Steven Price
---
arch/x86/include/asm/pgtable.h | 2 +-
arch/x86/mm/dump_pagetables.c | 4 ++--
arch/x86/platform/efi/efi_32.c | 2 +-
arch/x86/platform/efi/efi_64.c | 4 ++--
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/i
callbacks
which can decide to skip an entire tree of entries
Signed-off-by: Steven Price
---
arch/x86/mm/dump_pagetables.c | 281 ++
1 file changed, 146 insertions(+), 135 deletions(-)
diff --git a/arch/x86/mm/dump_pagetables.c b/arch/x86/mm/dump_pagetables.c
index
To enable x86 to use the generic walk_page_range() function, the
callers of ptdump_walk_pgd_level_debugfs() need to pass in the mm_struct.
This means that ptdump_walk_pgd_level_core() is now always passed a
valid pgd, so drop the support for pgd==NULL.
Signed-off-by: Steven Price
---
arch/x86
nothing default.
Signed-off-by: James Morse
Signed-off-by: Steven Price
---
include/asm-generic/pgtable.h | 10 ++
1 file changed, 10 insertions(+)
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
index 05e61e6c843f..7630d663cd51 100644
--- a/include/asm-generic
page tables. This fake_mm structure is
initialised with the minimum necessary for the generic page walk code.
Signed-off-by: Steven Price
---
arch/x86/mm/dump_pagetables.c | 36 ---
1 file changed, 21 insertions(+), 15 deletions(-)
diff --git a/arch/x86/mm
-by: Steven Price
---
arch/x86/mm/dump_pagetables.c | 69 ++-
1 file changed, 35 insertions(+), 34 deletions(-)
diff --git a/arch/x86/mm/dump_pagetables.c b/arch/x86/mm/dump_pagetables.c
index 695647dc9cb9..ad6986c9e8e7 100644
--- a/arch/x86/mm/dump_pagetables.c
+++ b/arch
It is useful to be able to skip parts of the page table tree even when
walking without VMAs. Add test_p?d callbacks similar to test_walk but
which are called just before a table at that level is walked. If the
callback returns non-zero then the entire table is skipped.
Signed-off-by: Steven Price
Now walk_page_range() can walk kernel page tables, we can switch the
arm64 ptdump code over to using it, simplifying the code.
Signed-off-by: Steven Price
---
arch/arm64/mm/dump.c | 108 +--
1 file changed, 53 insertions(+), 55 deletions(-)
diff --git
ll entries, not
just transparent huge pages.
Signed-off-by: Steven Price
---
include/linux/mm.h | 9 ++---
mm/pagewalk.c | 27 ---
2 files changed, 22 insertions(+), 14 deletions(-)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 80bb6408fe73.
starts at 0 for a PGD so that PUD/PMD/PTE retain their
natural numbers as levels 2/3/4.
Signed-off-by: Steven Price
---
fs/proc/task_mmu.c | 4 ++--
include/linux/mm.h | 5 +++--
mm/hmm.c | 2 +-
mm/migrate.c | 1 +
mm/mincore.c | 1 +
mm/pagewalk.c | 16
these defined as inline functions, add a macro of the
same name so we don't end up with the generic version too.
Signed-off-by: James Morse
Signed-off-by: Steven Price
---
arch/x86/include/asm/pgtable.h | 3 +++
arch/x86/mm/dump_pagetables.c | 2 ++
2 files changed, 5 insertions(+)
diff --git
-by: Steven Price
---
arch/arm64/include/asm/pgtable.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
index de70c1eabf33..09d308921625 100644
--- a/arch/arm64/include/asm/pgtable.h
+++ b/arch/arm64/include/asm/pgtable.h
for debugfs. One
immediate benefit would be getting the KASAN speed up optimisation in
arm64 (and other arches) which is currently only implemented for x86.
James Morse (2):
arm64: mm: Add p?d_large() definitions
mm: Add generic p?d_large() macros
Steven Price (11):
x86/mm: Add p?d_large
it means that the initrd is freed (previously it was
ignored and never freed). But that seems like reasonable behaviour and
the previous behaviour looks like another oversight. FWIW:
Reviewed-by: Steven Price
> Signed-off-by: Christoph Hellwig
> ---
> init/initramfs.c | 14 ++
On 18/01/2019 16:00, Andrew Murray wrote:
> Use the STUB_UNLESS macro to simplify function declaration.
>
> Signed-off-by: Andrew Murray
> ---
> arch/arm64/include/asm/acpi.h | 38 +-
> arch/arm64/include/asm/alternative.h| 6 +---
>
On 18/01/2019 16:00, Andrew Murray wrote:
> Use the STUB_UNLESS macro to simplify function declaration.
>
> Signed-off-by: Andrew Murray
Reviewed-by: Steven Price
> ---
> include/linux/cpufreq.h | 21 ++---
> 1 file changed, 6 insertions(+), 15 deletions(
' followed by an empty function body. Where optional argument 'body'
> then 'body' will be used as the function body, intended to allow for simple
> return statements.
>
> Signed-off-by: Andrew Murray
Seems like it should remove a lot of boilerplate code, so looks good to me.
Re
On 14/12/2018 10:36, Will Deacon wrote:
> On Fri, Dec 14, 2018 at 10:34:31AM +0000, Steven Price wrote:
>> On 06/12/2018 23:44, Jeremy Linton wrote:
>>> From: Mian Yousaf Kaukab
>>>
>>> Return status based no ssbd_state and the arm64 SSBS feature.
>>
501 - 600 of 602 matches
Mail list logo