From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 73CF7C55178 for ; Fri, 23 Oct 2020 08:41:41 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5B0A424182 for ; Fri, 23 Oct 2020 08:41:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="ImXHeoN1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5B0A424182 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=openbmc-bounces+openbmc=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4CHd4c28F4zDqvv for ; Fri, 23 Oct 2020 19:41:36 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=198.145.29.99; helo=mail.kernel.org; envelope-from=arnd@kernel.org; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=default header.b=ImXHeoN1; dkim-atps=neutral Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4CHd2d0sf5zDqvr; Fri, 23 Oct 2020 19:39:52 +1100 (AEDT) Received: from mail-qv1-f49.google.com (mail-qv1-f49.google.com [209.85.219.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7588822210; Fri, 23 Oct 2020 08:39:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603442389; bh=VvRSe/OoqsH6RWGRZu9ZjCYTv4OyRkDtBy9Tp5f+wyM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ImXHeoN1ZKHEd/w7JhcCdvImXbJuvOX4ynCQAR4ku/jRK+hDMf2kn5k3NiR7MazIl QXhvZ5LF+658kVs8Kx2ja2RFsEKb5EL/2uhZHlWlvaLt4SUBqAqFkAGFoKSkWMZSR0 lfSF6PyCATPOiwVtUyEI7hguvwsECyXG2QnK0rvE= Received: by mail-qv1-f49.google.com with SMTP id w5so289336qvn.12; Fri, 23 Oct 2020 01:39:49 -0700 (PDT) X-Gm-Message-State: AOAM531hOee19xQSRuWCUYP8lL0VwARTktH/Dx6sM+mBA3lVzwYRhAPu 07V1LYDdXNfGJ6T5erYT3QOuKY2KfDbDb9ZpJuE= X-Google-Smtp-Source: ABdhPJyJjzoKaK5cagyt39oBcijtYdW9B/rA44OHpXj7KabOoID/HljAtUFY9foobN6cU/y9qnZy0qQaSzJxUuB8HBI= X-Received: by 2002:ad4:4203:: with SMTP id k3mr1182611qvp.8.1603442388461; Fri, 23 Oct 2020 01:39:48 -0700 (PDT) MIME-Version: 1.0 References: <20201019073908.32262-1-dylan_hung@aspeedtech.com> <20201019120040.3152ea0b@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <32bfb619bbb3cd6f52f9e5da205673702fed228f.camel@kernel.crashing.org> In-Reply-To: From: Arnd Bergmann Date: Fri, 23 Oct 2020 10:39:32 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] net: ftgmac100: Fix missing TX-poll issue To: Benjamin Herrenschmidt Content-Type: text/plain; charset="UTF-8" X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , linux-aspeed , Po-Yu Chuang , BMC-SW , "netdev@vger.kernel.org" , OpenBMC Maillist , Linux Kernel Mailing List , Dylan Hung , Jakub Kicinski , "David S . Miller" Errors-To: openbmc-bounces+openbmc=archiver.kernel.org@lists.ozlabs.org Sender: "openbmc" On Thu, Oct 22, 2020 at 9:41 AM Benjamin Herrenschmidt wrote: > On Wed, 2020-10-21 at 14:11 +0200, Arnd Bergmann wrote: > > > > At the moment, the only chips that need the heavy barrier are > > > omap4 and mstar_v7, and early l2 cache controllers (not the one > > > on Cortex-A7) have another synchronization callback that IIRC > > > is used for streaming mappings. > > .../... > > > > Obviously, adding one of these for ast2600 would slow down every > > > mb() and writel() a lot, but if it is a chip-wide problem rather than > > > one isolated to the network device, it would be the correct solution, > > > provided that a correct code sequence can be found. > > I'm surprised that problem doesn't already exist on the ast2400 and > 2500 and I thus worry about the performance impact of such a workaround > applied generally to every MMIO writes.... > > But we did kill mmiowb so ... ;-) The real cost would have to be measured of course, and it depends a lot on how it's done. The read-from-uncached-memory as in the 1/4 patch here seems fairly expensive, the mstarv7_mb() method (spinning on an mmio read) seems worse, but the omap4 method (a posted write to a mmio address in the memory controller to enforce a barrier between the two ports) doesn't seem that bad and would correspond to what the chip should be doing in the first place. Arnd