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: 10296081 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 601CE602C2 for ; Tue, 20 Mar 2018 02:50:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5260928F5F for ; Tue, 20 Mar 2018 02:50:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4748728FC4; Tue, 20 Mar 2018 02:50:34 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CC8ED28F5F for ; Tue, 20 Mar 2018 02:50:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751857AbeCTCuc (ORCPT ); Mon, 19 Mar 2018 22:50:32 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:35646 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752201AbeCTCu1 (ORCPT ); Mon, 19 Mar 2018 22:50:27 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 102A660C67; Tue, 20 Mar 2018 02:50:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1521514226; bh=0AcZYpVItxPTaA++Qsh/k4vMaVPzSDzDDATo691VfUk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ixh5relxSYokUj7CnrVbdTGIs5p/sbTi9lq3OEfOXO9++pvErrpcFbLn2oO1BHi48 jAlRmbzERTMYxZ5wdk/5wUQZLWplcB86UikkKDOAh35PMPhp+trfHVKCf/EZKq7VRP f9YMhX5KPQWJ2MYMHJRD4ZijzFrY5XXoF35TDvuE= 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 Cc: linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sinan Kaya , QLogic-Storage-Upstream@qlogic.com, "James E.J. Bottomley" , "Martin K. Petersen" , linux-kernel@vger.kernel.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 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.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 */ }