Received: by 10.213.65.68 with SMTP id h4csp604834imn; Fri, 23 Mar 2018 11:24:25 -0700 (PDT) X-Google-Smtp-Source: AG47ELsTNDiS8vRS27i/aV+KnVyj/nPJNy8Lua4AcbyqkVVny9f8Cm1lkz5fvgIgZonweqs2qxgc X-Received: by 10.98.163.214 with SMTP id q83mr13643819pfl.94.1521829465170; Fri, 23 Mar 2018 11:24:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521829465; cv=none; d=google.com; s=arc-20160816; b=YaEtEpxM1U5AXLNnGlZDhuILInQzKN3bJ4017l+2QDEMh5H/N9PPV3i8h44EwDvMNm KiLo+Mo4Jd/P9EOQVw8U4Thb+V6CllGL7m3OcrGaboWO0y39eQHB/GKVaRra9xbYRkyN 4466a3qVFHUh+2K3nzBikyO+E/0p5zUVT7D/2Jbbrwa3tpKwocZDWU0QCa2ZAcjgKptN aQCyZ728R6dWwuTGj7hPFeQDfN50heAkQk7BPQ0hiJDsA0fCjLhhTq5zYb6lmvcr5XK6 aMoYF9hps2jiE17zkdfwqkmA82vyXFdjl/e1RA4RyeeZSQ5dLMnTfKmbO39X49A0uDtQ znDA== 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=S1vP5/zZDgd8ULTmUyQQsRxKK3bsza3KiWXpaNqf6MDM7JLQvwoY4C5SHZpF5Wm8xK eIFqOS15oJTR8rf+zxH80nk/QmdUkwAfnlDbrXlee0gk22yRwJEMpPTRQ/y4bV3Ep/ws m8VEyg2ndQvrEhtLGxdYyIq4/2Kdo75RF4X1L5c7I6Gd45l0bv2O9wsAK3LT+cOrC1VQ chW2ag/Rbf2e5PrjG2tKwT1LghQtFBbO8ooyWFN4CbfcGJYBmD0/nVOEjGWGBrjjzyvw nkogBUR7g7c1jNAx7hTDMYsumCm6YDcg0jrKdgv4/uxYJhAXF/1hIuUtB7UzjOayEnXv hx0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=BARjSUQT; dkim=pass header.i=@codeaurora.org header.s=default header.b=o+VIe8YM; 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 p18si7120732pfk.396.2018.03.23.11.24.10; Fri, 23 Mar 2018 11:24:25 -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=BARjSUQT; dkim=pass header.i=@codeaurora.org header.s=default header.b=o+VIe8YM; 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 S1752203AbeCWSVp (ORCPT + 99 others); Fri, 23 Mar 2018 14:21:45 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:41078 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752118AbeCWSVi (ORCPT ); Fri, 23 Mar 2018 14:21:38 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 30BEC60312; Fri, 23 Mar 2018 18:21:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1521829297; bh=Vpg+O+0T+N0pvcdbNh+0CMLF1lsrFsxAY/BOyCUYibU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BARjSUQT8YlTotwSKLfjKnb/eV2ZpgOpeuSJMJuzEm9vfGqysnSatIIclJFb0Du8x vm45wyIRo+N4M4ZufnVBzazu8VuDGtbZ0+QPGv828GSp1Wibu/bXhpCBiOm78B1Utu cmwB4KNh2OTMQFtC6syaO/bFmiR2WKAieRRVUVK4= 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 6DC7D607A2; Fri, 23 Mar 2018 18:21:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1521829293; bh=Vpg+O+0T+N0pvcdbNh+0CMLF1lsrFsxAY/BOyCUYibU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o+VIe8YMqt9266Nw+JDV3FTQ2MxzQfuEaKfPPgRyWnCOfAD6s+wK6ZpDEjvsQPsPS +8xkBb2LxattvsgkEfMm8x9V8hDys5BcrrR49Y+9qyKaKVMOhRp8KjnmVAiNVLqgdF 269odF7V7i9KbTVJUqutKVf4B8xaLsQDNOgsBPxM= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 6DC7D607A2 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 v6 6/7] ixgbevf: keep writel() closer to wmb() Date: Fri, 23 Mar 2018 14:21:16 -0400 Message-Id: <1521829277-9398-7-git-send-email-okaya@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1521829277-9398-1-git-send-email-okaya@codeaurora.org> References: <1521829277-9398-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