]> www.infradead.org Git - users/willy/xarray.git/commit
powerpc/64s: use contiguous PMD/PUD instead of HUGEPD
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Tue, 2 Jul 2024 13:51:33 +0000 (15:51 +0200)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 12 Jul 2024 22:52:19 +0000 (15:52 -0700)
commit57fb15c32f4f6a4f1a58f1fbc58a799c3f975ed8
treef7eedba4527abcdb48867a0de8b40b3f7ae233af
parent7c44202e36097e23240025298ccd1fe4eacfd94e
powerpc/64s: use contiguous PMD/PUD instead of HUGEPD

On book3s/64, the only user of hugepd is hash in 4k mode.

All other setups (hash-64, radix-4, radix-64) use leaf PMD/PUD.

Rework hash-4k to use contiguous PMD and PUD instead.

In that setup there are only two huge page sizes: 16M and 16G.

16M sits at PMD level and 16G at PUD level.

pte_update doesn't know page size, lets use the same trick as
hpte_need_flush() to get page size from segment properties.  That's not
the most efficient way but let's do that until callers of pte_update()
provide page size instead of just a huge flag.

Link: https://lkml.kernel.org/r/7448f60a9b3efd396595f4f735d1e0babc5ae379.1719928057.git.christophe.leroy@csgroup.eu
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
Cc: Jason Gunthorpe <jgg@nvidia.com>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Peter Xu <peterx@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
15 files changed:
arch/powerpc/include/asm/book3s/64/hash-4k.h
arch/powerpc/include/asm/book3s/64/hash.h
arch/powerpc/include/asm/book3s/64/hugetlb.h
arch/powerpc/include/asm/book3s/64/pgtable-4k.h [deleted file]
arch/powerpc/include/asm/book3s/64/pgtable-64k.h
arch/powerpc/include/asm/book3s/64/pgtable.h
arch/powerpc/include/asm/hugetlb.h
arch/powerpc/include/asm/nohash/hugetlb-e500.h
arch/powerpc/include/asm/page.h
arch/powerpc/mm/book3s64/hash_utils.c
arch/powerpc/mm/book3s64/hugetlbpage.c
arch/powerpc/mm/book3s64/pgtable.c
arch/powerpc/mm/hugetlbpage.c
arch/powerpc/mm/pgtable.c
arch/powerpc/platforms/Kconfig.cputype