Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp8793849rwb; Tue, 13 Dec 2022 10:28:08 -0800 (PST) X-Google-Smtp-Source: AA0mqf6W1HKGCG9sBMGTVZND7U+Sq63N/Sp2rKX91/r58ajx8JsMNnFUQk2XiuBaUW1i4JSv7KKw X-Received: by 2002:a05:6a20:a681:b0:ac:1266:bda with SMTP id ba1-20020a056a20a68100b000ac12660bdamr28500993pzb.7.1670956088315; Tue, 13 Dec 2022 10:28:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670956088; cv=none; d=google.com; s=arc-20160816; b=bvy0e2CuNIbGyCEBxizmOS5QGrRehkkAJbYFzTg+Anp0cmLFlzAulIoilk49vh7FRh vPkG8AI4syfypMd0uO1ndbFvQr1dtaLDp7IzVVg2C40x5uDHiNdHncKPB/1T1iD1gIOf 3NTdTE1gSKqeXYgFzK6n7/kfdVNlZQwMVWkL0rN/K9dXChKbUzMdy0+tj2A+fw9kwdsp 0qVosRfTIt2nTpO/C8yzFQ56jZOCplABrRq0E42VwW7jmHsd+n1ELyix8Eswtb0uYb+G dYPv6ztoJSqBJvPVlX15L3IzfgQHQd1umySFhN5cIlQO1FAGBlxxOiBN6CGh5UCFU569 a4vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=f74flBhltkIF6Kyzm1psBFvXaiR1ZpsFYBiux/pnBP0=; b=Jm+SftHgCeum1CzSEs67fsY1Y27OQm1w7B02ur7RxFj3FbeFjO8FPyMYNW/vyfM0gj aESEdBg0K5gE6uyRLC88QEWWxd+EPlCuaP4TttT9OpPunWSbsb6cCa2D+U/q+RH9B3gw hiYDYByQJmLEQCgMjYzQDc8/iSG2511nlGHKly5Kjs9ieb24+F6mvrjuljKMvbx25JKJ bHjj/Bxpv5CLPBfdU0II7en7JtA0+w5rPJ8ZSdVB355kSBDgA8sYHUxD4SAT/wzeaEfX GcOAmY8/fzCK/9tqPJ9FKPtC8eqwhI4orvfFBxHJv70bkYQdFxlTLX4QcZGq5xOMrg6L rTUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=h5saAjMh; 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 v135-20020a63618d000000b0046f55fec417si12878062pgb.650.2022.12.13.10.27.58; Tue, 13 Dec 2022 10:28:08 -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=@gmail.com header.s=20210112 header.b=h5saAjMh; 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 S236286AbiLMR6G (ORCPT + 72 others); Tue, 13 Dec 2022 12:58:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236335AbiLMR6B (ORCPT ); Tue, 13 Dec 2022 12:58:01 -0500 Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78FC41F62F; Tue, 13 Dec 2022 09:57:58 -0800 (PST) Received: by mail-ed1-x52e.google.com with SMTP id c66so18873583edf.5; Tue, 13 Dec 2022 09:57:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=f74flBhltkIF6Kyzm1psBFvXaiR1ZpsFYBiux/pnBP0=; b=h5saAjMhrH0HxaWeXItI+PASmkeSYJ2PQdO9BLbEOFZMfii8fwzQnWRsbK/4SKxc7s rD4KG/Q1ZPION2xh25FfyL8e0ZB2Qd2fzVMGloq3ccKc3fh7BhotnxOssEIU6NXTOmPw Ed0iTBqXWx2VVGJY2IcdbQFnpw0qfxiYeO5x4JEkEvIV37SnFXK3JBVkwiC/r04njS8y DeZAUot9otBwpYzTq8BRqdksVkGzl71NkXIVhCIZ99z1EG+3khhsYIauwGuirflTgh0V TCYybUkkwvY/s4CVK+hSzWpo0fEViGSEK8W+W0wklZBuO2soqu75jQ+l5cX7FKRhBJgT 3ohw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=f74flBhltkIF6Kyzm1psBFvXaiR1ZpsFYBiux/pnBP0=; b=i2BDavDhjQNQdURhqVmzR6+aovWcnNeWUaclauTtIYXpwnB535isAA4CYxs48KQBVF QFW1Gp8FXbxWxY5yxkKLMpoWvr/B0xP1CDNcz9oadwjHCfFeSKe73c7pAdTPx70w4lp6 zlQpC8/EmuJ16/Ey3BSNSkQfoYO0Eo9DUW3nAK9KIfBUePmEP2sWT3pY0sFsBWydVvUs MBEbNmRkPE99SI2t4I6X5xcROs4TN55EkVaFLObkygGOurJ3xpj1ZSDTY7inkhHvwMz8 TMEtO8nzlah2ziFfXqMnGCC6Ce+SdK6Th2MshOOoMKoHa1XgBix9MEHIbIhn7oxX4upl 6qog== X-Gm-Message-State: ANoB5plTu5Umg5e+l22/EDfEliMkZng608xJ+8WGgbBTQzmWTnjtZ+YG 0mWMLmoHwBGcsOoR8qsd11c71bub01ii/zukuLc= X-Received: by 2002:a05:6402:1f87:b0:468:7df:c38c with SMTP id c7-20020a0564021f8700b0046807dfc38cmr20457565edc.150.1670954276964; Tue, 13 Dec 2022 09:57:56 -0800 (PST) MIME-Version: 1.0 References: <20221212115505.36770-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20221212115505.36770-5-prabhakar.mahadev-lad.rj@bp.renesas.com> In-Reply-To: From: "Lad, Prabhakar" Date: Tue, 13 Dec 2022 17:57:30 +0000 Message-ID: Subject: Re: [PATCH v5 4/6] riscv: mm: dma-noncoherent: Pass direction and operation to ALT_CMO_OP() To: Geert Uytterhoeven Cc: Paul Walmsley , Palmer Dabbelt , Albert Ou , Magnus Damm , Heiko Stuebner , Conor Dooley , Samuel Holland , Guo Ren , Rob Herring , Krzysztof Kozlowski , Jisheng Zhang , Atish Patra , Anup Patel , Andrew Jones , Nathan Chancellor , Philipp Tomsich , devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Biju Das , Lad Prabhakar Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 Hi Geert, On Tue, Dec 13, 2022 at 5:15 PM Geert Uytterhoeven wrote: > > Hi Prabhakar, > > On Mon, Dec 12, 2022 at 12:55 PM Prabhakar wrote: > > From: Lad Prabhakar > > > > Pass direction and operation to ALT_CMO_OP() macro. > > > > Vendors might want to perform different operations based on the direction > > and callbacks (arch_sync_dma_for_device/arch_sync_dma_for_cpu/ > > arch_dma_prep_coherent) so to handle such cases pass the direction and > > operation to ALT_CMO_OP() macro. This is in preparation for adding errata > > for the Andes CPU core. > > > > Signed-off-by: Lad Prabhakar > > Thanks for your patch! > > > --- a/arch/riscv/include/asm/errata_list.h > > +++ b/arch/riscv/include/asm/errata_list.h > > @@ -124,7 +124,7 @@ asm volatile(ALTERNATIVE( \ > > #define THEAD_flush_A0 ".long 0x0275000b" > > #define THEAD_SYNC_S ".long 0x0190000b" > > > > -#define ALT_CMO_OP(_op, _start, _size, _cachesize) \ > > +#define ALT_CMO_OP(_op, _start, _size, _cachesize, _dir, _ops) \ > > Since commit a49ab905a1fc8630 ("RISC-V: Implement arch specific PMEM > APIs") in riscv/for-next, there are two new users of this macro, > which need to be updated to (add two zeroes?). > Thanks for pointing that out, I'll rebase on for-next. I think -1 would be a better option than zeros. Cheers, Prabhakar