summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/ptdump/ptdump.c
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@c-s.fr>2019-08-14 12:36:11 +0000
committerMichael Ellerman <mpe@ellerman.id.au>2019-08-20 21:22:09 +1000
commit82242352728125ecd86cea4631b89a5e6be0d0fd (patch)
tree19af3d8ee29a5d33f52a0d1bd74bfcdef38540c3 /arch/powerpc/mm/ptdump/ptdump.c
parente033829d2aaad85cb7cf46986c3be0bcc72f791e (diff)
downloadlinux-82242352728125ecd86cea4631b89a5e6be0d0fd.tar.bz2
powerpc/ptdump: drop dummy KERN_VIRT_START on PPC32
PPC32 doesn't have KERN_VIRT_START. Make PAGE_OFFSET the default starting address for the dump, and drop the dummy definition of KERN_VIRT_START. Only use KERN_VIRT_START for non radix PPC64. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/334632b1df4775b0ccf3bdc8d6b201d14e3daedd.1565786091.git.christophe.leroy@c-s.fr
Diffstat (limited to 'arch/powerpc/mm/ptdump/ptdump.c')
-rw-r--r--arch/powerpc/mm/ptdump/ptdump.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/arch/powerpc/mm/ptdump/ptdump.c b/arch/powerpc/mm/ptdump/ptdump.c
index 74ff2bff4ea0..9a2186c133e6 100644
--- a/arch/powerpc/mm/ptdump/ptdump.c
+++ b/arch/powerpc/mm/ptdump/ptdump.c
@@ -26,10 +26,6 @@
#include "ptdump.h"
-#ifdef CONFIG_PPC32
-#define KERN_VIRT_START 0
-#endif
-
/*
* To visualise what is happening,
*
@@ -362,12 +358,13 @@ static int ptdump_show(struct seq_file *m, void *v)
struct pg_state st = {
.seq = m,
.marker = address_markers,
+ .start_address = PAGE_OFFSET,
};
- if (radix_enabled())
- st.start_address = PAGE_OFFSET;
- else
+#ifdef CONFIG_PPC64
+ if (!radix_enabled())
st.start_address = KERN_VIRT_START;
+#endif
/* Traverse kernel page tables */
walk_pagetables(&st);
@@ -405,12 +402,13 @@ void ptdump_check_wx(void)
.seq = NULL,
.marker = address_markers,
.check_wx = true,
+ .start_address = PAGE_OFFSET,
};
- if (radix_enabled())
- st.start_address = PAGE_OFFSET;
- else
+#ifdef CONFIG_PPC64
+ if (!radix_enabled())
st.start_address = KERN_VIRT_START;
+#endif
walk_pagetables(&st);