Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp8737109rwb; Tue, 13 Dec 2022 09:48:19 -0800 (PST) X-Google-Smtp-Source: AA0mqf7rJ1ag9uUsN/dtrpCTw2su1JCxVY4XCpC0pgXjqJGeDiQcm9iwnUry/32I+01tBBQOwvDS X-Received: by 2002:a62:1ad2:0:b0:57a:81f1:9096 with SMTP id a201-20020a621ad2000000b0057a81f19096mr2705220pfa.22.1670953699062; Tue, 13 Dec 2022 09:48:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670953699; cv=none; d=google.com; s=arc-20160816; b=aHXr+eo37wyZDrrwFYQzBkYB3gTgAWNJRkgnr/65v9+ZWLky0g03l34i30jMfDpQAh 9kHDbcB3GARZbCNXgNct2zxCeV5mf3YduZq+KVtDEmWyxRufed7V/mM0IvCPf3I1Pfbh V7T/4pfLa+cpw7owHHyJm6gakpZLp/BD+jn2aA6H88b8hKyGnR16N+0LtbjYL1rtJyeQ /5XXQWXmqKFTZw52tOqbwjQif/jHHGHV+jCmI+LDNAp5kRNbKN3bfqXTfHz+yF7wRJ3+ 3TmLjgllsJivEmzgRD+KZVWp8g024nHthvjL7C10MzV0+7TRlsgWKStJHpZrAmqJuzqw zr+A== 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; bh=7aP+igB0NaircxiSkGrnkdOtF08vfazQfrJeriBa6Dg=; b=gfcp43OEYtK4KoSNSbh9EsoHm0v6t8A6GNyjA0BDBMZ3z3jBUjOkVIUt3Uofku3GVs JFcA7D4185FP+QcbD6jY1QyBPuDBwNKPAB/8helfRfe00UFq8VbEyErs4shnhn8czQws RGQj6t5ZupMd459lBADxIPuBBrtOsKeiUB+wXjQN+HKUotqhN00f+As3cWS/dJQUgMMk qZnCzxAKzCptzpXN1Ij3eOUGNuFB192XY6JRRL67TR0bDBlwVFl4ljXUp6mXjIxFQu1S kI+hCf0jk5l9i23rVxRAmFH6twfwcs8YJBgVV9G3GCn6CdWR6z5Nr+OhSBf4au6MdSrq Hdzw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q22-20020a056a00085600b0057a6c320956si3564955pfk.220.2022.12.13.09.48.09; Tue, 13 Dec 2022 09:48:19 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235529AbiLMRPO (ORCPT + 72 others); Tue, 13 Dec 2022 12:15:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236098AbiLMRPJ (ORCPT ); Tue, 13 Dec 2022 12:15:09 -0500 Received: from mail-vk1-f176.google.com (mail-vk1-f176.google.com [209.85.221.176]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8FF76279; Tue, 13 Dec 2022 09:15:08 -0800 (PST) Received: by mail-vk1-f176.google.com with SMTP id l17so1885279vkk.3; Tue, 13 Dec 2022 09:15:08 -0800 (PST) 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=7aP+igB0NaircxiSkGrnkdOtF08vfazQfrJeriBa6Dg=; b=a/yYLXDMvd9VOEXFjQOVmO8O+D1+oUxiKwFaXwinnMGgeBAG/aY/40ZEemwe6Q9Mhg hsLM9iIbhWP/Qxv7W+k0EAWZnNBsxu/b2GEj2OmZkSLoL3aRaDaU8gIKesp9eG8Va89l yP9rJZAc1KiPQK+THcqyDxW3s4xBbHdBXe9/1KK/2+Weo01H/AReGfzdxlBZx73KUF9l f9UrcT/+ap0fX3WYGlxKULn+V6ZnwVoWhStnx2QL7cRJIMWt1ikwY/v+ELzdBe1tZ1p3 VEFgmk0x3IqmmkeuCTU9iIpZHhnIhJIhMrRXwtLfmK1Ddk87blHjiqqRVI1oLhUbEUwn lz8w== X-Gm-Message-State: ANoB5pm8wahtKRadylwEMYxZhATdi8ZWLGtXQq8MHJ0ISpXaRvoPzYNN hpyOWbHTRIY+cjgJZ5aeG/01w3iTfq2zww== X-Received: by 2002:a1f:a10e:0:b0:3be:16a9:6019 with SMTP id k14-20020a1fa10e000000b003be16a96019mr8691301vke.9.1670951707474; Tue, 13 Dec 2022 09:15:07 -0800 (PST) Received: from mail-yw1-f170.google.com (mail-yw1-f170.google.com. [209.85.128.170]) by smtp.gmail.com with ESMTPSA id v19-20020a05620a0f1300b006e16dcf99c8sm8264306qkl.71.2022.12.13.09.15.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 13 Dec 2022 09:15:07 -0800 (PST) Received: by mail-yw1-f170.google.com with SMTP id 00721157ae682-417b63464c6so101451337b3.8; Tue, 13 Dec 2022 09:15:06 -0800 (PST) X-Received: by 2002:a0d:dd4b:0:b0:370:61f5:b19e with SMTP id g72-20020a0ddd4b000000b0037061f5b19emr27207087ywe.316.1670951706562; Tue, 13 Dec 2022 09:15:06 -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: <20221212115505.36770-5-prabhakar.mahadev-lad.rj@bp.renesas.com> From: Geert Uytterhoeven Date: Tue, 13 Dec 2022 18:14:55 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v5 4/6] riscv: mm: dma-noncoherent: Pass direction and operation to ALT_CMO_OP() To: Prabhakar 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=-1.6 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no 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 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?). Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds