Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Suchanek <msuchanek@suse.de>2019-10-03 20:00:39 +0200
committerMichal Suchanek <msuchanek@suse.de>2019-10-03 20:00:57 +0200
commitfb964c9a4f36028427ffc495180793d6f6022536 (patch)
treea795bc7f02873d49a997b59995e3b3b172b2d07e
parent7143fa6f38a72f28a0c2d19dec685ca8c01ceedb (diff)
powerpc/mm: Use memblock API for PPC32 page_is_ram
(bsc#1065729).
-rw-r--r--patches.suse/powerpc-mm-Use-memblock-API-for-PPC32-page_is_ram.patch42
-rw-r--r--series.conf1
2 files changed, 43 insertions, 0 deletions
diff --git a/patches.suse/powerpc-mm-Use-memblock-API-for-PPC32-page_is_ram.patch b/patches.suse/powerpc-mm-Use-memblock-API-for-PPC32-page_is_ram.patch
new file mode 100644
index 0000000000..6def0c2e0c
--- /dev/null
+++ b/patches.suse/powerpc-mm-Use-memblock-API-for-PPC32-page_is_ram.patch
@@ -0,0 +1,42 @@
+From f65e67c7e3308c0af08080782d79a8cb95c44929 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jonathan=20Neusch=C3=A4fer?= <j.neuschaefer@gmx.net>
+Date: Wed, 28 Mar 2018 02:25:41 +0200
+Subject: [PATCH] powerpc/mm: Use memblock API for PPC32 page_is_ram
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+References: bsc#1065729
+Patch-mainline: v4.17-rc1
+Git-commit: f65e67c7e3308c0af08080782d79a8cb95c44929
+
+To support accurate checking for different blocks of memory on PPC32,
+use the same memblock-based approach that's already used on PPC64 also
+on PPC32.
+
+Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Acked-by: Michal Suchanek <msuchanek@suse.de>
+---
+ arch/powerpc/mm/mem.c | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
+index 8f335cf052f8..737f8a4632cc 100644
+--- a/arch/powerpc/mm/mem.c
++++ b/arch/powerpc/mm/mem.c
+@@ -82,11 +82,7 @@ static inline pte_t *virt_to_kpte(unsigned long vaddr)
+
+ int page_is_ram(unsigned long pfn)
+ {
+-#ifndef CONFIG_PPC64 /* XXX for now */
+- return pfn < max_pfn;
+-#else
+ return memblock_is_memory(__pfn_to_phys(pfn));
+-#endif
+ }
+
+ pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
+--
+2.23.0
+
diff --git a/series.conf b/series.conf
index 9ab81eed59..fa2ed9b74c 100644
--- a/series.conf
+++ b/series.conf
@@ -15631,6 +15631,7 @@
patches.suse/powerpc-setup-Add-cpu_to_phys_id-array.patch
patches.suse/powerpc-kvm-Fix-guest-boot-failure-on-Power9-since-D.patch
patches.suse/powerpc-mm-Simplify-page_is_ram-by-using-memblock_is.patch
+ patches.suse/powerpc-mm-Use-memblock-API-for-PPC32-page_is_ram.patch
patches.suse/powerpc-kexec_file-Fix-error-code-when-trying-to-loa.patch
patches.suse/powerpc-eeh-Fix-race-with-driver-un-bind.patch
patches.suse/powerpc-64s-idle-avoid-sync-for-KVM-state-when-wakin.patch