Received: by 10.213.65.68 with SMTP id h4csp784050imn; Sun, 25 Mar 2018 13:25:32 -0700 (PDT) X-Google-Smtp-Source: AG47ELtqdbe8ljpl+DdFWD/NNDasJrO37Ss33pt5+490ljyHMLbtiz44uNmdv0T+4qO1EJ4cyMoa X-Received: by 10.99.96.130 with SMTP id u124mr26916374pgb.252.1522009532178; Sun, 25 Mar 2018 13:25:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522009532; cv=none; d=google.com; s=arc-20160816; b=H2frH626AMWyk2/c2hF6C84Ig60cZPGZ8zvaDMDhCDv88j7EDFdzvWAJCB3onqeFBm 3H9IMZrJyIQef0r6hOMf3Iiye4LxLiAoGIwgQmKp6tRZK82hxmxi7P9lphNl5ugBd1n0 tYKxo6DUZhgxlecnceCPZAqk3SkLI6YArAjO+fYrfJ0SFIgjkB+tEazCCiXSckJtkdHh K9G5Ui03LNMgO7rK949k6k2zK5iXIAWYdjseolLX/+OyXaB1v0cIIrx6kN8cT3Qw2sp2 JCHbc32juDooWJxMtjhsti8e0iJt8ePh7WAoKUjh47xqJiE+v2BaPETDWZ1xMntgAKgs xv7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=tpmizdzN/argKS4SlTp09A2P5hNKrzte29cWBKTA1xY=; b=KPxlJnraahheKGC2lYA1Ve8X5q6cPC3n2i95btF/kmq85Ys2OCIfzE2hCfVK6C+yaF USgRB7Ybkgt6JesPcWa1+Ih8jBGea3EOSll+DYYmqOVJNCsjORxEVllD3PgWUd7M5bj5 rYoEM+iTBGnd8xTNvZmHTlKbpROg6Nil73PEDzVGvpeTJluredkxjo25joN0nNfkm5Rj +aWyQ17xTJEJSBMOLNDFKLUcQHkSgQwuM1gp1LnNlUjEhkocUPIxenG1Uu3dyO8AvfI8 V7xWDfV5cwo3Rzq9pZQBujBzyRRwzHoAI18e18xtSaaNL+1ori2qkgtdmNyba1b3XAlo DCEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=KrEjij43; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h1-v6si14373684pli.645.2018.03.25.13.25.16; Sun, 25 Mar 2018 13:25:32 -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=@broadcom.com header.s=google header.b=KrEjij43; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751997AbeCYUYP (ORCPT + 99 others); Sun, 25 Mar 2018 16:24:15 -0400 Received: from mail-ot0-f169.google.com ([74.125.82.169]:33226 "EHLO mail-ot0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751899AbeCYUYN (ORCPT ); Sun, 25 Mar 2018 16:24:13 -0400 Received: by mail-ot0-f169.google.com with SMTP id 23-v6so7999564otj.0 for ; Sun, 25 Mar 2018 13:24:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=tpmizdzN/argKS4SlTp09A2P5hNKrzte29cWBKTA1xY=; b=KrEjij43EN5pF3tIglBDFSRJWAb5KWcg3JFZ6awfHmrBhC8r7B//Ym8DywcHqdg7RV BwEzHXlc9qwI0CAFH1xHQuR1QG9gFgCmmgdEXiFm0GWI9hMqoIaMc7GixTtWZI5tS7qS 143Xr09sDeWaI9T+noisnIo4YnJfHWAQtre08= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=tpmizdzN/argKS4SlTp09A2P5hNKrzte29cWBKTA1xY=; b=iaWRkMYbDmkmX2X/TypGJJz1/ZDiSNe3zQK0asI9dQvZfYNHNS01Rl9/GQ9n+Vvk89 VumJQ0boHG567zwn+74OnlD2yzZlzlKxK9G6o9IADYfbo6mwiWrapiwQde1jd9VkyRhh kLXSm9Hf8xJWewma4sxNoT7IL0S+2QmET3UB8mMjKSwkf7dAJM8FQHB0ipDaYm6ax5W6 Oi0VviTm4+tTKccLJk9Mz4udUlFZS5XiZP+27YSIYsqmiSlUp8OFMBbws0t3xJoRSXBs fzxjjwUCxus3CCX3dvYga0EYHIv9+FiGt1YV5wbfr/hq6udiVaApXJ7xj2zwweFZrHF+ 8mGA== X-Gm-Message-State: AElRT7FjRdZwCNsiQMoP7AaKBXcD4Brcod+ejPb9ZuwsyAvJkdMuFNrK N9vii0lihE4zvSzHAPaV3HEuM56SIRXdiyQtfiTyng== X-Received: by 2002:a9d:3b75:: with SMTP id z108-v6mr4208895otb.366.1522009452641; Sun, 25 Mar 2018 13:24:12 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:4c0f:0:0:0:0:0 with HTTP; Sun, 25 Mar 2018 13:24:12 -0700 (PDT) In-Reply-To: <1521988761-30344-7-git-send-email-okaya@codeaurora.org> References: <1521988761-30344-1-git-send-email-okaya@codeaurora.org> <1521988761-30344-7-git-send-email-okaya@codeaurora.org> From: Michael Chan Date: Sun, 25 Mar 2018 13:24:12 -0700 Message-ID: Subject: Re: [PATCH v7 6/7] bnxt_en: Eliminate duplicate barriers on weakly-ordered archs To: Sinan Kaya Cc: Netdev , timur@codeaurora.org, sulrich@codeaurora.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, open list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Mar 25, 2018 at 7:39 AM, Sinan Kaya wrote: > Code includes wmb() followed by writel(). writel() already has a barrier on > some architectures like arm64. > > This ends up CPU observing two barriers back to back before executing the > register write. > > Create a new wrapper function with relaxed write operator. Use the new > wrapper when a write is following a wmb(). > > Since code already has an explicit barrier call, changing writel() to > writel_relaxed(). > > Also add mmiowb() so that write code doesn't move outside of scope. This line in the patch description is not needed anymore. Other than that, Acked-by: Michael Chan Thanks. > > Signed-off-by: Sinan Kaya