Received: by 10.213.65.68 with SMTP id h4csp863648imn; Thu, 22 Mar 2018 10:11:41 -0700 (PDT) X-Google-Smtp-Source: AG47ELvErJtVE2J1/9vBUkgtXmwhMIyv/F/MN1P19La3rwO/BDLQd9U6yv0kNsBEG0GY6zLQNJBy X-Received: by 10.101.97.15 with SMTP id z15mr16582831pgu.393.1521738701851; Thu, 22 Mar 2018 10:11:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521738701; cv=none; d=google.com; s=arc-20160816; b=lCkNF1DMlVzol/k8lDzf6VIWySQZgdkRU0tbNpAn7b+CME7yEEPo215r8XMmSswd3b 0C5PDGqEROBq2tXzmh20rWOkC5CqWmbq7lAIamguLyDA9JmKmRuSaHMQRVmXdFIIA3ss AAEbn4+bh/97cSHCy5shC16iGlDjigWn5Blbb4cw8TkxHLhHxhG1hJZtsi91tLrjKJT5 hbGhgrJoPFYB7bbFAQFyrgF1enn9AuQGfxRd3pzGXEJP7BruKNgYlQNKWP20uxYvcjDL amUaLlMoEf0NfiyfT0tWl+uMYjDT2zRr3/rJVSTZhBLBcNWEan1gvFHHqDQXcFsSB3hm 2zaA== 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=508eb+5iCR3/oxOVGxbRkJ7Gvz8/6pKVtWmQ35aBEAc=; b=H6334yl6glewAEYyzDnp/clUbhFlUPnkGggIOq1cpSsipQzg/D3mXdGiEXhkt2moF0 bCbfbttNKTh5qbQFMAm3kOU2t7APl5JfAduz+h6nPY1p7fQLcmZtZL97o8OzzBcJwLQZ DdRtuL6tBYxQgBPBsg3ghwB8zK+/QWnJiYOOy4CV9U3JrRWLc1W5Z8OlyuSnMJhK4So5 +A/vXjzwoFh8bsm9S25xl1tVE8YgE9i39QWyT7QSsije/WT/+peC4IXmhvK4sBMMeid5 TesGY359U55AWDi7pVYopiMLqWrrE2pcQ522CP5T8JgD+iZTaFggZTDvn8BP63wob+1M 309Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=a//neG1S; dkim=pass header.i=@codeaurora.org header.s=default header.b=d3eDEecv; 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 n6-v6si5087104pla.26.2018.03.22.10.11.26; Thu, 22 Mar 2018 10:11:41 -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=a//neG1S; dkim=pass header.i=@codeaurora.org header.s=default header.b=d3eDEecv; 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 S1752120AbeCVRKS (ORCPT + 99 others); Thu, 22 Mar 2018 13:10:18 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:39420 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751739AbeCVRKL (ORCPT ); Thu, 22 Mar 2018 13:10:11 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 9E3CA603AF; Thu, 22 Mar 2018 17:10:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1521738610; bh=oObpkAZ73dpLqz8AM6IpVa3khw+wzqn9pSSwznSxXmY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a//neG1S+bK2IxL9mbH6ODysrG3MjnsZKLxUyUooxWIFLTVT9HAwMWBoqsEshW/Sb 8E1G++RyyiDJrQvavjb2TCrIDRD72Z6yH01qpN/Kgvvkn4kRSEiFNolbx7tad+/DUI ccPyEl+uzi854bunOQiBzgtQhp8zJRRXI7j5rkws= 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 14EE3603AF; Thu, 22 Mar 2018 17:10:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1521738609; bh=oObpkAZ73dpLqz8AM6IpVa3khw+wzqn9pSSwznSxXmY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=d3eDEecvWDn1G99B9UOxDpGNnJSM56CqC39iUq78+DJb5nyzadFkTDdEiBQcIrGFU NZAfcg9pwP3SlsZfMCH5uFLjPL6P14HhlIlpIKaRzuFeDcO5dStNu+o4GMDz8ubBIX fDcKUpA2opUrjzHl/S9MOwUEoPVvabrJtyx5AyCk= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 14EE3603AF 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: netdev@vger.kernel.org, timur@codeaurora.org, sulrich@codeaurora.org Cc: linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sinan Kaya , Dept-GELinuxNICDev@cavium.com, linux-kernel@vger.kernel.org Subject: [PATCH v5 1/5] net: qla3xxx: Eliminate duplicate barriers on weakly-ordered archs Date: Thu, 22 Mar 2018 13:09:58 -0400 Message-Id: <1521738603-23596-2-git-send-email-okaya@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1521738603-23596-1-git-send-email-okaya@codeaurora.org> References: <1521738603-23596-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 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 --- drivers/net/ethernet/qlogic/qla3xxx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qla3xxx.c b/drivers/net/ethernet/qlogic/qla3xxx.c index 9e5264d..0e71b74 100644 --- a/drivers/net/ethernet/qlogic/qla3xxx.c +++ b/drivers/net/ethernet/qlogic/qla3xxx.c @@ -1858,8 +1858,8 @@ static void ql_update_small_bufq_prod_index(struct ql3_adapter *qdev) qdev->small_buf_release_cnt -= 8; } wmb(); - writel(qdev->small_buf_q_producer_index, - &port_regs->CommonRegs.rxSmallQProducerIndex); + writel_relaxed(qdev->small_buf_q_producer_index, + &port_regs->CommonRegs.rxSmallQProducerIndex); } } -- 2.7.4