Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp3120126rwl; Fri, 6 Jan 2023 16:13:48 -0800 (PST) X-Google-Smtp-Source: AMrXdXsU1iYUcCWkMH7AZBlaGD448rwdd60EhkQBTokSoNH/Y7J47MpjUPYeKJs5+nnc0+nSUElj X-Received: by 2002:a05:6402:298b:b0:479:971e:58f6 with SMTP id eq11-20020a056402298b00b00479971e58f6mr49878338edb.19.1673050427785; Fri, 06 Jan 2023 16:13:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673050427; cv=none; d=google.com; s=arc-20160816; b=UMoJ7f2XrXKKv1fJzvuG9XVNFn2zHASjglxEhcOPbI0HpE+HPgy5cWf84ipG4Cdy/j LJyMGChf7aHJYXWoYbkFCQ2qyCvqZwYTcKfAPktezu5Yx2qYir2Ti7J23RdUH333/Fqs iqwxbJShqYFtB9XmL7DoIMQ4zhQzPXA6GhOPcx0xL2AwuklGsoUfcfBnpYlmI6hjwX6o +EJK7HF/iPGBGfQ9aMfuCXj6zxO5DAzuJEjAhlh/aAbSgU+TXoYLxopFlZN0FkehvDxx cWNygBb0TUTT+wUmT23ASfA+4sfEAAyBaH08Yh1W6vnSDLSYkoxzqlcbYUEhughCQwRb bFNQ== 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=uQkObbmxPakWaEOFN7Z1q/O4Tq+lv7G8x43FgLVwF20=; b=BZRH/ZgDohBHLIaliXZZ+HCAQrqZze29lkI3de5oiUXJ3Pa1LzE+nXKuDn7kGnkf4P 66wMPDDBu8drmIaezRZfG9nyJMzheGoZDm9LAUBJ5CoHA/yOo7UljKmD4CYeNfV6gePr LqV9RKxubgwyJpn+2xIcgLHOuMED+w/sTniLyEaDhhewgZtABYzxc6Qxf+GiVYCAoeoc k7rFgBbyLKSE6RExtpB1Ox8Axw2yvpxNBT6L/Bx0KxS+GVftvlVMixwNEKK+EVdQlzYX Ry29u8Az7Ke9MkQjwK4xCmqh3TRam90Aa6gmA0+iC0IVzG9HCFHxDP6f2ZBkqDyr8ekR w8Fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="ULdwoj/g"; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l16-20020a056402255000b00461f0d84ee1si3486585edb.228.2023.01.06.16.13.34; Fri, 06 Jan 2023 16:13:47 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b="ULdwoj/g"; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229985AbjAFX3g (ORCPT + 55 others); Fri, 6 Jan 2023 18:29:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235888AbjAFX3b (ORCPT ); Fri, 6 Jan 2023 18:29:31 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99B568CD0A; Fri, 6 Jan 2023 15:29:28 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3BF6B61F9E; Fri, 6 Jan 2023 23:29:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7BDE8C433F1; Fri, 6 Jan 2023 23:29:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673047767; bh=lwfSS0TgVuKSvxQOB/bNeAFUOiWtAHKnU5ZnPUUTNEE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ULdwoj/gG2DPRAGGJsQ3OqOTh9Enpy6KWAhHuyXwQ9Fdu2fEwDf74kkhjpuMqXqgu /PkdkXEW2V6/f+KQivQFkow/YQEfq7O7bzv+pPzQHvg5dmjmn1/V9Yh8zrobOlRCpF thu9X2dG5ul/lcEvLObRvWedWq7GI64cgp47X8dmeoAHJFNQb98Zi84N/vy/WRe9RW MK9887gUerXGBByoJX4Oo1X0A3+a/KG7GQhc2WF0iMAVW0TNYCWIh7RJTCYU3BLgvg 3YsV5ejs5uWIu6nNw80w3D9FwG+gKOghpvK9vLBiZeIKht6yUxFv1MGUitLSpLUorz s/t41KtAuuv2A== Date: Fri, 6 Jan 2023 23:29:21 +0000 From: Conor Dooley To: Arnd Bergmann Cc: Prabhakar , "Conor.Dooley" , Geert Uytterhoeven , Heiko =?iso-8859-1?Q?St=FCbner?= , guoren , Andrew Jones , Paul Walmsley , Palmer Dabbelt , Albert Ou , "open list:RISC-V ARCHITECTURE" , open list , devicetree@vger.kernel.org, Linux-Renesas , "Lad, Prabhakar" , Philipp Tomsich , Nathan Chancellor , Atish Patra , Anup Patel , Tsukasa OI , Jisheng Zhang , Mayuresh Chitale Subject: Re: [RFC PATCH v6 1/6] riscv: mm: dma-noncoherent: Switch using function pointers for cache management Message-ID: References: <20230106185526.260163-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20230106185526.260163-2-prabhakar.mahadev-lad.rj@bp.renesas.com> <6f7d06ef-d74d-4dfc-9b77-6ae83e0d7816@app.fastmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="OpZnInV74VOFB1Cb" Content-Disposition: inline In-Reply-To: <6f7d06ef-d74d-4dfc-9b77-6ae83e0d7816@app.fastmail.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 --OpZnInV74VOFB1Cb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 06, 2023 at 11:31:33PM +0100, Arnd Bergmann wrote: > On Fri, Jan 6, 2023, at 19:55, Prabhakar wrote: > > From: Lad Prabhakar > > +struct riscv_cache_ops zicbom_cmo_ops =3D { > > + .clean_range =3D &zicbom_cmo_clean_range, > > + .inv_range =3D &zicbom_cmo_inval_range, > > + .flush_range =3D &zicbom_cmo_flush_range, > > +}; > > +#else > > +struct riscv_cache_ops zicbom_cmo_ops =3D { > > + .clean_range =3D NULL, > > + .inv_range =3D NULL, > > + .flush_range =3D NULL, > > + .riscv_dma_noncoherent_cmo_ops =3D NULL, > > +}; > > +#endif > > +EXPORT_SYMBOL(zicbom_cmo_ops); >=20 > Same here: If the ZICBOM ISA is disabled, nothing should > reference zicbom_cmo_ops. > Also, since ZICBOM is a standard > extension, I think it makes sense to always have it enabled, > at least whenever noncoherent DMA is supported, that way > it can be the default that gets used in the absence of any > nonstandard cache controller. While I think of it, this is not possible as Zicbom requires toolchain support whereas the alternative methods for non-coherent DMA do not. Thanks, Conor. --OpZnInV74VOFB1Cb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCY7iu0AAKCRB4tDGHoIJi 0lKnAPwP9GjTSF/p2NWFDVeTSbVY5BU7VIVCG30YMppNdquBvQEAtC4SemaEoAHM I5qlKNDdbS2X3qEHRE9DcLDTqdRtMA0= =ztwi -----END PGP SIGNATURE----- --OpZnInV74VOFB1Cb--