Received: by 10.213.65.68 with SMTP id h4csp796227imn; Thu, 22 Mar 2018 08:45:01 -0700 (PDT) X-Google-Smtp-Source: AG47ELv2qgkdm4ebPtq8OuLzqbIxujYX+z6b4OezJ1Ue/o6vtW3fps3BlNnarHWSLiq7HyNa/tEr X-Received: by 10.167.129.152 with SMTP id g24mr2185454pfi.117.1521733501607; Thu, 22 Mar 2018 08:45:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521733501; cv=none; d=google.com; s=arc-20160816; b=N61sm6kGPPVrX3ELkAsSKV4rdw3RH5AWsTwnrh5kjYneZ8pyAAFQVKkx0ki4EXK67q nkLuAl3pd5EDHBF3kxloqX17AlS5DXIta15ED/8djybXN2XVd4Un9eTalblco+pYrhrZ cxozGIbLJF5xNtY/Rv5tgq20eRjw177Z5QLbzpQNuplb8W0MmTShHYOjfCeN+ED+bRoi d1KCzaGg9YZCy+audjnaQUJ+TDnR9qE6Zzv8iUx9MqRatwPI+YZGUy1j1c+pcuJD1oWZ fdluaoIb9A30TKFah1TagzeYPMsFqsHF1FKsBNwtqZLvCw0nD8q1hCKCEPCuhLMoh871 U1gQ== 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=oO7Qx7h7VSsicQliV/aAQ3VBYZNXWrWNxxXlmmNK7yo=; b=rco9sV8IYVAijX7CbrvRSCQPtOXPas6jqigKTbNvUkZUshmgujvMORFK/v+SvprF1H wZp51KdsXVba6Cg/wlkFfO3x37QTjzd6Z5+eNoiC/U/tmigi2eukc7KV/BCsTuFzoPSN Fuc5ct2H+X7VmhQDYcWrEhV39tt93QGzoz9R6ti45ni8Uv/+EKHpQ4yq5I2RMqr2cx1d zaO3d6D5WnVw1nk0rvfJS8q5RZljn2hRikmjBnvNAIlnK/pylrkx4MnBjTxEilqmtcyW Qrlki9JennhfDYCZwqbBrIVR+3tVYqFfGhGQpSH7icyPLz0gjXiqPkjhzmEsuIjuIuVz jZKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=oVHXRThY; dkim=pass header.i=@codeaurora.org header.s=default header.b=EU/htE5z; 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 h7si4507680pgc.663.2018.03.22.08.44.47; Thu, 22 Mar 2018 08:45:01 -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=oVHXRThY; dkim=pass header.i=@codeaurora.org header.s=default header.b=EU/htE5z; 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 S1751863AbeCVPnB (ORCPT + 99 others); Thu, 22 Mar 2018 11:43:01 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:34662 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751778AbeCVPmn (ORCPT ); Thu, 22 Mar 2018 11:42:43 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 598CF607A2; Thu, 22 Mar 2018 15:42:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1521733363; bh=u8AAbfPQjO1UTGTZ8UZiPxQv2vcJtoswyj6r+jScNw8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oVHXRThYQN9dnuIIBDfSPTd+R63+/z8AbifQij4ztmuWu7OLi9M+ML8IvZUayxifY rZiTPUb3UhhVU0toj5ubwJHNjczeJSFeZVuW+K6ZoizS5QMnIUv1lS3nVDAHUCQJ0L NqSJave8yTpcsBc3372olof1jlchx+OXTvOD/X70= 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 D8BBC60F6B; Thu, 22 Mar 2018 15:42:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1521733362; bh=u8AAbfPQjO1UTGTZ8UZiPxQv2vcJtoswyj6r+jScNw8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EU/htE5zpyuyFSE8ZoZm30HsO2ZAWouHTZVmbnOG5065eX3UTRWZoeD3eEYEAfVEj 2slonKX2UdQacVuG7naSeuDsm2M8RNRTH82MOOgZvVAP3TDdZxhMPf7mdOLLLbjlyA ZUgwPXFLlM/LzcJGeR8yKMUNfk/WAMKJx2UGWQ5w= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org D8BBC60F6B 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 v5 2/2] ixgbevf: eliminate duplicate barriers on weakly-ordered archs Date: Thu, 22 Mar 2018 11:42:32 -0400 Message-Id: <1521733352-25266-2-git-send-email-okaya@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1521733352-25266-1-git-send-email-okaya@codeaurora.org> References: <1521733352-25266-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 --- drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c index 815cb1a..eaa930e 100644 --- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c +++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c @@ -725,7 +725,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); } } @@ -1232,7 +1232,7 @@ static int ixgbevf_clean_rx_irq(struct ixgbevf_q_vector *q_vector, * know there are new descriptors to fetch. */ wmb(); - writel(xdp_ring->next_to_use, xdp_ring->tail); + writel_relaxed(xdp_ring->next_to_use, xdp_ring->tail); } u64_stats_update_begin(&rx_ring->syncp); @@ -4004,7 +4004,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