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:17 +0200
commit9b16c7cdaeb5e685caa1946541eb1d9679b87405 (patch)
treeb9375a889452181ee7c55b07a5ade0e8e4c0ebac
parent3673108c567e6ef572eb5e802c4108e107a64c97 (diff)
powerpc/mm/radix: Prettify mapped memory range print out
(bsc#1055186, fate#323286, git-fixes). - Refresh patches.arch/powerpc-mm-radix-Split-linear-mapping-on-hot-unplug.patch
-rw-r--r--patches.arch/powerpc-mm-radix-Prettify-mapped-memory-range-print-.patch61
-rw-r--r--patches.arch/powerpc-mm-radix-Split-linear-mapping-on-hot-unplug.patch22
-rw-r--r--series.conf1
3 files changed, 73 insertions, 11 deletions
diff --git a/patches.arch/powerpc-mm-radix-Prettify-mapped-memory-range-print-.patch b/patches.arch/powerpc-mm-radix-Prettify-mapped-memory-range-print-.patch
new file mode 100644
index 0000000000..38dd184d2b
--- /dev/null
+++ b/patches.arch/powerpc-mm-radix-Prettify-mapped-memory-range-print-.patch
@@ -0,0 +1,61 @@
+From 6deb6b474bda4d2d3fbee066f20561d3dc7f8b30 Mon Sep 17 00:00:00 2001
+From: Michael Ellerman <mpe@ellerman.id.au>
+Date: Wed, 30 Aug 2017 17:41:17 +1000
+Subject: [PATCH] powerpc/mm/radix: Prettify mapped memory range print out
+
+References: bsc#1055186, fate#323286, git-fixes
+Patch-mainline: v4.14-rc1
+Git-commit: 6deb6b474bda4d2d3fbee066f20561d3dc7f8b30
+
+When we map memory at boot we print out the ranges of real addresses
+that we mapped and the page size that was used.
+
+Currently it's a bit ugly:
+
+ Mapped range 0x0 - 0x2000000000 with 0x40000000
+ Mapped range 0x200000000000 - 0x202000000000 with 0x40000000
+
+Pad the addresses so they line up, and print the page size using
+actual units, eg:
+
+ Mapped 0x0000000000000000-0x0000000001200000 with 64.0 KiB pages
+ Mapped 0x0000000001200000-0x0000000040000000 with 2.00 MiB pages
+ Mapped 0x0000000040000000-0x0000000100000000 with 1.00 GiB pages
+
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Acked-by: Michal Suchanek <msuchanek@suse.de>
+---
+ arch/powerpc/mm/pgtable-radix.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/arch/powerpc/mm/pgtable-radix.c b/arch/powerpc/mm/pgtable-radix.c
+index 5156d2627779..39c252b54d16 100644
+--- a/arch/powerpc/mm/pgtable-radix.c
++++ b/arch/powerpc/mm/pgtable-radix.c
+@@ -16,6 +16,7 @@
+ #include <linux/memblock.h>
+ #include <linux/of_fdt.h>
+ #include <linux/mm.h>
++#include <linux/string_helpers.h>
+
+ #include <asm/pgtable.h>
+ #include <asm/pgalloc.h>
+@@ -187,10 +188,14 @@ static inline void __meminit print_mapping(unsigned long start,
+ unsigned long end,
+ unsigned long size)
+ {
++ char buf[10];
++
+ if (end <= start)
+ return;
+
+- pr_info("Mapped range 0x%lx - 0x%lx with 0x%lx\n", start, end, size);
++ string_get_size(size, 1, STRING_UNITS_2, buf, sizeof(buf));
++
++ pr_info("Mapped 0x%016lx-0x%016lx with %s pages\n", start, end, buf);
+ }
+
+ static int __meminit create_physical_mapping(unsigned long start,
+--
+2.20.1
+
diff --git a/patches.arch/powerpc-mm-radix-Split-linear-mapping-on-hot-unplug.patch b/patches.arch/powerpc-mm-radix-Split-linear-mapping-on-hot-unplug.patch
index cc58c45112..c484f937f2 100644
--- a/patches.arch/powerpc-mm-radix-Split-linear-mapping-on-hot-unplug.patch
+++ b/patches.arch/powerpc-mm-radix-Split-linear-mapping-on-hot-unplug.patch
@@ -1,4 +1,4 @@
-From 59b742aed38ea51a742bf5ce0220dba1db969819 Mon Sep 17 00:00:00 2001
+From 4dd5f8a99e791a8c6500e3592f3ce81ae7edcde1 Mon Sep 17 00:00:00 2001
From: Balbir Singh <bsingharora@gmail.com>
Date: Wed, 7 Feb 2018 17:35:51 +1100
Subject: [PATCH] powerpc/mm/radix: Split linear mapping on hot-unplug
@@ -28,22 +28,22 @@ Signed-off-by: Balbir Singh <bsingharora@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Acked-by: Michal Suchanek <msuchanek@suse.de>
---
- arch/powerpc/mm/pgtable-radix.c | 95 ++++++++++++++++++++++++++++++++---------
+ arch/powerpc/mm/pgtable-radix.c | 95 +++++++++++++++++++++++++--------
1 file changed, 74 insertions(+), 21 deletions(-)
diff --git a/arch/powerpc/mm/pgtable-radix.c b/arch/powerpc/mm/pgtable-radix.c
-index d51d5dbec290..ff30f341e546 100644
+index 96e07d1f673d..328ff9abc333 100644
--- a/arch/powerpc/mm/pgtable-radix.c
+++ b/arch/powerpc/mm/pgtable-radix.c
-@@ -12,6 +12,7 @@
- #include <linux/memblock.h>
+@@ -17,6 +17,7 @@
#include <linux/of_fdt.h>
#include <linux/mm.h>
+ #include <linux/string_helpers.h>
+#include <linux/stop_machine.h>
#include <asm/pgtable.h>
#include <asm/pgalloc.h>
-@@ -676,6 +677,30 @@ static void free_pmd_table(pmd_t *pmd_start, pud_t *pud)
+@@ -685,6 +686,30 @@ static void free_pmd_table(pmd_t *pmd_start, pud_t *pud)
pud_clear(pud);
}
@@ -74,7 +74,7 @@ index d51d5dbec290..ff30f341e546 100644
static void remove_pte_table(pte_t *pte_start, unsigned long addr,
unsigned long end)
{
-@@ -704,6 +729,52 @@ static void remove_pte_table(pte_t *pte_start, unsigned long addr,
+@@ -713,6 +738,52 @@ static void remove_pte_table(pte_t *pte_start, unsigned long addr,
}
}
@@ -127,7 +127,7 @@ index d51d5dbec290..ff30f341e546 100644
static void remove_pmd_table(pmd_t *pmd_start, unsigned long addr,
unsigned long end)
{
-@@ -719,13 +790,7 @@ static void remove_pmd_table(pmd_t *pmd_start, unsigned long addr,
+@@ -728,13 +799,7 @@ static void remove_pmd_table(pmd_t *pmd_start, unsigned long addr,
continue;
if (pmd_huge(*pmd)) {
@@ -142,7 +142,7 @@ index d51d5dbec290..ff30f341e546 100644
continue;
}
-@@ -750,13 +815,7 @@ static void remove_pud_table(pud_t *pud_start, unsigned long addr,
+@@ -759,13 +824,7 @@ static void remove_pud_table(pud_t *pud_start, unsigned long addr,
continue;
if (pud_huge(*pud)) {
@@ -157,7 +157,7 @@ index d51d5dbec290..ff30f341e546 100644
continue;
}
-@@ -782,13 +841,7 @@ static void remove_pagetable(unsigned long start, unsigned long end)
+@@ -791,13 +850,7 @@ static void remove_pagetable(unsigned long start, unsigned long end)
continue;
if (pgd_huge(*pgd)) {
@@ -173,5 +173,5 @@ index d51d5dbec290..ff30f341e546 100644
}
--
-2.13.6
+2.20.1
diff --git a/series.conf b/series.conf
index 5035ee855e..93da1bbbef 100644
--- a/series.conf
+++ b/series.conf
@@ -6240,6 +6240,7 @@
patches.arch/powerpc-Machine-check-interrupt-is-a-non-maskable-in.patch
patches.arch/powerpc-xmon-Fix-display-of-SPRs.patch
patches.arch/powerpc-kernel-Change-retrieval-of-pci_dn.patch
+ patches.arch/powerpc-mm-radix-Prettify-mapped-memory-range-print-.patch
patches.arch/powerpc-xmon-Add-ISA-v3.0-SPRs-to-SPR-dump.patch
patches.arch/powerpc-conditionally-compile-platform-specific-serial-drivers.patch
patches.arch/cxl-Fix-driver-use-count.patch