Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Suchanek <msuchanek@suse.de>2018-10-15 14:59:59 +0200
committerMichal Suchanek <msuchanek@suse.de>2018-10-15 18:33:18 +0200
commit954903e41d9eea51f3426ffc5cd471c418e625ed (patch)
treebeb1cbe267cdfec9cec352946283debeb8fc811b
parent5af1d19cd591dd28b6a8c603db470fdf4aaccf18 (diff)
scsi: ipr: Eliminate duplicate barriers (FATE#326436).
-rw-r--r--patches.arch/scsi-ipr-Eliminate-duplicate-barriers.patch50
-rw-r--r--series.conf1
2 files changed, 51 insertions, 0 deletions
diff --git a/patches.arch/scsi-ipr-Eliminate-duplicate-barriers.patch b/patches.arch/scsi-ipr-Eliminate-duplicate-barriers.patch
new file mode 100644
index 0000000000..e2eb2f1b93
--- /dev/null
+++ b/patches.arch/scsi-ipr-Eliminate-duplicate-barriers.patch
@@ -0,0 +1,50 @@
+From f2233a33dc1fef4aa30dc11e4c676637bf358c3d Mon Sep 17 00:00:00 2001
+From: Arnd Bergmann <arnd@arndb.de>
+Date: Mon, 19 Mar 2018 22:50:05 -0400
+Subject: [PATCH] scsi: ipr: Eliminate duplicate barriers
+
+References: FATE#326436
+Patch-mainline: v4.18-rc3
+Git-commit: f2233a33dc1fef4aa30dc11e4c676637bf358c3d
+
+Driver does both wmb() and writel(). The latter already has a barrier
+on some architectures like arm64. This ends up with CPU observing two
+barriers back to back before executing the register write.
+
+Drivers should generally assume that the barrier implied by writel() is
+sufficient for ordering DMA. Remove the extraneous wmb() before it.
+
+[mkp: Squashed Arnd's and Sinan's patches]
+
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Reported-by: Sinan Kaya <okaya@codeaurora.org>
+Acked-by: Brian King <brking@linux.vnet.ibm.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Acked-by: Michal Suchanek <msuchanek@suse.de>
+---
+ drivers/scsi/ipr.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
+index 0a9b8b387bd2..02d65dce74e5 100644
+--- a/drivers/scsi/ipr.c
++++ b/drivers/scsi/ipr.c
+@@ -760,7 +760,6 @@ static void ipr_mask_and_clear_interrupts(struct ipr_ioa_cfg *ioa_cfg,
+ ioa_cfg->hrrq[i].allow_interrupts = 0;
+ spin_unlock(&ioa_cfg->hrrq[i]._lock);
+ }
+- wmb();
+
+ /* Set interrupt mask to stop all new interrupts */
+ if (ioa_cfg->sis64)
+@@ -8403,7 +8402,6 @@ static int ipr_reset_enable_ioa(struct ipr_cmnd *ipr_cmd)
+ ioa_cfg->hrrq[i].allow_interrupts = 1;
+ spin_unlock(&ioa_cfg->hrrq[i]._lock);
+ }
+- wmb();
+ if (ioa_cfg->sis64) {
+ /* Set the adapter to the correct endian mode. */
+ writel(IPR_ENDIAN_SWAP_KEY, ioa_cfg->regs.endian_swap_reg);
+--
+2.13.7
+
diff --git a/series.conf b/series.conf
index cb6f8f837b..f2af62f962 100644
--- a/series.conf
+++ b/series.conf
@@ -16653,6 +16653,7 @@
patches.drivers/Input-elan_i2c-add-ELAN0618-Lenovo-v330-15IKB-ACPI-I
patches.drivers/Input-elan_i2c_smbus-fix-more-potential-stack-buffer
patches.drivers/Input-xpad-fix-GPD-Win-2-controller-name
+ patches.arch/scsi-ipr-Eliminate-duplicate-barriers.patch
patches.drivers/scsi-qla2xxx-Spinlock-recursion-in-qla_target.patch
patches.drivers/soc-imx-gpcv2-correct-PGC-offset
patches.drivers/ALSA-hda-realtek-Fix-pop-noise-on-Lenovo-P50-co