Received: by 10.213.65.68 with SMTP id h4csp624159imn; Fri, 23 Mar 2018 11:55:20 -0700 (PDT) X-Google-Smtp-Source: AG47ELuYm3FALD4ZV1l0DODdpiAMdW4Ra6mJBl5N2wPVbV6QJZOQSWKakIfm/cqLD8B2dFWZGtpf X-Received: by 10.101.87.136 with SMTP id b8mr21503889pgr.282.1521831320012; Fri, 23 Mar 2018 11:55:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521831319; cv=none; d=google.com; s=arc-20160816; b=qQQtzsZdY/nL4u6ONI8ifE3Ro7ISRHQtnZUINbib1TzWpmUtTcItvTrtW6+uUcMMUJ lOTlbOeshGgSj7IM/AwANfYPRR0yNnUv7l7pPVeu6LRSJ72RrrDugXFPQ3S7/Hf4QUo8 Os2D7zIXM7OUQ0zpUl6DRTMNqVvkiDCr76eUSmk64CbwHvphOo3LPnp8AnYcVl+hVVtx X0HjG+HzmiUKY4gLz8+6x0e10wo34JpDaXeVLLu7zeOB4c1aYuBz6/Brmuryrp+hNesM g4pSxbA4LS36hUyHR4IKDXfyqvN/UGwVU1gbSbG1YZz01RvMyUiv9A11xO3e/komHpmo 4PvA== 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=tGWuIKK3avYewibHDj6lp00f3QIe6d1U7rx6HaOW6pg=; b=oKQZ1FerBWq+8bjCYGfSSfNiw319WfWyNm5IUddS/fBsA5tIgBtDH56yMCL5+R1YV4 ITbQF+fehIn/r6zf/Jl9Dli+ossV1F1ZLgkYuzuFQc1sWSrMPHgXCHo2IGFfGvPpiA08 WxgKTwkekddyM/nIgewq5y12kjxO/dW5jTb2Udq5qs1AkP7UP4t5zpwqxYcxjIUaIIXR 8MXjyf3N4PLm+2BLygJK9EH7WUH9j1MvKvIdNGkQaTUVsgYOhmOwd55EOqnNbV/+D4wz UJ1SKH+bsr5k7AQCupVpkpVjYUVF5kQbhy5DDNkwZp6rYuqVo7CF+3yj5ctCcgrz3wyJ X0vQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=kSSEUws8; dkim=pass header.i=@codeaurora.org header.s=default header.b=PGtd0Ziq; 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 o191si4091108pfo.56.2018.03.23.11.55.05; Fri, 23 Mar 2018 11:55:19 -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=kSSEUws8; dkim=pass header.i=@codeaurora.org header.s=default header.b=PGtd0Ziq; 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 S1752537AbeCWSxt (ORCPT + 99 others); Fri, 23 Mar 2018 14:53:49 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:46658 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752048AbeCWSxQ (ORCPT ); Fri, 23 Mar 2018 14:53:16 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 80A44602FC; Fri, 23 Mar 2018 18:53:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1521831195; bh=Vpg+O+0T+N0pvcdbNh+0CMLF1lsrFsxAY/BOyCUYibU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kSSEUws8dDN6s4medxS3MMhpikRpWqRKTKT7v4MSAehxZhTPicwYjlx3Ho/NyfPOn F7gFUq4fTXui1rem0n7MmP4DKEdPp0mtXnDFT0Pqi5jD35sC9vynWXW5ydODbTM77/ joPqGet+RaqJnt2fIPfKu08uXSD3kT++noGXHOF4= 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 A3F18602FC; Fri, 23 Mar 2018 18:53:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1521831193; bh=Vpg+O+0T+N0pvcdbNh+0CMLF1lsrFsxAY/BOyCUYibU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PGtd0Ziq1lJvBZg5yReauOXy103hAqtn7jekEQb+04SwfV3Mjb5xV6R/U7EnrgQHX IINNVit+iWgyVys64aeZucOY/z6+VqvTjnzfkvYtUvx5EqHGijxxld5TlX2kFfw+Cm xwHGPAp2ip+V53B9ozQfV78qbt2yU0JBQuv2WZeA= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org A3F18602FC 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 v7 6/7] ixgbevf: keep writel() closer to wmb() Date: Fri, 23 Mar 2018 14:52:59 -0400 Message-Id: <1521831180-25014-7-git-send-email-okaya@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1521831180-25014-1-git-send-email-okaya@codeaurora.org> References: <1521831180-25014-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 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