Re: [PATCH v4 08/14] powerpc: add support for folded p4d page tables
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Mike Rapoport <rppt@xxxxxxxxxx>
- Subject: Re: [PATCH v4 08/14] powerpc: add support for folded p4d page tables
- From: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 3 Jun 2020 12:05:22 -0700
- Cc: Arnd Bergmann <arnd@xxxxxxxx>, Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>, Brian Cain <bcain@xxxxxxxxxxxxxx>, Catalin Marinas <catalin.marinas@xxxxxxx>, Christophe Leroy <christophe.leroy@xxxxxx>, Fenghua Yu <fenghua.yu@xxxxxxxxx>, Geert Uytterhoeven <geert+renesas@xxxxxxxxx>, Guan Xuetao <gxt@xxxxxxxxxx>, James Morse <james.morse@xxxxxxx>, Jonas Bonn <jonas@xxxxxxxxxxxx>, Julien Thierry <julien.thierry.kdev@xxxxxxxxx>, Ley Foon Tan <ley.foon.tan@xxxxxxxxx>, Marc Zyngier <maz@xxxxxxxxxx>, Michael Ellerman <mpe@xxxxxxxxxxxxxx>, Paul Mackerras <paulus@xxxxxxxxx>, Rich Felker <dalias@xxxxxxxx>, Russell King <linux@xxxxxxxxxxxxxxx>, Stafford Horne <shorne@xxxxxxxxx>, Stefan Kristiansson <stefan.kristiansson@xxxxxxxxxxxxx>, Suzuki K Poulose <suzuki.poulose@xxxxxxx>, Tony Luck <tony.luck@xxxxxxxxx>, Will Deacon <will@xxxxxxxxxx>, Yoshinori Sato <ysato@xxxxxxxxxxxxxxxxxxxx>, kvmarm@xxxxxxxxxxxxxxxxxxxxx, kvm-ppc@xxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-hexagon@xxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, nios2-dev@xxxxxxxxxxxxxxxxxxxxxx, openrisc@xxxxxxxxxxxxxxxxxxxx, uclinux-h8-devel@xxxxxxxxxxxxxxxxxxxx, Mike Rapoport <rppt@xxxxxxxxxxxxx>
- In-reply-to: <20200414153455.21744-9-rppt@kernel.org>
- References: <20200414153455.21744-1-rppt@kernel.org> <20200414153455.21744-9-rppt@kernel.org>
On Tue, 14 Apr 2020 18:34:49 +0300 Mike Rapoport <rppt@xxxxxxxxxx> wrote:
> Implement primitives necessary for the 4th level folding, add walks of p4d
> level where appropriate and replace 5level-fixup.h with pgtable-nop4d.h.
A bunch of new material just landed in linux-next/powerpc.
The timing is awkward! I trust this will be going into mainline during
this merge window? If not, please drop it and repull after -rc1.
arch/powerpc/mm/ptdump/ptdump.c:walk_pagetables() was a problem.
Here's what I ended up with - please check.
static void walk_pagetables(struct pg_state *st)
{
unsigned int i;
unsigned long addr = st->start_address & PGDIR_MASK;
pgd_t *pgd = pgd_offset_k(addr);
/*
* Traverse the linux pagetable structure and dump pages that are in
* the hash pagetable.
*/
for (i = pgd_index(addr); i < PTRS_PER_PGD; i++, pgd++, addr += PGDIR_SIZE) {
p4d_t *p4d = p4d_offset(pgd, 0);
if (pgd_none(*pgd) || pgd_is_leaf(*pgd))
note_page(st, addr, 1, p4d_val(*p4d), PGDIR_SIZE);
else if (is_hugepd(__hugepd(p4d_val(*p4d))))
walk_hugepd(st, (hugepd_t *)pgd, addr, PGDIR_SHIFT, 1);
else
/* pgd exists */
walk_pud(st, p4d, addr);
}
}
Mike's series "mm: consolidate definitions of page table accessors"
took quite a lot of damage as well. Patches which needed rework as a
result of this were:
powerpc-add-support-for-folded-p4d-page-tables-fix.patch
mm-introduce-include-linux-pgtableh.patch
mm-reorder-includes-after-introduction-of-linux-pgtableh.patch
mm-pgtable-add-shortcuts-for-accessing-kernel-pmd-and-pte.patch
mm-pgtable-add-shortcuts-for-accessing-kernel-pmd-and-pte-fix-2.patch
mm-consolidate-pte_index-and-pte_offset_-definitions.patch
mm-consolidate-pmd_index-and-pmd_offset-definitions.patch
mm-consolidate-pud_index-and-pud_offset-definitions.patch
mm-consolidate-pgd_index-and-pgd_offset_k-definitions.patch
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]