blob: 12fca95f7749c02cd74676882703ec03b8aa91d5 [file] [log] [blame]
From 0ec139b79d62ec7328390a6bacb96ce2c9fbd8f0 Mon Sep 17 00:00:00 2001
From: Christophe Leroy <>
Date: Wed, 14 Aug 2019 12:36:09 +0000
Subject: [PATCH] powerpc/ptdump: Fix addresses display on PPC32
commit 7c7a532ba3fc51bf9527d191fb410786c1fdc73c upstream.
Commit 453d87f6a8ae ("powerpc/mm: Warn if W+X pages found on boot")
wrongly changed KERN_VIRT_START from 0 to PAGE_OFFSET, leading to a
shift in the displayed addresses.
Lets revert that change to resync walk_pagetables()'s addr val and
pgd_t pointer for PPC32.
Fixes: 453d87f6a8ae ("powerpc/mm: Warn if W+X pages found on boot")
Cc: # v5.2+
Signed-off-by: Christophe Leroy <>
Signed-off-by: Michael Ellerman <>
Signed-off-by: Paul Gortmaker <>
diff --git a/arch/powerpc/mm/ptdump/ptdump.c b/arch/powerpc/mm/ptdump/ptdump.c
index 39bf1e2cba13..b69912854dc3 100644
--- a/arch/powerpc/mm/ptdump/ptdump.c
+++ b/arch/powerpc/mm/ptdump/ptdump.c
@@ -27,7 +27,7 @@
#include "ptdump.h"
#ifdef CONFIG_PPC32
+#define KERN_VIRT_START 0