Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp11111887rwb; Fri, 25 Nov 2022 11:11:21 -0800 (PST) X-Google-Smtp-Source: AA0mqf4ZIxRkzHpyoSHFDehLd60OcfesDZcG6ZI7IaPf3xPYQp44CCSSy+n+FYinVKSslDCHrOLC X-Received: by 2002:a17:902:e492:b0:17f:72c3:8922 with SMTP id i18-20020a170902e49200b0017f72c38922mr20750192ple.167.1669403481167; Fri, 25 Nov 2022 11:11:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669403481; cv=none; d=google.com; s=arc-20160816; b=WF1egFmD6BUHJDrnJEURg9LrGx9xOgGylD7WktDuBZMBYASI27MYFhcum6RiY01yQI SWpxPXp31nPupYCIR4bWsCZgQYumvIOCYZ/djvF0KlA1ZhbGplHHDXZNY1huxYLJTjmr 7zY3+vVHJfAwpwa4o74dptgN/wGhlWa/WkQW9B0nAsc7/EvGocJElnytyxYS+5w+Txcg hQtKj5UyHyrmiVdlU+5wa0XPATw0JZ9LAru13iJ7/yaouPbjFeolm0z1V7zKyfXsxLPR vf8QELaglrjPUQMlGwICB+OmwB5G+3tAbi6PkDLwGk/N6P51JDJdft/CsHDqN/2RlxD5 +xJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id:feedback-id:dkim-signature:dkim-signature; bh=lGBLZWw4I2IVEe7ioPYHs0ee4vEFUgD9+nW1n+RmPgk=; b=0GzCAlSbWz2mt2slDprxg46onu5IwmktJ9oL8P/KA/lQEKgYdrjTMIaMgxfQyFPrhW nTPUcc59i5iraBK/xBWoBlJISNJzUZQgEZRqKhD5LYvvnPOTlZH3zwldP6t9JHN6nAFF JPyFFdHWpULE4zDPKyOer5yG0Ho4VCR7rp9BCGCZUHzg/ZoXSu9miNL7aCOUHesDaaoP 5t+CiLAc4ZV3716TS+1TENW9MtETAHZmtdLrku4bF/6OlACGMfE9BuMqrT+SpB49I5x9 g7B3JhVORupjsYLnliIRBu71BTCOkqTeHu2k2+V1LA5UaUeyXcjbXo3ZB0QJ6pgwkNgB aBUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sholland.org header.s=fm2 header.b=Gw+QGLTL; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=siP+d+1C; 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=sholland.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f5-20020a170902ce8500b00186a4783b53si5087258plg.478.2022.11.25.11.11.10; Fri, 25 Nov 2022 11:11:21 -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=@sholland.org header.s=fm2 header.b=Gw+QGLTL; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=siP+d+1C; 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=sholland.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229900AbiKYStR (ORCPT + 85 others); Fri, 25 Nov 2022 13:49:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229570AbiKYStQ (ORCPT ); Fri, 25 Nov 2022 13:49:16 -0500 Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A9411EC5B; Fri, 25 Nov 2022 10:49:13 -0800 (PST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 7EDDF5C00AC; Fri, 25 Nov 2022 13:49:10 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Fri, 25 Nov 2022 13:49:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1669402150; x= 1669488550; bh=lGBLZWw4I2IVEe7ioPYHs0ee4vEFUgD9+nW1n+RmPgk=; b=G w+QGLTLVvemFW/nXuipobMMHYB//cFx3yZejaTLWzL2a36xdVO85aPXyky4FMg// sDuV2BVseU7w6m7dK0CYtkMjtu5OlsRMoM+Eyc0P9j97a/3nuZAXHvsCpooefpXp BiPCbuCX5oJh+yQMejb77bbsFAGFr0O39G0ihKCK6jP4gLLjxC0D2ahU/Ixz5Zae EyGUzILyFOavr7Xx9eL2XUk+jrK21AM1dwGaea9paWoFcFlUhCE7Bgp/ZirmzR8o Hu8mT7z+WxLDya9ShoQdUrFjX49EZ5jGTaITu6oQ0oAB+7BMAc/DPn2mm307IOuj iiorbpmTWdDRBXQgOcWfQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1669402150; x= 1669488550; bh=lGBLZWw4I2IVEe7ioPYHs0ee4vEFUgD9+nW1n+RmPgk=; b=s iP+d+1Cr9xX7hOx+9Nc+jE4O6lyv8hSRtb0gW2577XvBoyRR3eqjhq/oHZ7gkdL+ 2+MpPZaV6x3LIQKZC0dumsU+N+6XzzJDQ+Ik90TlLWQf7XXKb+LrR0vuV6djCqz6 cCnR8UI/3OgJYpL+N4bE/lOc+FsWHYUgrbtG5vwooKrJzqzHAdGCiZJua644ebWn I4RwD0pTUmypO0J+T+n6+V+iiIy2n89NThL8VkEbdxIWAQB6WOSAqMnJpy81mUgp 94qbnaJEYhv2b21GAB6XZ3IqJHDzmr8RxrUMIapCbAV+yW4iyNS+A+Ue9Z0jyxHH mY2z9wPABwamp7g+z7yoQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrieehgdduudekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfvfevfhfhufgjtgfgsehtkeertddtfeejnecuhfhrohhmpefurghm uhgvlhcujfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenuc ggtffrrghtthgvrhhnpeegieekueefvddvueetiedviefftdfgtdefjefgteeffeegfffg vdffheejvdeuieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhg X-ME-Proxy: Feedback-ID: i0ad843c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 25 Nov 2022 13:49:07 -0500 (EST) Message-ID: <3b5e52c5-7a1c-8bdd-b076-0c5e13463274@sholland.org> Date: Fri, 25 Nov 2022 12:49:06 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux ppc64le; rv:102.0) Gecko/20100101 Thunderbird/102.3.3 Content-Language: en-US To: "Lad, Prabhakar" , =?UTF-8?Q?Heiko_St=c3=bcbner?= Cc: Paul Walmsley , Palmer Dabbelt , Albert Ou , Geert Uytterhoeven , Magnus Damm , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Guo Ren , Jisheng Zhang , Atish Patra , Anup Patel , Andrew Jones , Nathan Chancellor , Philipp Tomsich , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-renesas-soc@vger.kernel.org, Biju Das , Lad Prabhakar References: <20221124172207.153718-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20221124172207.153718-6-prabhakar.mahadev-lad.rj@bp.renesas.com> <3689906.Lt9SDvczpP@diego> From: Samuel Holland Subject: Re: [PATCH v4 5/7] riscv: mm: dma-noncoherent: Pass direction and operation to ALT_CMO_OP() In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,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 On 11/24/22 13:18, Lad, Prabhakar wrote: > Hi Heiko, > > Thank you for the review. > > On Thu, Nov 24, 2022 at 6:29 PM Heiko Stübner wrote: >> >> Am Donnerstag, 24. November 2022, 18:22:05 CET schrieb Prabhakar: >>> From: Lad Prabhakar >>> >>> Pass direction and operation to ALT_CMO_OP() macro. >>> >>> This is in preparation for adding errata for the Andes CPU core. >> >> can you provide more explanation why that is necessary please? >> I guess you want to use different cache operations for some cases? >> > Yes basically to call different cache operations based on the dir and > operations (and also this allows to export just one function to handle > the errata). I'll update the commit message in the next version. This makes things less efficient, because it requires more instructions and registers inside the alternative section, and your function duplicates the logic from arch_sync_dma_for_device(). The alternative is already passed the operation (clean/flush/invalidate) as a token, so you can construct the function name with token pasting. Regards, Samuel