From patchwork Mon Apr 2 19:06:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sinan Kaya X-Patchwork-Id: 10320235 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8BA3E60532 for ; Mon, 2 Apr 2018 19:08:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7B1702239C for ; Mon, 2 Apr 2018 19:08:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6F59F286B1; Mon, 2 Apr 2018 19:08:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CF9192239C for ; Mon, 2 Apr 2018 19:08:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756850AbeDBTHk (ORCPT ); Mon, 2 Apr 2018 15:07:40 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:42458 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756800AbeDBTGs (ORCPT ); Mon, 2 Apr 2018 15:06:48 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id A6DEF60C5F; Mon, 2 Apr 2018 19:06:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1522696008; bh=IHU8mKvBFJa0OWfPU1yx26ts/T+hPvggeaY1EEvxYno=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jqIL0I/NtrmHR6X/QYfbCfBU8b+7PSotQkgB6xFRtDlIzJbF3Ia7rTJITDwKZdBhP 2DLMq2S3+UW4nBo6Sfpv40XbwXKUxM3Zna2bsklY2nOsBm69rJymvYXyYwThkQKnZL EAY4C4x1Evz/FkCuZp4DRB8BfG2cBdq3SjFIAsE0= 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 76609602B7; Mon, 2 Apr 2018 19:06:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1522696005; bh=IHU8mKvBFJa0OWfPU1yx26ts/T+hPvggeaY1EEvxYno=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A2Lb6ybA6ltYQgoa/sNKM8+iLHNQXtKULY6Z8fSsA104yu0YDRStfXUYEm2lVtKLv E//0bRX7qEjnpb2zzbOLLSMk27WJxwjtZrnWTfQLSTBxAZV8w5TISuln9bdw6jyUEJ 2XlHbDzMRQWGeon9lcxhgmRAVglLx1AXFv2fVN0w= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 76609602B7 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 v8 6/7] ixgbevf: keep writel() closer to wmb() Date: Mon, 2 Apr 2018 15:06:29 -0400 Message-Id: <1522695990-31082-7-git-send-email-okaya@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522695990-31082-1-git-send-email-okaya@codeaurora.org> References: <1522695990-31082-1-git-send-email-okaya@codeaurora.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Remove ixgbevf_write_tail() in favor of moving writel() close to wmb(). Signed-off-by: Sinan Kaya Reviewed-by: Alexander Duyck --- 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 447ce1d..c75ea1f 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 e3d04f2..757dac6 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: