Received: by 10.213.65.68 with SMTP id h4csp43972imn; Wed, 21 Mar 2018 11:58:36 -0700 (PDT) X-Google-Smtp-Source: AG47ELvMvT9dwYU4/Mv0DSqGKXU/SakN3Pa+d/RlkyeTRCXH4icTiy+8su3UaUYRT+lE4Cq5/zoH X-Received: by 2002:a17:902:5a5:: with SMTP id f34-v6mr21975975plf.288.1521658716305; Wed, 21 Mar 2018 11:58:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521658716; cv=none; d=google.com; s=arc-20160816; b=IS0PcDZacRzBOO+MWjZJFSbgaIJdzV7w9tlb/OzW7htJJaCN4HmmKSkIRKdkC83VqH bEX8EzoEm5Xz70cZox+zcVikO3HxiwH3H9IrDNlscqxAVN727m8KwNcHmihsDqrWhWmH RwtdI7vbpdju6bYecAgDAjxp798pgvHTBUsKnDKSwT/68UKyiEJDqlC7O4EYRBbufh3R FyjcVLO7iWztSPF0xWq8iVS0PivP7F5VUggdiPPNWLAiMnK8ae1iNXDelrl+x7qxZH2w DI4GvEsnp+8uPnJKfXnm5DVzyt2BYKgGxIvHmXxUH8CWhDMMh/wQanQZdAIPh0TLb+s8 x+Gg== 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=e31AE7TfY3vsZuadTV1lY9VlcYdVaQjKOXMp1FQrwno=; b=jIxEeyxIDb9DqUJW7YaOxZa9ZGstOviauLayAT1wHzJtBTOaEiaWsRWpti3VaoDGvc nGCPA56i26elZWQQFkY1RhFbt2jXNQjLvizU5CprPKbrzMBnnYIlU7DaKK08wD0RCk7K o4ahJOletVNgyb64AdyrkYSua240jMRciUHMKAuxZCF/PZfvkp48sl9ngo+VwfQNblJV x/UPyllXjdrDUJRUbHvA+QC1mWHw4ygcmtpdwHfGiK3u1VBvszcCcAQZ3/cBV/Qa8Q0k t39XEfj9p/rx/3DNwsPcnUoADWqn9RBZwDmybCmjUENCC4WpXd8mquMgN4FctR+2T9j0 Lk+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=SEjpizWO; dkim=pass header.i=@codeaurora.org header.s=default header.b=Zx4vQpEu; 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 y14-v6si3777326plr.110.2018.03.21.11.58.21; Wed, 21 Mar 2018 11:58:36 -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=SEjpizWO; dkim=pass header.i=@codeaurora.org header.s=default header.b=Zx4vQpEu; 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 S1753141AbeCUS4l (ORCPT + 99 others); Wed, 21 Mar 2018 14:56:41 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:59172 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753057AbeCUS4b (ORCPT ); Wed, 21 Mar 2018 14:56:31 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id EEDC160F6D; Wed, 21 Mar 2018 18:56:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1521658591; bh=CtgZnF+hKcsS6wiogdlq2V9WwzHipk7ZA8n6embbddU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SEjpizWOCU7qgIZuzFjPHoK8xqQNDjBe2XzZbKiFoULEjjPtIXW6fDl08uV6kVjUQ xPmcYE1k4oIo6uBfx7e3vOYxYOnbRDqEp7d1P5hj6olNVQGf7AKeA1X8ZADe4Yn+2I +wUfVW8ADa82wVxN6leVlRpQ2fbAwPhJAO2czt44= 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 B8A9860FA8; Wed, 21 Mar 2018 18:56:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1521658588; bh=CtgZnF+hKcsS6wiogdlq2V9WwzHipk7ZA8n6embbddU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Zx4vQpEuPgnA3/PjhGQ0VWqwR1nRRXfmB2j8zMkrnpDXvZwfuE5QoG2Mlt7aSKGqS gA2wCB2n7JcGzKkZTcYgKA9vQGCOzWg300wvZfEUX45WAK7KGWikc8U2Tjx5FFF3zE Hn002gnRQsbVco7Xy1ksEXiXTmXPyjYL70PEHdKE= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org B8A9860FA8 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: jeffrey.t.kirsher@intel.com Cc: netdev@vger.kernel.org, timur@codeaurora.org, sulrich@codeaurora.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sinan Kaya , intel-wired-lan@lists.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH REPOST v4 6/7] ixgbevf: eliminate duplicate barriers on weakly-ordered archs Date: Wed, 21 Mar 2018 14:56:10 -0400 Message-Id: <1521658572-26354-7-git-send-email-okaya@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1521658572-26354-1-git-send-email-okaya@codeaurora.org> References: <1521658572-26354-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() in multiple places. 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 Reviewed-by: Alexander Duyck --- drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c index 6bf778a..774b2a6 100644 --- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c +++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c @@ -659,7 +659,7 @@ static void ixgbevf_alloc_rx_buffers(struct ixgbevf_ring *rx_ring, * such as IA-64). */ wmb(); - writel(i, rx_ring->tail); + writel_relaxed(i, rx_ring->tail); } } @@ -3644,7 +3644,7 @@ static void ixgbevf_tx_map(struct ixgbevf_ring *tx_ring, tx_ring->next_to_use = i; /* notify HW of packet */ - writel(i, tx_ring->tail); + writel_relaxed(i, tx_ring->tail); return; dma_error: -- 2.7.4