Received: by 10.213.65.68 with SMTP id h4csp65006imn; Mon, 19 Mar 2018 19:48:11 -0700 (PDT) X-Google-Smtp-Source: AG47ELsQxwo3mRtHuYp1D+BriY9iefgQ/abuGZNcUI4caEFEQwz3Gun0sD/wxSI/TuOSYGqvR2dB X-Received: by 2002:a17:902:2d24:: with SMTP id o33-v6mr1115387plb.143.1521514090973; Mon, 19 Mar 2018 19:48:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521514090; cv=none; d=google.com; s=arc-20160816; b=oVjzs0vyNiJiB8BG3HHj6ZaOpg1Rdbzl1+n17QZ4NBXrYMiMS5/J3EQ8+xZJE8FmTn YPM+1nZ/GdWCvvl/kEM2HmWmaI2q9IphfOPalpPR05i7PKXv9+sxk2vO6r0aFvTVpWy7 muZszGCb2lrI6VjgiLN8IPWQoPJBgpaHxy3UzlUdYqg4tSVwerSzu7X7TIbdeoWk67In XQmyIUYo0eF3jxi8e8eIZKgjVqM/ItWWmlTU6lTrzFxJnmIJ9UynXhqmBwAGpVF6Vyed 4PhLrIkPOWOAttN4LKxzo4TrYfReI+WI+S/RK+H1wWqYq7hrl+Wbg7M94U76Jj1SDYBb Tlzw== 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=L5MMmxGm8I+38yMtNULglpW3hqopRaVNKRXFVWPAvZ+BlCVWxJ6bvmMouNJA09PjIm JxlPsLnMXiic53x8+GLjdq3okYLeWHvCwkkuq2v+zrOsy5GGoal8MEFxmcSg2Qka+vGb OmOMKRR5VjmUDZb+muIT8cB3TDAsScAQ0IPAS8IdxSSLHwxWjEAYRVuA+7BptMf5ilEw ixBxd7W64Dot2R9KC/Rh9mkn97kvcmsOFH7f0/PaDf8BSLtY9jEt4LKc6Qnx6DK5I+SP MHxnPlZVl1M7nTnqR0tPb36XDW/l2eWmV+iVYiTAK/wneC/KAM/p2e+mv2u/ItYN4B2i N2bA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=ZFO+QW+3; dkim=pass header.i=@codeaurora.org header.s=default header.b=ZFO+QW+3; 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 e67si539866pfa.140.2018.03.19.19.47.56; Mon, 19 Mar 2018 19:48:10 -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=ZFO+QW+3; dkim=pass header.i=@codeaurora.org header.s=default header.b=ZFO+QW+3; 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 S1752176AbeCTCqU (ORCPT + 99 others); Mon, 19 Mar 2018 22:46:20 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:42408 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751633AbeCTCmz (ORCPT ); Mon, 19 Mar 2018 22:42:55 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 90B9360C54; Tue, 20 Mar 2018 02:42:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1521513774; bh=oObpkAZ73dpLqz8AM6IpVa3khw+wzqn9pSSwznSxXmY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZFO+QW+30AjZRKHOhoDeoMnU4cf8u9hWo/AN74LlgeQZoflMvIiEtotXkYSTjjNP8 3QwHCTmOYuvHdma+1TZZbCh0Uad2PH8bRm+dl4YExkYjjU+H1SIiPZH3hguuD1xR05 S70Qet4z9ThNPiK+07jLl38ojpU+YuYn4qBdDacQ= 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 384BB607EB; Tue, 20 Mar 2018 02:42:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1521513774; bh=oObpkAZ73dpLqz8AM6IpVa3khw+wzqn9pSSwznSxXmY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZFO+QW+30AjZRKHOhoDeoMnU4cf8u9hWo/AN74LlgeQZoflMvIiEtotXkYSTjjNP8 3QwHCTmOYuvHdma+1TZZbCh0Uad2PH8bRm+dl4YExkYjjU+H1SIiPZH3hguuD1xR05 S70Qet4z9ThNPiK+07jLl38ojpU+YuYn4qBdDacQ= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 384BB607EB 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 v4 09/17] net: qla3xxx: Eliminate duplicate barriers on weakly-ordered archs Date: Mon, 19 Mar 2018 22:42:24 -0400 Message-Id: <1521513753-7325-10-git-send-email-okaya@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1521513753-7325-1-git-send-email-okaya@codeaurora.org> References: <1521513753-7325-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