Home Home > GIT Browse > SLE12-SP5-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-08-21 15:01:02 +0200
committerTakashi Iwai <tiwai@suse.de>2019-08-21 15:01:02 +0200
commit70873787710ce23cdbd079ffae775ae6060841ee (patch)
tree90405b4358e456375c80b50299c5cd8028c4fe20
parent7715a121d8bb6de137409df4ed2292e87119da80 (diff)
parente7033078aca157d5b27ab4eb88e1b96e22ef187e (diff)
Merge branch 'users/msuchanek/SLE15/for-next' into SLE15
Pull powerpc fixes from Michal Suchanek
-rw-r--r--patches.arch/v2-powerpc-Allow-flush_-inval_-dcache_range-to-work-across-ranges-4GB.patch58
-rw-r--r--patches.suse/libnvdimm-pfn-Store-correct-value-of-npfns-in-namespace.patch47
-rw-r--r--series.conf2
3 files changed, 107 insertions, 0 deletions
diff --git a/patches.arch/v2-powerpc-Allow-flush_-inval_-dcache_range-to-work-across-ranges-4GB.patch b/patches.arch/v2-powerpc-Allow-flush_-inval_-dcache_range-to-work-across-ranges-4GB.patch
new file mode 100644
index 0000000000..3bd2b96a34
--- /dev/null
+++ b/patches.arch/v2-powerpc-Allow-flush_-inval_-dcache_range-to-work-across-ranges-4GB.patch
@@ -0,0 +1,58 @@
+From patchwork Wed Aug 21 00:19:27 2019
+X-Patchwork-Submitter: Alastair D'Silva <alastair@au1.ibm.com>
+X-Patchwork-Id: 1150498
+From: Alastair D'Silva <alastair@d-silva.org>
+Subject: [PATCH v2] powerpc: Allow flush_(inval_)dcache_range to work across
+ ranges >4GB
+Date: Wed, 21 Aug 2019 10:19:27 +1000
+
+References: bsc#1146575 ltc#180764
+Patch-mainline: no, stable-only
+
+The upstream commit:
+22e9c88d486a ("powerpc/64: reuse PPC32 static inline flush_dcache_range()")
+has a similar effect, but since it is a rewrite of the assembler to C, is
+too invasive for stable. This patch is a minimal fix to address the issue in
+assembler.
+
+This patch applies cleanly to v5.2, v4.19 & v4.14.
+
+When calling flush_(inval_)dcache_range with a size >4GB, we were masking
+off the upper 32 bits, so we would incorrectly flush a range smaller
+than intended.
+
+This patch replaces the 32 bit shifts with 64 bit ones, so that
+the full size is accounted for.
+
+Changelog:
+v2
+ - Add related upstream commit
+
+Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
+Acked-by: Michal Suchanek <msuchanek@suse.de>
+---
+ arch/powerpc/kernel/misc_64.S | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S
+index 1ad4089dd110..d4d096f80f4b 100644
+--- a/arch/powerpc/kernel/misc_64.S
++++ b/arch/powerpc/kernel/misc_64.S
+@@ -130,7 +130,7 @@ _GLOBAL_TOC(flush_dcache_range)
+ subf r8,r6,r4 /* compute length */
+ add r8,r8,r5 /* ensure we get enough */
+ lwz r9,DCACHEL1LOGBLOCKSIZE(r10) /* Get log-2 of dcache block size */
+- srw. r8,r8,r9 /* compute line count */
++ srd. r8,r8,r9 /* compute line count */
+ beqlr /* nothing to do? */
+ mtctr r8
+ 0: dcbst 0,r6
+@@ -148,7 +148,7 @@ _GLOBAL(flush_inval_dcache_range)
+ subf r8,r6,r4 /* compute length */
+ add r8,r8,r5 /* ensure we get enough */
+ lwz r9,DCACHEL1LOGBLOCKSIZE(r10)/* Get log-2 of dcache block size */
+- srw. r8,r8,r9 /* compute line count */
++ srd. r8,r8,r9 /* compute line count */
+ beqlr /* nothing to do? */
+ sync
+ isync
diff --git a/patches.suse/libnvdimm-pfn-Store-correct-value-of-npfns-in-namespace.patch b/patches.suse/libnvdimm-pfn-Store-correct-value-of-npfns-in-namespace.patch
new file mode 100644
index 0000000000..9cb05b457c
--- /dev/null
+++ b/patches.suse/libnvdimm-pfn-Store-correct-value-of-npfns-in-namespace.patch
@@ -0,0 +1,47 @@
+From b1092ec9fe1c5f6e8cadb2ee54fc010052e5cd06 Mon Sep 17 00:00:00 2001
+From: root <you@example.com>
+Date: Tue, 20 Aug 2019 03:09:58 -0400
+Subject: [PATCH] libnvdimm/pfn: Store correct value of npfns in namespace
+ superblock
+
+References: bsc#1146381 ltc#180720
+Patch-mainline: no, stable-only
+
+Commit a3619190d62e ("libnvdimm/pfn: stop padding pmem namespaces to
+section alignment") fixed an issue with nd_pfn_init() where the count
+of number of PFNs stored in pfn superblock was calculated assuming
+PAGE_SIZE == SZ_4K.
+
+Without the fix a wrong comparison happens in __nvdimm_setup_pfn()
+between recaulcaulted value of nd_pfn->npfns against one stored in
+superblock via nd_pfn->pfn_sb->npfns. This causes a warning to be
+issued of the form:
+
+ dax_pmem dax1.0: number of pfns truncated from 2093056 to 130816
+
+This warning is harmless but may confuse the user. Hence this patch
+picks the relavent hunk from commit a3619190d62e ("libnvdimm/pfn: stop
+padding pmem namespaces to section alignment") that fixes this issue.
+
+Signed-off-by: Vaibhav Jain <vaibhav@linux.ibm.com>
+Acked-by: Michal Suchanek <msuchanek@suse.de>
+---
+ drivers/nvdimm/pfn_devs.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/nvdimm/pfn_devs.c b/drivers/nvdimm/pfn_devs.c
+index 6a2685e8fbc6..c22462a277b6 100644
+--- a/drivers/nvdimm/pfn_devs.c
++++ b/drivers/nvdimm/pfn_devs.c
+@@ -757,7 +757,7 @@ static int nd_pfn_init(struct nd_pfn *nd_pfn)
+ return -ENXIO;
+ }
+
+- npfns = (size - offset - start_pad - end_trunc) / SZ_4K;
++ npfns = PHYS_PFN(size - offset - start_pad - end_trunc);
+ pfn_sb->mode = cpu_to_le32(nd_pfn->mode);
+ pfn_sb->dataoff = cpu_to_le64(offset);
+ pfn_sb->npfns = cpu_to_le64(npfns);
+--
+2.16.4
+
diff --git a/series.conf b/series.conf
index 182a021d62..7cd7f5342a 100644
--- a/series.conf
+++ b/series.conf
@@ -23636,6 +23636,7 @@
########################################################
# general lib/ optimizations
########################################################
+ patches.suse/libnvdimm-pfn-Store-correct-value-of-npfns-in-namespace.patch
########################################################
# CPUFREQ
@@ -23651,6 +23652,7 @@
########################################################
# powerpc/generic
########################################################
+ patches.arch/v2-powerpc-Allow-flush_-inval_-dcache_range-to-work-across-ranges-4GB.patch
patches.suse/Fix-build-error-in-drmem.c.patch
patches.arch/Documentation-x86-Move-protecton-key-documentation-t.patch
patches.arch/Documentation-vm-PowerPC-specific-updates-to-memory-.patch