Skip to content

Commit

Permalink
powerpc/ptdump: drop dummy KERN_VIRT_START on PPC32
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Christophe Leroy authored and Michael Ellerman committed Aug 20, 2019
1 parent e033829 commit 8224235
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions arch/powerpc/mm/ptdump/ptdump.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@

#include "ptdump.h"

#ifdef CONFIG_PPC32
#define KERN_VIRT_START 0
#endif

/*
* To visualise what is happening,
*
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 8224235

Please sign in to comment.