Received: by 10.213.65.68 with SMTP id h4csp2731491imn; Mon, 2 Apr 2018 12:58:26 -0700 (PDT) X-Google-Smtp-Source: AIpwx48eqO6WFGZEiPxO5SViTCXMjy2WRd2TiN1V1NOzPGH/sdEim6p4NDokP+bUWfOOVFy1TfNQ X-Received: by 10.98.192.66 with SMTP id x63mr8281210pff.135.1522699106151; Mon, 02 Apr 2018 12:58:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522699106; cv=none; d=google.com; s=arc-20160816; b=SzmHkob1rr2VGCyay0ZA6LpCRA3sXAyVq/WMkogeTIy0dAzwaQ9m7vp2ObmVb03UTd 6MOL6dkJh5WaxcAVkUu2VomapqvIMyp0f/Cp6VpsjFkNxKzxWW18RcnwLqd0Z4YoD8Vk GJxXsC0G5k3ZFP8Pi1O1m4S7E8/W+tuypvlC8eJUXpG1OkeDEWqmHTixDqUxiyPTs9TZ jUQefql1adIUEzBcVxRFl81aW7JjmgdVmf61UichaY1FgiHUR5RC4ivz+sUmW+VftFxr a5OeqzoQ5anZ+D7+XCiOD8/dmJLta15GkhkEauQ6fJ/sEjpGKR1uwq9/yDdvIGc2Xe7f Qdww== 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=ipFOygpXm2g+Y5DfJvIelCghVYGLF0WLlsVKnlT4l7o=; b=e3tdBQx/kv9WZzdFRDXxo5IWMQekH/e4gGgoQoO243qwEzkpALY+lzkohY078tnvrU ZehMPMg270fMlImf3a7woc6yQbsvp4kcDDbOogzbpX+928Ae6ytnZqeQhic18B6nRT69 bG7qcLmtWUSU8tKX9xhwbt1WYkrre3/nWjtp4E0GDjGaKm9o7ExWhWixvY+L6CIT/z6Y nQHi+UH3cnV7zSAKirUt9YNFO/lhZmYQfcpkY+R/C6D+n71QKzzWWZhmrk8MwjuavZ6y pHrGb2uaodFwTr57Wd/dVDPiBwCafRFwbkV/P1AdKcoxMQhH2T6CndhK6uPfe0xQay1v Zn8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=jqIL0I/N; dkim=pass header.i=@codeaurora.org header.s=default header.b=A2Lb6ybA; 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 q3-v6si935449pll.15.2018.04.02.12.58.12; Mon, 02 Apr 2018 12:58:26 -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=jqIL0I/N; dkim=pass header.i=@codeaurora.org header.s=default header.b=A2Lb6ybA; 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 S1756866AbeDBTHm (ORCPT + 99 others); Mon, 2 Apr 2018 15:07:42 -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= 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 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 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 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: -- 2.7.4