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 75915C4321E for ; Fri, 25 Nov 2022 18:49:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229910AbiKYStS (ORCPT ); Fri, 25 Nov 2022 13:49:18 -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 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