Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp419485rwl; Thu, 6 Apr 2023 22:35:42 -0700 (PDT) X-Google-Smtp-Source: AKy350YuSdt42ZKm95svDFkReG5KwbzqDQfcw3Zi1ykcxen5/3xEx9vwWaIRS5OUiY8xTbmOCfhv X-Received: by 2002:a17:902:e5cc:b0:1a1:ca37:5257 with SMTP id u12-20020a170902e5cc00b001a1ca375257mr1967930plf.7.1680845741836; Thu, 06 Apr 2023 22:35:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680845741; cv=none; d=google.com; s=arc-20160816; b=Ors5VXo2NzWgHVPkhF3yRE6/20BnVYpnRV4ZdUeE62EuMnvg4gNPbuOb7xT+BSYbx7 MsMND5uesl2O6pysJ4uNtLuikv7fiq+AvM3Rfq9DOYi3pplkxWk2uxMa6InXBIpoVeKK KnciDWDlgk1trKT/Bh6WlVUBnBxQEJfaSw7dXnaGoeXPZE1JEz8+wvd5jtv4LijdGalm a1dk+0gVn47oiGDTOGhZYJidxTe2o71lBXk2l7R5n3eIJsqXaW91q8IkjJnN2zPj/y+m C4ydWhz0RtFxMet9VL/9jsPRu3M/rEd7B0Ug+NpKwJ4+er6/v10lQwyl4836ahsmdW9R jGcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=YZA3VDxNwuLMMCf5Mdacs2Ilyk7N3IG7rNmv3k3HKHg=; b=lKxhhZcH7vR3s0Zn7EMhBa04dDBDJd/7yqHIF013eCP7usO38mB1FG59VXlD1/AYA+ VHntRJsqiX4mBcM8ta436SFL8wcuOk1kl3pDkYoAwzak62hScfD+JswRgPfEiiSyQ4As TEhUToziZvz/M7enMdQSn3g97vmSsuNAU8A0yoZoc2i4gtGlXrv8ug1Vu3SJ5z9cuyhv C5pTHuIcPAHTHtvjyP26mifQnjg5gQR5Sc2rAhw1zGwBFl1EUNtYcjylqODd1suxA3aD F68aA4HV67YcI6XasuVHlajkcg2bFRRbHSHQo/XPR2FKOHDAfaKI2264TIwOfnL6GALF XC2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=pOpSwHGh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kw4-20020a170902f90400b001a5088d9742si1859083plb.516.2023.04.06.22.35.30; Thu, 06 Apr 2023 22:35:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=pOpSwHGh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230440AbjDGFdo (ORCPT + 99 others); Fri, 7 Apr 2023 01:33:44 -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 X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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.