Received: by 10.213.65.68 with SMTP id h4csp64440imn; Mon, 19 Mar 2018 19:46:44 -0700 (PDT) X-Google-Smtp-Source: AG47ELvMqO7yCe1n1O1tJ8ZimLLjQF5ex7FSRFVvV9HBdtJ1v34UX0LSqVaNK5TV8IUC0kP8GF9X X-Received: by 10.98.89.23 with SMTP id n23mr3241171pfb.211.1521514003950; Mon, 19 Mar 2018 19:46:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521514003; cv=none; d=google.com; s=arc-20160816; b=rzXQbhdd8HpiJ7mFPxOBlzd1F7d47CmCG1cNEtBXw7Fs7polT1IW9d1VXTTiCwtA5j RzOF9Kgv5YajUlvoFsy4jo3HfJXJdqHdZ+7DOcbJICciqvVYx4rbptvw/ASKEWvKK2hH wCDWeowe905an2LKVi4LJ4yUpP2GHOUDiUBhcPFVuoPbRdKAA4IKTvdYfRXEeOVY46dF hjO/lJ+9mQQL6EIKhBLZ4Ej3rlCDd9jiymOVxuEW/oH7fNIJAagRaMkR7p2CoCFUc1Tf 3dBq/FVqQ9LMvfVrn55KMYRXe9uy87rmlNChYCYoafTnmhDy97qeosZjlLh+mfj9PUyM 9CwQ== 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=C7H6iKsfTJHZfgi63stDNERW6pmRRbTvG00lJIrmrWGtmjJZyPbe8CtRLPTMNDKC89 5AmluEdKG89vm98V2H2VWE5Qo4TqGKbDjiYke5h8eYCKSTKDs97A2r6z3IHnW/lX6CrW 5RlXxcjTk8HVtAlI/X3uDrdQi2pNwcfrjEJCWtlB59A/HayQM9+PdRXvJIgojIiKlVhh 6zS4C3T4KAamA4rjSC61ArQcVoRRYDpU2HyKn1v9jDIDx7DROFS5Oo8icMakQ50a9BJ6 W/gWn9xiFrnhG7SQhZRDbhEP8z1zIcHqjhgiHajFTxTMnBqJaWkfn5Pthdulvt0cm/JI 8QQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=gL8sZvqf; dkim=pass header.i=@codeaurora.org header.s=default header.b=H8OP+Hxb; 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 91-v6si592093pla.473.2018.03.19.19.46.29; Mon, 19 Mar 2018 19:46:43 -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=gL8sZvqf; dkim=pass header.i=@codeaurora.org header.s=default header.b=H8OP+Hxb; 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 S1751930AbeCTCnL (ORCPT + 99 others); Mon, 19 Mar 2018 22:43:11 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:42208 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751748AbeCTCmt (ORCPT ); Mon, 19 Mar 2018 22:42:49 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 86FC060F93; Tue, 20 Mar 2018 02:42:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1521513768; bh=CtgZnF+hKcsS6wiogdlq2V9WwzHipk7ZA8n6embbddU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gL8sZvqfA0onO6uY6pxAdgEs/Mq54S6Mz38sKZsZmUIVplndOQB/F0Q0nO6iftGs8 cDLvPMghsDbS0gGAOi7lflxBsNVS9oFbto4C6nNNqO9EEDw2Lh1mhqpGjdcpJop1Tw gS4mC8O3VrE2X5TsD6I9AoIMj4xrPqy0+v5KCOwQ= 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 CD36A60F6B; Tue, 20 Mar 2018 02:42:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1521513766; bh=CtgZnF+hKcsS6wiogdlq2V9WwzHipk7ZA8n6embbddU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H8OP+HxbeaqY3JoPHk4iaCmEjb6tCJMcg7E+KjkkeYeCnvf5iqghfY8nMBNnUu5yF ruhu88ATDaGRcnkovSIVUmZ9iurSPzH7yzS9ZTzqwCnOSrUXI2MCs5gzWm+aLixr9b xtEsvriMvJUZX94mCG4/fVaxhbFFr2L+OIDmNLV4= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org CD36A60F6B 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 , Jeff Kirsher , intel-wired-lan@lists.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 06/17] ixgbevf: eliminate duplicate barriers on weakly-ordered archs Date: Mon, 19 Mar 2018 22:42:21 -0400 Message-Id: <1521513753-7325-7-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() 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