Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2657231rdb; Wed, 4 Oct 2023 07:47:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEjfS1XIEw3sBRI2ZUQUw2EpAlFM170no1wiCyNV+JvfxsQtJJ2uKKTQuvGMd+udmSltR+B X-Received: by 2002:a05:6a21:9997:b0:154:b4cb:2e8c with SMTP id ve23-20020a056a21999700b00154b4cb2e8cmr3057849pzb.24.1696430857089; Wed, 04 Oct 2023 07:47:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1696430857; cv=pass; d=google.com; s=arc-20160816; b=vAaEmBt2VsZgHL4oxA6IWcq+Nn9U8+eVYq4Dsk6GmY5ORgk3CZDeIHsBEyO++dluQM j6xF5kLCFItgQQ1t/FgkcKkfA6Y7UuycozDiRoOYYhKIvWDYytA5Kdfm2evEx0iini0e 2VBd3Fd46pGDAa4miLnYb24YnsyD+iuovPNMatHoRkGMiIVUXscOdpRSwLUW7SgGpC50 4ZVc4Bk9TzqanJXvRCSOpVuV1Yq7nxiJyyiPEtT57FhDph53TB0X/MGdi8qx0ABxUmZL Ong2Yg+BcYGJi/33L70nOntKBbnC6mraJO80vlOdStCMYRKJb3gvmIn/GKnU4Txu+O7E MuVg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:organization:references:in-reply-to:date :cc:to:from:subject:message-id:dkim-signature; bh=U9trAlWX6nBvb4VRniGzCrIKYuNDIMWaTtr2TJttzSk=; fh=cHilxHoIEMHNJUbI4lkm5wPouVXZGtNbBYRZzXecGsk=; b=HVUQ+X/nJ+NbgTmUFDMzKelyBiPFdtrumiAu77KX6hCsZ+VOoaipgIy5Z093Arbadm o6HO1t6vOecN0UqP4+yKb/vZXU8g3Ai+RxlyS5nS7KM7w6qm8mWDyaXm9Xlbo0Ig9Gdh 08TAQ96dOjW1kfra/l1zsJGZ2z2wjs9FxbjJKEQusohsn//IZGGxMfHZ8JvUdgXRAfZK ceaM2zShQY+dFnMfaGGojma5Q0DTbIU1x1Y1big25GzYr7BAVvN2rnKBNEUzrcRCO61w 7BtdJ9lKZ8J7g+nG5V+pdQGE6nDiPIuVEqTSMXeP1jM+j5N4A4hoL6m2ab47Fl0J9NYI x52g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@icenowy.me header.s=zmail2 header.b=clD1xuxQ; arc=pass (i=1 spf=pass spfdomain=icenowy.me dkim=pass dkdomain=icenowy.me dmarc=pass fromdomain=icenowy.me>); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=icenowy.me Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id g7-20020a056a000b8700b0068e41f07f33si4142883pfj.94.2023.10.04.07.47.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 07:47:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@icenowy.me header.s=zmail2 header.b=clD1xuxQ; arc=pass (i=1 spf=pass spfdomain=icenowy.me dkim=pass dkdomain=icenowy.me dmarc=pass fromdomain=icenowy.me>); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=icenowy.me Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 406378049200; Wed, 4 Oct 2023 07:47:36 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233097AbjJDOre (ORCPT + 99 others); Wed, 4 Oct 2023 10:47:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232838AbjJDOrd (ORCPT ); Wed, 4 Oct 2023 10:47:33 -0400 X-Greylist: delayed 2582 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 04 Oct 2023 07:47:30 PDT Received: from sender4-op-o10.zoho.com (sender4-op-o10.zoho.com [136.143.188.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24C86C0; Wed, 4 Oct 2023 07:47:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696430820; cv=none; d=zohomail.com; s=zohoarc; b=nxDApxEtzlx2xFddY5YqEaRiOelJY8n/5mSNawUGpBG3I4vQC4X6GggHHzTZGSLcLkPGqCZOrc+tkBKbKAd3i06Bbk7F0OUL7UxA76yEowMwZhSJ74h2XX37KOf54puONWX7BIVNHtshOXE/9mI3fxe3FOJu3TJpZ9yeDzplVFw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696430820; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=U9trAlWX6nBvb4VRniGzCrIKYuNDIMWaTtr2TJttzSk=; b=Pb0xQhHAo1a30Wk3f00tHT5zSAo2GAyeRFIbWiMCxFSbygrlW4OnZkyNQoDbzqLwOwSwyQOebsf6/MlERWP1fwTNGjA2pBlD/OqclMdwf49it/1lzynrNllKQdwiSv5oknBgYLs0vMONzdPCafJAOFvRlkXb15dZE03/+ELxbug= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=icenowy.me; spf=pass smtp.mailfrom=uwu@icenowy.me; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1696430820; s=zmail2; d=icenowy.me; i=uwu@icenowy.me; h=Message-ID:Subject:Subject:From:From:To:To:Cc:Cc:Date:Date:In-Reply-To:References:Content-Type:Content-Transfer-Encoding:MIME-Version:Message-Id:Reply-To; bh=U9trAlWX6nBvb4VRniGzCrIKYuNDIMWaTtr2TJttzSk=; b=clD1xuxQ/rJT7sA7O7drvAgcArpOp3gx//OhNLxCkza9KKFmcbCglsnObwhOrAKZ V4iO/MHUcJIfw+nCFggVYLY0hPT/C/R0nG9HUcMtbRgcQwvxBt6DrPVPLO5xVl4tqj9 t/+YXinXCg+k30aSzalQmTOkomM8b/NVjL5ArW78BBufIWPenKo7XjKK+Gd5iYWtH7H urAHnBNC4SpiQ6QzjUG19BJg3sxcSxZeb0TDa3liQHXmPy/A9Pt8j96RbJlaFoApC/t ug0UzUii4LGLU2jmdXK7JwSwRe6suIbo9t68yzPgI/egoHEWZU+P2ZFIgI34IxpOMjs UfnD+EigcQ== Received: from edelgard.fodlan.icenowy.me (120.85.98.65 [120.85.98.65]) by mx.zohomail.com with SMTPS id 1696430817671586.6852143453285; Wed, 4 Oct 2023 07:46:57 -0700 (PDT) Message-ID: Subject: Re: [PATCH 0/6] RISC-V: Add eMMC support for TH1520 boards From: Icenowy Zheng To: Robin Murphy , "Lad, Prabhakar" , Jisheng Zhang Cc: Drew Fustini , Christoph Hellwig , Lad Prabhakar , Robert Nelson , Ulf Hansson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Adrian Hunter , Guo Ren , Fu Wei , Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , Jason Kridner , Xi Ruoyao , Han Gao , linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, =?ISO-8859-1?Q?Bj=F6rn_T=F6pel?= , Alexandre Ghiti , Linux-MM Date: Wed, 04 Oct 2023 22:46:49 +0800 In-Reply-To: References: <20230921-th1520-mmc-v1-0-49f76c274fb3@baylibre.com> Organization: Anthon Open-Source Community Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4 MIME-Version: 1.0 X-ZohoMailClient: External X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 04 Oct 2023 07:47:36 -0700 (PDT) =E5=9C=A8 2023-10-04=E6=98=9F=E6=9C=9F=E4=B8=89=E7=9A=84 15:18 +0100=EF=BC= =8CRobin Murphy=E5=86=99=E9=81=93=EF=BC=9A > On 04/10/2023 3:02 pm, Icenowy Zheng wrote: > [...] > > > > > I believe commit 484861e09f3e ("soc: renesas: Kconfig: Select > > > > > the > > > > > required configs for RZ/Five SoC") can cause regression on > > > > > all > > > > > non-dma-coherent riscv platforms with generic defconfig. This > > > > > is > > > > > a common issue. The logic here is: generic riscv defconfig > > > > > selects > > > > > ARCH_R9A07G043 which selects DMA_GLOBAL_POOL, which assumes > > > > > all > > > > > non-dma-coherent riscv platforms have a dma global pool, this > > > > > assumption > > > > > seems not correct. And I believe DMA_GLOBAL_POOL should not > > > > > be > > > > > selected by ARCH_SOCFAMILIY, instead, only ARCH under some > > > > > specific > > > > > conditions can select it globaly, for example NOMMU ARM and > > > > > so > > > > > on. > > > > >=20 > > > > > Since this is a regression, what's proper fix? any suggestion > > > > > is > > > > > appreciated. > > >=20 > > > I think the answer is to not select DMA_GLOBAL_POOL, since that > > > is > > > only > >=20 > > Well I think for RISC-V, it's not NOMMU only but applicable for > > every > > core that does not support Svpbmt or vendor-specific alternatives, > > because the original RISC-V priv spec does not define memory > > attributes > > in page table entries. > >=20 > > For the Renesas/Andes case I think a pool is set by OpenSBI with > > vendor-specific M-mode facility and then passed in DT, and the S- > > mode > > (which MMU is enabled in) just sees fixed memory attributes, in > > this > > case I think DMA_GLOBAL_POOL is needed. >=20 > Oh wow, is that really a thing? In that case, either you just can't=20 > support this platform in a multi-platform kernel, or someone needs to > do=20 Emmmm thus RZ/Five should `depends on NONPORTABLE`? > some fiddly work in dma-direct to a) introduce the notion of an > optional=20 > global pool, and b) make it somehow cope with DMA_DIRECT_REMAP being=20 > enabled but non-functional. >=20 > Thanks, > Robin.