Received: by 10.213.65.68 with SMTP id h4csp796161imn; Thu, 22 Mar 2018 08:44:54 -0700 (PDT) X-Google-Smtp-Source: AG47ELsTdXOS4sq2VMyevVKucxakTiPmTGo57uAwzusvvjjx5uVydVHBibAI4g70RMj3+4bIAIMg X-Received: by 10.99.119.78 with SMTP id s75mr18620886pgc.238.1521733494553; Thu, 22 Mar 2018 08:44:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521733494; cv=none; d=google.com; s=arc-20160816; b=uQM0FWvZW9P15EXWO5WMTph2GeCjtwHeE9HAeHdfGuOVvjzLd7Kn1c1fJKAbZgIXcc s0nLs3s32Gdv9C/T+9Kd4l277treNqJ3mzru+68xh7RN0VH9Ekj/I0fwChREBVVl8poo WeU20tud+vXrP6VCA3GyRQ8pia+1YFXl56z1gd5wJnZC5ObHydZEqQTPhfKXB4DQmPIx z7EdPeO/ewinwAj0XQzNr7rLkzXA6jRnBL/2rx3FeJHwQ6o9Sl003q5rtZTmFgpTuKmu 6FCOMd9DABL9+WGWJl0cJLs9bP9WgZt6d1sMDURZdIDC39+b/zHRyRoJPaOUjSBeWBxj 4W0A== 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 :message-id:date:subject:cc:to:from:dmarc-filter:dkim-signature :dkim-signature:arc-authentication-results; bh=tGWuIKK3avYewibHDj6lp00f3QIe6d1U7rx6HaOW6pg=; b=KWDPkGzScGmrdyoOQrS8/8bTNWQr79FQfcarwI1nEIwCSyQVN0M80iR00Z4oc8tHby eUYMAKKpnqHZcK1HfyO28Dd9gVXcA0MMIh77YoIUxTeLrNPA39SjPQUvIDidPAtwn6fU Wxnvr75bEK9D0m4ZMcCH8SQgOJut+h6hPz9rwup1WgRsn4llbrduLTFdFPRaqKGl0TqD CzlzrEm8ZGJCEe7EqmP5ZxFz7tihCzSeGfG07MskU63IgXgup88uJnCVNeEZkNrW20kD jklpfMlO3aVzLehDrqFjfxQBY7Fh2hGyZbnjkeY7wyx8v9NtPi6PG596mM7i8URoK3sB ud+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=Iwi9nJnT; dkim=pass header.i=@codeaurora.org header.s=default header.b=Iwi9nJnT; 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 q24si4954091pff.301.2018.03.22.08.44.40; Thu, 22 Mar 2018 08:44:54 -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=Iwi9nJnT; dkim=pass header.i=@codeaurora.org header.s=default header.b=Iwi9nJnT; 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 S1751827AbeCVPmr (ORCPT + 99 others); Thu, 22 Mar 2018 11:42:47 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:34588 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751739AbeCVPmm (ORCPT ); Thu, 22 Mar 2018 11:42:42 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id CC35F60F61; 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=1521733361; bh=Vpg+O+0T+N0pvcdbNh+0CMLF1lsrFsxAY/BOyCUYibU=; h=From:To:Cc:Subject:Date:From; b=Iwi9nJnTXseOHHIIgmM6E7GAzkGpO24wACjcpkSD7ePirSwYvDKGwr+ii6f6CpjFO dogXLxKPiQb+WEvDlhjK1zvkkYyH5ebqffQYJJaoGhYJDoFiqr7EzqgFuTwF6Bgw7E BngtiKITO7UaUvcPrsMpZCzsVa8GgqAlKiqR2628= 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 337F9601D3; Thu, 22 Mar 2018 15:42:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1521733361; bh=Vpg+O+0T+N0pvcdbNh+0CMLF1lsrFsxAY/BOyCUYibU=; h=From:To:Cc:Subject:Date:From; b=Iwi9nJnTXseOHHIIgmM6E7GAzkGpO24wACjcpkSD7ePirSwYvDKGwr+ii6f6CpjFO dogXLxKPiQb+WEvDlhjK1zvkkYyH5ebqffQYJJaoGhYJDoFiqr7EzqgFuTwF6Bgw7E BngtiKITO7UaUvcPrsMpZCzsVa8GgqAlKiqR2628= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 337F9601D3 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 1/2] ixgbevf: keep writel() closer to wmb() Date: Thu, 22 Mar 2018 11:42:31 -0400 Message-Id: <1521733352-25266-1-git-send-email-okaya@codeaurora.org> X-Mailer: git-send-email 2.7.4 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 Remove ixgbevf_write_tail() in favor of moving writel() close to wmb(). Signed-off-by: Sinan Kaya --- drivers/net/ethernet/intel/ixgbevf/ixgbevf.h | 5 ----- drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 6 +++--- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h b/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h index f712646..f97091d 100644 --- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h +++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h @@ -312,11 +312,6 @@ static inline u16 ixgbevf_desc_unused(struct ixgbevf_ring *ring) return ((ntc > ntu) ? 0 : ring->count) + ntc - ntu - 1; } -static inline void ixgbevf_write_tail(struct ixgbevf_ring *ring, u32 value) -{ - writel(value, ring->tail); -} - #define IXGBEVF_RX_DESC(R, i) \ (&(((union ixgbe_adv_rx_desc *)((R)->desc))[i])) #define IXGBEVF_TX_DESC(R, i) \ diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c index 3d9033f..815cb1a 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(); - ixgbevf_write_tail(rx_ring, i); + writel(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(); - ixgbevf_write_tail(xdp_ring, xdp_ring->next_to_use); + writel(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 */ - ixgbevf_write_tail(tx_ring, i); + writel(i, tx_ring->tail); return; dma_error: -- 2.7.4