Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 82242352 authored by Christophe Leroy's avatar Christophe Leroy Committed by Michael Ellerman
Browse files

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: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/334632b1df4775b0ccf3bdc8d6b201d14e3daedd.1565786091.git.christophe.leroy@c-s.fr
parent e033829d
Loading
Loading
Loading
Loading
+8 −10
Original line number Original line Diff line number Diff line
@@ -26,10 +26,6 @@


#include "ptdump.h"
#include "ptdump.h"


#ifdef CONFIG_PPC32
#define KERN_VIRT_START	0
#endif

/*
/*
 * To visualise what is happening,
 * To visualise what is happening,
 *
 *
@@ -362,12 +358,13 @@ static int ptdump_show(struct seq_file *m, void *v)
	struct pg_state st = {
	struct pg_state st = {
		.seq = m,
		.seq = m,
		.marker = address_markers,
		.marker = address_markers,
		.start_address = PAGE_OFFSET,
	};
	};


	if (radix_enabled())
#ifdef CONFIG_PPC64
		st.start_address = PAGE_OFFSET;
	if (!radix_enabled())
	else
		st.start_address = KERN_VIRT_START;
		st.start_address = KERN_VIRT_START;
#endif


	/* Traverse kernel page tables */
	/* Traverse kernel page tables */
	walk_pagetables(&st);
	walk_pagetables(&st);
@@ -405,12 +402,13 @@ void ptdump_check_wx(void)
		.seq = NULL,
		.seq = NULL,
		.marker = address_markers,
		.marker = address_markers,
		.check_wx = true,
		.check_wx = true,
		.start_address = PAGE_OFFSET,
	};
	};


	if (radix_enabled())
#ifdef CONFIG_PPC64
		st.start_address = PAGE_OFFSET;
	if (!radix_enabled())
	else
		st.start_address = KERN_VIRT_START;
		st.start_address = KERN_VIRT_START;
#endif


	walk_pagetables(&st);
	walk_pagetables(&st);