Thread (13 messages) 13 messages, 5 authors, 2018-05-29

[PATCH v4 1/7] scsi: hpsa: Eliminate duplicate barriers on weakly-ordered archs

From: Don Brace <hidden>
Date: 2018-03-20 14:01:53
Also in: linux-arm-msm, linux-scsi

-----Original Message-----
From: Sinan Kaya [mailto:okaya at codeaurora.org]
Sent: Monday, March 19, 2018 9:50 PM
To: linux-scsi at vger.kernel.org; timur at codeaurora.org; sulrich at codeaurora.org
Cc: linux-arm-msm at vger.kernel.org; linux-arm-kernel at lists.infradead.org;
Sinan Kaya [off-list ref]; Don Brace [off-list ref];
James E.J. Bottomley [off-list ref]; Martin K. Petersen
[off-list ref]; esc.storagedev
[off-list ref]; linux-kernel at vger.kernel.org
Subject: [PATCH v4 1/7] scsi: hpsa: Eliminate duplicate barriers on weakly-
ordered archs

EXTERNAL EMAIL


Code includes wmb() followed by writel(). writel() already has a
barrier on some architectures like arm64.

This ends up CPU observing two barriers back to back before executing
the register write.

Since code already has an explicit barrier call, changing writel() to
writel_relaxed().

Signed-off-by: Sinan Kaya <redacted>
Acked-by: Don Brace <redacted>
quoted hunk ↗ jump to hunk
---
 drivers/scsi/hpsa.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/hpsa.h b/drivers/scsi/hpsa.h
index 018f980..c7d7e6a 100644
--- a/drivers/scsi/hpsa.h
+++ b/drivers/scsi/hpsa.h
@@ -599,7 +599,7 @@ static unsigned long
SA5_ioaccel_mode1_completed(struct ctlr_info *h, u8 q)
                 * but with current driver design this is easiest.
                 */
                wmb();
-               writel((q << 24) | rq->current_entry, h->vaddr +
+               writel_relaxed((q << 24) | rq->current_entry, h->vaddr +
                                IOACCEL_MODE1_CONSUMER_INDEX);
                atomic_dec(&h->commands_outstanding);
        }
--
2.7.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help