summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@csgroup.eu>2021-06-07 12:56:05 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2021-06-16 16:09:10 +0200
commite72421a085a8dc81c71b0daeb89612279c2c621c (patch)
tree103b9b6aa59da2c354365c2717539e54d2cc6c41 /arch/powerpc/mm
parentpowerpc: Define empty_zero_page[] in C (diff)
downloadlinux-e72421a085a8dc81c71b0daeb89612279c2c621c.tar.xz
linux-e72421a085a8dc81c71b0daeb89612279c2c621c.zip
powerpc: Define swapper_pg_dir[] in C
Don't duplicate swapper_pg_dir[] in each platform's head.S Define it in mm/pgtable.c Define MAX_PTRS_PER_PGD because on book3s/64 PTRS_PER_PGD is not a constant. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/5e3f1b8a4695c33ccc80aa3870e016bef32b85e1.1623063174.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/mm')
-rw-r--r--arch/powerpc/mm/pgtable.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/mm/pgtable.c b/arch/powerpc/mm/pgtable.c
index 354611940118..1707ab580ee2 100644
--- a/arch/powerpc/mm/pgtable.c
+++ b/arch/powerpc/mm/pgtable.c
@@ -28,6 +28,8 @@
#include <asm/hugetlb.h>
#include <asm/pte-walk.h>
+pgd_t swapper_pg_dir[MAX_PTRS_PER_PGD] __page_aligned_bss;
+
static inline int is_exec_fault(void)
{
return current->thread.regs && TRAP(current->thread.regs) == 0x400;