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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 25395C6FD1D for ; Fri, 7 Apr 2023 05:33:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230264AbjDGFdn (ORCPT ); Fri, 7 Apr 2023 01:33:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230045AbjDGFdj (ORCPT ); Fri, 7 Apr 2023 01:33:39 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89AC47EE1; Thu, 6 Apr 2023 22:33:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=YZA3VDxNwuLMMCf5Mdacs2Ilyk7N3IG7rNmv3k3HKHg=; b=pOpSwHGhZbphyJ6E2RBHf8vYzk EJHIdAjGggY0Y8ga67fthdofF5rVQ19RTywQc5/NHlZBZ2U4Ep82yAI59iDirWl/aLiIK+VFZyvOu wtD8MlFe5y9p43JELnibMq3OTOXcwwcAabthOlvZEVj+EzPhPCatvQ5R8Zj0Z1CPvB4nxOyXP260t 8asF6PuRdlRdMOgJo8jjUNQdmbR7AEDQ0tm5APNT4+qKog13wfHNvIJlRbLCo5J0cW0aBLFY3P4uH ud1gbJL4yUzVvsgN0LFrsg/XqLBNhxi6GtUuk3+PAhcMNmq0eUWAms15PPASKXAXeP7vJWqCvP1a4 /N3WGLzQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1pkej6-009Cga-1f; Fri, 07 Apr 2023 05:33:32 +0000 Date: Thu, 6 Apr 2023 22:33:32 -0700 From: Christoph Hellwig To: Andrea Parri Cc: Christoph Hellwig , Biju Das , Prabhakar , "devicetree@vger.kernel.org" , Albert Ou , Arnd Bergmann , Geert Uytterhoeven , Samuel Holland , Heiko Stuebner , "linux-kernel@vger.kernel.org" , Prabhakar Mahadev Lad , "linux-renesas-soc@vger.kernel.org" , Conor Dooley , Rob Herring , Guo Ren , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , "linux-riscv@lists.infradead.org" , Andrew Jones Subject: Re: [PATCH v7 1/6] riscv: mm: dma-noncoherent: Switch using function pointers for cache management Message-ID: References: <20230330204217.47666-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20230330204217.47666-2-prabhakar.mahadev-lad.rj@bp.renesas.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Fri, Apr 07, 2023 at 02:03:36AM +0200, Andrea Parri wrote: > > But other other point is adding more cache flushing variants should not > > be easy. Everyone should be using the standardize version. If it's not > > implemented in hardware despite having ratified extensions you can fake > > it up in SBI. Yes, that's way more expensive than indirect calls, but > > that's what you get for taping out new hardware that ignores the actual > > architecture specification and just does their own made up shit. > > FWIW, ALTERNATIVE_X() for "three instructions with (what should be a) > crystal-clear semantics" already smells like "we're doing it wrong" to > me, function pointers would be closer to "we're looking for trouble". Thanks for putting my feelings into such concise words.