Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Suchanek <msuchanek@suse.de>2019-05-03 11:50:25 +0200
committerMichal Suchanek <msuchanek@suse.de>2019-05-03 12:10:32 +0200
commit5451b1eeae51db8066b49b7ec94d40133837c34f (patch)
tree6961e57c28413b21083f2b7a2fda5ca5e361a216
parentb628e693111f0e32f63d7d246a18891c1e7ede37 (diff)
powerpc/mm: Fix page table dump to work on Radix (bsc#1055186,
fate#323286, git-fixes).
-rw-r--r--patches.arch/powerpc-mm-Fix-page-table-dump-to-work-on-Radix.patch60
-rw-r--r--series.conf1
2 files changed, 61 insertions, 0 deletions
diff --git a/patches.arch/powerpc-mm-Fix-page-table-dump-to-work-on-Radix.patch b/patches.arch/powerpc-mm-Fix-page-table-dump-to-work-on-Radix.patch
new file mode 100644
index 0000000000..f683210903
--- /dev/null
+++ b/patches.arch/powerpc-mm-Fix-page-table-dump-to-work-on-Radix.patch
@@ -0,0 +1,60 @@
+From 0d923962ab69c27cca664a2d535e90ef655110ca Mon Sep 17 00:00:00 2001
+From: Michael Ellerman <mpe@ellerman.id.au>
+Date: Wed, 15 Aug 2018 21:29:45 +1000
+Subject: [PATCH] powerpc/mm: Fix page table dump to work on Radix
+
+References: bsc#1055186, fate#323286, git-fixes
+Patch-mainline: v4.20-rc1
+Git-commit: 0d923962ab69c27cca664a2d535e90ef655110ca
+
+When we're running on Book3S with the Radix MMU enabled the page table
+dump currently prints the wrong addresses because it uses the wrong
+start address.
+
+Fix it to use PAGE_OFFSET rather than KERN_VIRT_START.
+
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Acked-by: Michal Suchanek <msuchanek@suse.de>
+---
+ arch/powerpc/mm/dump_linuxpagetables.c | 12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/arch/powerpc/mm/dump_linuxpagetables.c b/arch/powerpc/mm/dump_linuxpagetables.c
+index e60aa6d7456d..2b74f8adf4d0 100644
+--- a/arch/powerpc/mm/dump_linuxpagetables.c
++++ b/arch/powerpc/mm/dump_linuxpagetables.c
+@@ -267,12 +267,13 @@ static void walk_pagetables(struct pg_state *st)
+ unsigned int i;
+ unsigned long addr;
+
++ addr = st->start_address;
++
+ /*
+ * Traverse the linux pagetable structure and dump pages that are in
+ * the hash pagetable.
+ */
+- for (i = 0; i < PTRS_PER_PGD; i++, pgd++) {
+- addr = KERN_VIRT_START + i * PGDIR_SIZE;
++ for (i = 0; i < PTRS_PER_PGD; i++, pgd++, addr += PGDIR_SIZE) {
+ if (!pgd_none(*pgd) && !pgd_huge(*pgd))
+ /* pgd exists */
+ walk_pud(st, pgd, addr);
+@@ -321,9 +322,14 @@ static int ptdump_show(struct seq_file *m, void *v)
+ {
+ struct pg_state st = {
+ .seq = m,
+- .start_address = KERN_VIRT_START,
+ .marker = address_markers,
+ };
++
++ if (radix_enabled())
++ st.start_address = PAGE_OFFSET;
++ else
++ st.start_address = KERN_VIRT_START;
++
+ /* Traverse kernel page tables */
+ walk_pagetables(&st);
+ note_page(&st, 0, 0, 0);
+--
+2.20.1
+
diff --git a/series.conf b/series.conf
index 38ea33bbc7..52004987af 100644
--- a/series.conf
+++ b/series.conf
@@ -19630,6 +19630,7 @@
patches.arch/powerpc-rtas-Fix-a-potential-race-between-CPU-Offlin.patch
patches.arch/powerpc-mm-Add-missing-tracepoint-for-tlbie.patch
patches.arch/powerpc-mm-radix-Display-if-mappings-are-exec-or-not.patch
+ patches.arch/powerpc-mm-Fix-page-table-dump-to-work-on-Radix.patch
patches.arch/powerpc-traps-restore-recoverability-of-machine_chec.patch
patches.suse/net-udp-fix-handling-of-CHECKSUM_COMPLETE-packets.patch
patches.suse/ipv6-ndisc-Preserve-IPv6-control-buffer-if-protocol-.patch