Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp706577rwn; Thu, 8 Sep 2022 07:44:42 -0700 (PDT) X-Google-Smtp-Source: AA6agR4Uqzag9ZtynNPOiDTGlBfbp55Ed/sU3dJ4uDpEhyEcJXesGeUmmkG83He2MwT1VURMu80A X-Received: by 2002:a05:6402:440c:b0:43a:1124:e56a with SMTP id y12-20020a056402440c00b0043a1124e56amr7697618eda.134.1662648282103; Thu, 08 Sep 2022 07:44:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662648282; cv=none; d=google.com; s=arc-20160816; b=Q4KO0b+P2MjjuBpI6UEaGdaJ5np8TD+g43M2PymXm7FcRFiuH7LwECV4yR3pZ1Ia4M icx2AQ9lqh+KifyY4GcZdWjuBM+TT8CT23tMgv4Yk3lAvYde00E43zMr2x+XTjFyLLGS OGngnrYrUqu8ESWhGIElIk22DDz8iWgCmMZNstfc0NZ4CmPaxU6hvcbSZ1xSBrSYlTgl e/2Te9jUKU6pG6F8W9fjz01foxZ1m+fZyAUDVZIDzoNB7Lb7yJ3V0zQtE41gbJ0Xcwke 6rnoak28FyUAiTl9bwnYAd46X1WFC8ks+dmhETCg1GGFFWRUo8XB7ivfcJ89YJ6dIcmc 47GA== 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=P6etuL406xLRhT6RqJwslD+tK1bv2bUyoaOC1vIESrQ=; b=wWV8sedLiO+HQhpocBFg3EvcopAL7syzuuZQhZTvbaBNec9d3DTIvnjLP03Q6KZryW 8xR2vHGkCeen7qbUkWgftDYdX2XCPuD+xdTy8y6vv4+U1bleGTWyl2z4DahlbGisMASo jE6J5OLI4AyV6ZWlt5Mv6p6ghgaVcRzn+mF5Yqsu+jsM/KCCJy7+xdTfM8WgTUF/vZ9H TmvVkLxDQHBNa5Q5MlAyhNrC914eVoS95nLNbHu2ms5JkWRKinh1XtfCmXoNDOzNk1i+ mW7wZks1j4uNe32VERvySPFhBPFFbVqL5LP+07+Cx/QdH0F6ibY61Ovtm1hlbEJAayQi hqXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=O7auhBhG; 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 v19-20020a170906381300b0073156b6fe1csi1888670ejc.799.2022.09.08.07.44.16; Thu, 08 Sep 2022 07:44:42 -0700 (PDT) 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=O7auhBhG; 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 S231879AbiIHOlN (ORCPT + 99 others); Thu, 8 Sep 2022 10:41:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231572AbiIHOkp (ORCPT ); Thu, 8 Sep 2022 10:40:45 -0400 Received: from mail-yb1-xb2e.google.com (mail-yb1-xb2e.google.com [IPv6:2607:f8b0:4864:20::b2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B895EB847; Thu, 8 Sep 2022 07:40:16 -0700 (PDT) Received: by mail-yb1-xb2e.google.com with SMTP id a67so15049129ybb.3; Thu, 08 Sep 2022 07:40:16 -0700 (PDT) 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; bh=P6etuL406xLRhT6RqJwslD+tK1bv2bUyoaOC1vIESrQ=; b=O7auhBhG7nxbGY34/Uxjtdn3WKa+7mB6yfQqIFe4x0OwSVxuqbTI0a7XpqHZl+qGjl v/ztxcw4PGowK8XQDZJ85NQsGMFU+nhf+4Rj6XloT7dXP6SKyIuTcDO1CWY+MG8maIts vu4AGwuE9yPyNwiToDAW6uOq2n4ZfgTiaTE1BEW8EQzTAenoM5lN/YtoAbSgid/W9UcZ KMh1dco6H3N68pTCN/vGZuauX05Pg3FspKaE80UDKPtfwR2N8LffSYUjhADQW2NMHlpD KRyAK9Ni45PHdEY6JlRZ0RgKUJs8OcVXqZRLhYeAXAIokd3607h/95knWVh8afYsysxc s2ow== 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; bh=P6etuL406xLRhT6RqJwslD+tK1bv2bUyoaOC1vIESrQ=; b=Nhukm0YAvJsfznbgQShTaD10vZjjg/CuiTqMMjAHJlrX1dDHmbCHWYbOXn/xfo9pAD aekDOMtkRooNK6GEazgYhnXgvG9iz5SVRiR0kk9ni/V6TGs3LtRGrw9BL2XjbCJGYBUh aL+iMzrbV6166LuwMebpv9O0vqqAX4LsOQANVUN+FBXjSIT5VpWf9kFNkfYfIL+Wkpxm GOnGGlLOdLZkOM48L4PSw4F8bZblvH/3ohrlRPVMNhpmXrAqQ54K0BvI2ULq6LRRS536 rRg/aY8rVwcDOyRiu9FbdSOwosUU6xhAWjr+szis702R2QyVptkZ10eArEM05lwhYG7b 95wg== X-Gm-Message-State: ACgBeo3TbKdwvdvSxezfG9sbJQAPLVRYbJ4vGRz//JXcQUwwpoH9R9St TO0Vu7G56IxXyubvYmyxMveNlbCl6LDSHttbfRE= X-Received: by 2002:a25:83d2:0:b0:696:1071:1a01 with SMTP id v18-20020a2583d2000000b0069610711a01mr7807235ybm.335.1662648015777; Thu, 08 Sep 2022 07:40:15 -0700 (PDT) MIME-Version: 1.0 References: <20220906102154.32526-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20220906102154.32526-2-prabhakar.mahadev-lad.rj@bp.renesas.com> <8ecb62b7-53c4-1c43-65b3-567d8c12e131@microchip.com> <5e894d87-8abb-540d-fbd6-8a1d6f9d0e91@microchip.com> <02df5db7-99bc-5476-2530-4237c3904933@microchip.com> In-Reply-To: <02df5db7-99bc-5476-2530-4237c3904933@microchip.com> From: "Lad, Prabhakar" Date: Thu, 8 Sep 2022 15:39:49 +0100 Message-ID: Subject: Re: [RFC PATCH 1/2] riscv: vendors: andes: Add support to configure the PMA regions To: Conor Dooley , Palmer Dabbelt Cc: Biju Das , atishp@atishpatra.org, guoheyi@linux.alibaba.com, guoren@linux.alibaba.com, "Lad, Prabhakar" , Paul Walmsley , Albert Ou , atishp@rivosinc.com, apatel@ventanamicro.com, Geert Uytterhoeven , linux-riscv , Linux-Renesas , LKML 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,T_SCC_BODY_TEXT_LINE 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 Thu, Sep 8, 2022 at 3:04 PM wrote: > > On 08/09/2022 14:01, Biju Das wrote: > > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe > > > > Hi Conor, > > > > Thanks for the feedback. > > > >> Subject: Re: [RFC PATCH 1/2] riscv: vendors: andes: Add support to > >> configure the PMA regions > >> > >> On 08/09/2022 09:39, Biju Das wrote: > >>> EXTERNAL EMAIL: Do not click links or open attachments unless you know > >>> the content is safe > >>> > >>> Hi Conor, Atish, > >>> > >>> What RISC-V devices you have? > >> > >> A bunch ;) > >> > >> A __couple__ PolarFire SoC boards, HiFive Unleashed, D1 Nezha, Canaan > >> k210 MAIX something & the VisionFive. > > > > If standard DMA api works without any issue means, on these platforms > > IO Coherence port is enabled in the hardware. So all peripherals > > involving DMA work as expected. > > > >>> Ours is RISC-V uniprocessor without IO Coherence Port. > >> > >> What does "IO Coherence Port" mean? Zicbo*? > > > > The HW will provide coherency between CPU and peripheral. > > > > If Zibco* is uniprocessor, then highly it may not have IO coherence > > Port enabled in their design. > > Zicbo* are cache management extensions as Geert pointed out. > > > > > Guo, Please confirm. > > > >> > >>> Currently USB, ethernet, SDHI/eMMC doesn't work with standard DMA > >>> api's. > >> > >> Sounds pretty similar to the D1 so. > >> > >>> On RISC-V world, how do we handle DMA api for uniprocessor without IO > >>> Coherence Port? > >> > >> If you do mean Zicbo* you're into errata territory there & I don't know > >> if that'll be acceptable upstream - not for me to make that call... > > > > It is not errata for sure. It is a HW design where we don't have > > IO cache coherency port enabled in the HW. So looks like it is not > > an extension or errata but it is core stuff. > > If you do non-coherent stuff that is not Zicbo*, the precedence set by > the D1 is errata. As I said to Prabhakar earlier, do a > `git grep "ERRATA_THEAD*`. I am not a maintainer so I don't know the > "rules" about doing cache management without the dedicated extensions > are. > Maybe we could have a discussion about this topic at LPC too ;) Cheers, Prabhakar