Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp188109rwl; Thu, 6 Apr 2023 17:14:16 -0700 (PDT) X-Google-Smtp-Source: AKy350aF+Ki2JFkwvsEcdHT10hN69K/bfzregDqdWUfvtg+Nk8L/INGhm60/lmXRkvfBaHiDfMV7 X-Received: by 2002:aa7:c14c:0:b0:4fb:3ab9:fe81 with SMTP id r12-20020aa7c14c000000b004fb3ab9fe81mr1050951edp.30.1680826456567; Thu, 06 Apr 2023 17:14:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680826456; cv=none; d=google.com; s=arc-20160816; b=s//gY9GK/AEEEMW1UwwS9ePzgKgfV2gBrg8sUqJsAKYQHVyBBX8GjFitKyVPqH/Dse ZTeApZOHxqIb2EviKMavbPCGovQfUw8ZzhwkgFb72/WEq7Oxa8iQdXRzlBpwOxzzM/7k LcsYvVfB6JizLzjRHcIxOJhStMJ40nJIZIYcH8pKDsDPjLUOqMVxoX/mlH/n3KtW+yoX pZY1lAVkINJOmTiJr+VOrcSeh9JrmtU1GOQRXTgx42+4ieN/LXo5H6q89mKdp3LnWjrO K2EGev8QU/pJBcpErwP9USYceJVcXO8ZFAzR1kWTcYKlV/nKeY95n2NHLTz0pZV+tFrj Zbaw== 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=f+8kfy3tjKLPe3TifJTVuacG8Zo955zar201sEBpYQI=; b=0BNS2oPG5Og7Lzqv5u9M0f1D3CT3zCEO/wBfDLjjXdAjARTIsm8IagnQ4BjXLPOS2M 6OmwXyluQ37ncKC+BVngAZMyg8M7dc8L0ZQg4ifNvprkhWeaYUlZJigV25NsgSDYgpw6 zwk0qXl+NNA3imLVkfCNfKH+I/qyEPz8yYpYmPYw3XHpiNlGNgV7lf6HA3MpcyrU5HW3 F+hToInoET3dSd9QE4flWTM9lY9Ok9brLki8+PqP55ARi9I1sid9MZHkRCmoeJ7wTW9t bW8mZ/iQCVp/I+KvrJV/ZIFzLjO597cLVpkivJxkFxpUd0csvVvQjhWmHr3pQMmUTo0n nQLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=MNxZauyn; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i17-20020aa7c711000000b005021f0d5764si2271271edq.683.2023.04.06.17.13.50; Thu, 06 Apr 2023 17:14:16 -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=@gmail.com header.s=20210112 header.b=MNxZauyn; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230341AbjDGADs (ORCPT + 99 others); Thu, 6 Apr 2023 20:03:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229512AbjDGADq (ORCPT ); Thu, 6 Apr 2023 20:03:46 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D65F04C17; Thu, 6 Apr 2023 17:03:44 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id l17so5105445ejp.8; Thu, 06 Apr 2023 17:03:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680825823; x=1683417823; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=f+8kfy3tjKLPe3TifJTVuacG8Zo955zar201sEBpYQI=; b=MNxZauynb0gVNoahtsqVvCiD8C2zrTbmZyxhykOshWSl4e4x5UNTGqTuT7/wA3I7k8 isZu/+ogsApfCs7W/ZB5fS6cxwdrbU9TU7BY1fI0qASwr6BjQJLXCeNFv+s+Xh83T/xY ll8AO3x+gov4OAc2i56yvml4nCb4zNkFKJ5u74M0JI4ko9UKgzW6TnWtMQRvEHud/aEw lomkn4kZSlpECT9vUFQuUsSM478UXOnO04ZA+Z6NzoehD+9jPv9f2qOB+4HKsfrWSX3v vE03MFZzWVxQUnH/d6yU0N3M5EsXJIX4L+16l1ynHUGQ6r7rbi5f6lCkt63a4xE6+x4b yzFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680825823; x=1683417823; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=f+8kfy3tjKLPe3TifJTVuacG8Zo955zar201sEBpYQI=; b=yfEe9V6jo9DuPHDu7KgqvlzhXs0ak69W1iDl8sBwoqzNiaqUh8wzuD501tgMn4jAMo LSsFnUccrVsOUxJ5GmDKY8zWYW81krJgz2P0IviQ1ezVm5sCoDMJ9AzYi0ZV7KWs0vJ2 Au1WDkVLNgwSzkfyalJkCTWZLQCkxI1MUfKci2C1p0zsbKDMlb2CTJa/QVmBKyceC/0+ omnqvpTE0Ba3fNCUiH0pviaL2a9dL04xs6YP6l4NsAkqhlXIdqjdYcloCUoUo6ni3OpH J7lgiooACNnm68E6H7mSqMnR9+mmRZSRUU0LoBkn9D3S2BtlD2R4tmxzWwU0cKi4PdZ7 fe0Q== X-Gm-Message-State: AAQBX9eB0qzcI4PlvL43CtOBZ15cnzuH436F8Y7r0j5oXQFyPhHjmFZ1 w/x5PPTm2rL6D0Xa7YA/+6dQIuEYpOVVX3Y6 X-Received: by 2002:a17:906:a18b:b0:933:44ef:851e with SMTP id s11-20020a170906a18b00b0093344ef851emr558038ejy.55.1680825823181; Thu, 06 Apr 2023 17:03:43 -0700 (PDT) Received: from andrea (host-79-35-32-179.retail.telecomitalia.it. [79.35.32.179]) by smtp.gmail.com with ESMTPSA id x5-20020a170906804500b008def483cf79sm1373504ejw.168.2023.04.06.17.03.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 17:03:42 -0700 (PDT) Date: Fri, 7 Apr 2023 02:03:36 +0200 From: Andrea Parri To: Christoph Hellwig Cc: 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-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 > 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, Andrea