From patchwork Tue Mar 20 02:50:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sinan Kaya X-Patchwork-Id: 10296149 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 496E0602BD for ; Tue, 20 Mar 2018 03:01:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3882B29095 for ; Tue, 20 Mar 2018 03:01:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2B457290B6; Tue, 20 Mar 2018 03:01:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9777E29095 for ; Tue, 20 Mar 2018 03:01:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=C5FxC5z41gaKz+j8EvIYKCkfuWc7wSKh2Pf84PlkG1U=; b=Io2HcK2ZLAOFT5 fB+LpEy+HxnTa6BKUGDdVbtrJ57Ktxy0IgDVYjjd+cSkR8O69kiZGv4ILf/sxhB4xXbHEKLksl7p+ wHCT0xbRROSMP+eeyCvvstdD+ggd8vcoRdjHFwMvxULOFDUFMtLxdYOWBkyNZB/jDRGxfPKn2hRnA dCDtoHgtMrN+F5LS4eezbY8AEuIHw0ALjcebE6KyWlHWwIXLAwJLU8ydlOk1HuxLB263iSYRQ1726 WtIzo75UehCQyvUbe2ZqXj/EA25T0y4O1Qx+5QwE3QA03j1xy401OrI2j74Jgo1YD6FcKHY5TIKjq 0WuYoxJCNdgUT+VcXBBg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1ey7WX-00058C-T1; Tue, 20 Mar 2018 03:01:17 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1ey7VH-0003OI-0V for linux-arm-kernel@bombadil.infradead.org; Tue, 20 Mar 2018 02:59:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Y4rxWaocMuQzM1kkF5bbYx55Sbf3F2n7Tu4HuIdZ7yc=; b=hIdBiD2U7MDAt8KaOpiGwItODB u5kkXRxl4jPBLoYfRdAR2iNh0jH9oW28rRz6Zhkm/5qEToDgcFax8mPsoUYoLoJCu2zBpFhCSVARm vlueCLpca11zFbUM97nxYkhUhltryKiRPSPh3FTAfFnx5ABD4jbxREeRrqu8cKPHJXjTU+kETzQue xWz326sOKoVIWV67dVMuKrJc3v5d802dudW7iQ8e+M9+YdueDHLb/DXuIFmG7wM2+Ldet/Rr9G5qs yZipWSovIH6uGz+JEpZ8rcps8oLn8ch8npRd9PIWszrddhBi7dGIjjaG9jfSSiT6LSJ2d/RiyvtQr jYe/acsg==; Received: from smtp.codeaurora.org ([198.145.29.96]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1ey7M5-0000oJ-5H for linux-arm-kernel@lists.infradead.org; Tue, 20 Mar 2018 02:50:32 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 945B3607E5; Tue, 20 Mar 2018 02:50:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1521514225; bh=0AcZYpVItxPTaA++Qsh/k4vMaVPzSDzDDATo691VfUk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gOCxWCszjMZeaWhNxVgKxrqCihmywFw+5Xul1Kj+t8mArMx4sRTRLJL2Moq0yvnsU dPzly8QIPU0lsGZgrsKPi+BLTTNP+YJoyCTQWzmJYXdxsraqwnsaMD4YmNQox6pFLk kWRAJAhfDxNkxP9TaK2kEsJFpI0ef0ZwiUWZl0cA= Received: from drakthul.qualcomm.com (global_nat1_iad_fw.qualcomm.com [129.46.232.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: okaya@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 4727061112; Tue, 20 Mar 2018 02:50:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1521514223; bh=0AcZYpVItxPTaA++Qsh/k4vMaVPzSDzDDATo691VfUk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CEfLQpLuTSHlgD95QNCBrwDhlXCJdxw27GcE5YflFpWvd7R/4oBblzYsZPhH0vOki X1/NrlqDLuQ1QNQX7QYHRejc1W2l7PJ04H+Q4pj6OItM5w5E69W80e6J6IYN17wjMu i4zac0ZLNGj4yz8FQ4sgakF2b+lgEzQ3Ho3eHdLs= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 4727061112 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=okaya@codeaurora.org From: Sinan Kaya To: linux-scsi@vger.kernel.org, timur@codeaurora.org, sulrich@codeaurora.org Subject: [PATCH v4 6/7] scsi: bnx2i: Eliminate duplicate barriers on weakly-ordered archs Date: Mon, 19 Mar 2018 22:50:06 -0400 Message-Id: <1521514207-10695-7-git-send-email-okaya@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1521514207-10695-1-git-send-email-okaya@codeaurora.org> References: <1521514207-10695-1-git-send-email-okaya@codeaurora.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180320_025029_395169_E5F2065F X-CRM114-Status: GOOD ( 12.31 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "James E.J. Bottomley" , "Martin K. Petersen" , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Sinan Kaya , QLogic-Storage-Upstream@qlogic.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Code includes barrier() 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 --- drivers/scsi/bnx2i/bnx2i_hwi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/bnx2i/bnx2i_hwi.c b/drivers/scsi/bnx2i/bnx2i_hwi.c index 8f03a86..075735b 100644 --- a/drivers/scsi/bnx2i/bnx2i_hwi.c +++ b/drivers/scsi/bnx2i/bnx2i_hwi.c @@ -278,7 +278,7 @@ static void bnx2i_ring_sq_dbell(struct bnx2i_conn *bnx2i_conn, int count) sq_db->prod_idx = ep->qp.sq_prod_idx; bnx2i_ring_577xx_doorbell(bnx2i_conn); } else - writew(count, ep->qp.ctx_base + CNIC_SEND_DOORBELL); + writew_relaxed(count, ep->qp.ctx_base + CNIC_SEND_DOORBELL); mmiowb(); /* flush posted PCI writes */ }