Received: by 10.213.65.68 with SMTP id h4csp66754imn; Mon, 19 Mar 2018 19:52:21 -0700 (PDT) X-Google-Smtp-Source: AG47ELusKs1Wb7qwXEDEwaV5UNt6WXfzvUXcrzPDWZNajka+TRH7iz6Xjy8z83f2v9JHGI6Y0mGL X-Received: by 2002:a17:902:6589:: with SMTP id c9-v6mr10355362plk.215.1521514341125; Mon, 19 Mar 2018 19:52:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521514341; cv=none; d=google.com; s=arc-20160816; b=FgriUNKjubD12buMJ8eyUaqIonNIT8fkWf03kQt/OYUoq4CWosHjIsdoX2K7RNFyAO bGTFZUERzkbVTRHWe+y8iSE/cOu9QsPKeT8MCC5COonDMmpdoBzrcy5KAvSdqMgTMeSy 5DqQqGdVm+WPWKUvSzcn1uHQn/VJPFHYFfkd+L/DJE130llxr5CRYHTPk2fSoH9HpMj/ XFksGF2ruRaCk6BEmMFyvbx0vOA52YdFYtbdUgZpkdZeuyn4VKdRTq1D4SqBKFwxvkxo e0x06T/YGN1NgyCoawro1SUs2K/qWv3z0xEJJWVpSIaRLjIH+Ib+pl4XtgBygUPxfIjB sJEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dmarc-filter:dkim-signature:dkim-signature :arc-authentication-results; bh=Y4rxWaocMuQzM1kkF5bbYx55Sbf3F2n7Tu4HuIdZ7yc=; b=MCxIaWhjuL81ZqPCa9snZIYnr/lFwKSNQKFHvBmWDZlGAR0TQxfsRYH4ueu279hoFQ PgCy7NSgQqFKgCPpJwp3GRf/zp63hoe48s8ffCMuSRVjZvUhIBd62pylb6uwMAOYPnp8 3ZVyupTcHCZ0Uh4XAemxBqvJ+hoCW2IAH3ID8gWuCMpbOfqoNEEEM0CILAJEf0RaofJZ ueiAvmcEWNwyaBccqx8M/88w1awpA9Er+vjyc6nqLb0GgcFta8pFVQnr6JzT38RSMlpS OvtX2RB2ckaZwije1FgF24KHcvq0vOaXwGOnLjRZrcUKFzggQIeM4fuKP47alJNcnnTg bPpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=Ixh5relx; dkim=pass header.i=@codeaurora.org header.s=default header.b=CEfLQpLu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z3-v6si632599plb.137.2018.03.19.19.52.07; Mon, 19 Mar 2018 19:52:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=Ixh5relx; dkim=pass header.i=@codeaurora.org header.s=default header.b=CEfLQpLu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752256AbeCTCuh (ORCPT + 99 others); Mon, 19 Mar 2018 22:50:37 -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= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 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 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 */ } -- 2.7.4