Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2684328rdb; Wed, 4 Oct 2023 08:27:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHY3LlJYoYDhXoHYVdEpuo42efiaRkLCmsuNzZvvu4DAXUc0nQgkxXq8RMDYc7MwkiSMvRP X-Received: by 2002:a92:c24d:0:b0:351:98a:16c6 with SMTP id k13-20020a92c24d000000b00351098a16c6mr3148633ilo.27.1696433278910; Wed, 04 Oct 2023 08:27:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696433278; cv=none; d=google.com; s=arc-20160816; b=HI4vXY/wACK/0ZHZB2VGdcLBwYVldCHEI66bLL9BrHCprmlSWJgc8TBmTU5RMV3XxV hgiBZUHtf8r+pMP2qEw4dS8ZspNOTQu8H7w9pYCONgZHLt4BsMTlmHV4u6V0cnWH/+BL RXFxRDCCWE9ZZ3Pm4tigna4C6uZ1msjb+LiSRXJtgkmSQFPE1G9iDNm7PIfPvCHXU/DV 9xk/urT0dGyLxncY03KFvjNGc1BvzcnOyESoPpH/tFKTFViMndLDcvg2+yVkrmaxoHBd 6tZ1x3OlayCbebH7EdKqFh9PrrPbcwnTagianKgxxxqzf/8M83YB7I9UzimrvZ16xyYB bgAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=v0uvT70CX/vN6zpCu38EQgAZkl5TMMgJIlvojSmP3GE=; fh=ESwuRGMtSfNRsWqOzfCpvo1zmFsnU/zvH7Uxo9SCLno=; b=n/Rcqa5CairJKA9SjNwOlSLZzN2kBrMQkI+GL+LeWgqkqYfNg41jWZoLafyEAS8hVz zHuY6/KN2gz9tgyWFKuoKmdawhpg6BYU41I3jAmXsPg4ayfdf4VVJPgAStwtNh3khR/y fe5bSq9d5KhmUA2fjLzCp6qLJoJ/msZgkEdAk2w5p5+jpiKcCLPMF2wmpB57M0LCMJ9C dPYVckeLdqBF+zlRbIRXq++YA/wYdrTe0UVd/zV1i4/uXdRrNRmAM2IXoqbE/DfJEhz7 36JXNKpeVDrhEy6ncoAzKNY6gMkZK8tSyfU5Yh6obZUrB00A0XNXIHPfitscA8RoefRF WI6Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id s125-20020a637783000000b0054405623a4asi3849343pgc.615.2023.10.04.08.27.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 08:27:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id C29BF818F6AA; Wed, 4 Oct 2023 08:27:57 -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 S233256AbjJDP15 (ORCPT + 99 others); Wed, 4 Oct 2023 11:27:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233117AbjJDP15 (ORCPT ); Wed, 4 Oct 2023 11:27:57 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C3E2293; Wed, 4 Oct 2023 08:27:53 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 146EDC15; Wed, 4 Oct 2023 08:28:32 -0700 (PDT) Received: from [10.1.196.40] (e121345-lin.cambridge.arm.com [10.1.196.40]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 134A63F762; Wed, 4 Oct 2023 08:27:51 -0700 (PDT) Message-ID: Date: Wed, 4 Oct 2023 16:27:46 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH] soc: renesas: make ARCH_R9A07G043 (riscv version) depend on NONPORTABLE Content-Language: en-GB To: Jisheng Zhang , Geert Uytterhoeven , Magnus Damm , Paul Walmsley , Palmer Dabbelt , Albert Ou , Lad Prabhakar Cc: linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, Christoph Hellwig , Drew Fustini References: <20231004150856.2540-1-jszhang@kernel.org> From: Robin Murphy In-Reply-To: <20231004150856.2540-1-jszhang@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE 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 08:27:57 -0700 (PDT) On 04/10/2023 4:08 pm, Jisheng Zhang wrote: > Drew found "CONFIG_DMA_GLOBAL_POOL=y causes ADMA buffer alloc to fail" > the log looks like: > [ 3.741083] mmc0: Unable to allocate ADMA buffers - falling back to standard DMA > > The logic is: generic riscv defconfig selects ARCH_RENESAS then > 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, > because it's designed for special cases such as "nommu cases where > non-cacheable memory lives in a fixed place in the physical address > map" as pointed out by Robin. > > Fix the issue by making ARCH_R9A07G043 (riscv version) depend on > NONPORTABLE, thus generic defconfig won't select ARCH_R9A07G043 by > default. And even for random config case, there will be less debug > effort once we see NONPORTABLE is enabled. FWIW, Reviewed-by: Robin Murphy > Reported-by: Drew Fustini > Closes: https://lore.kernel.org/linux-riscv/ZRuamJuShOnvP1pr@x1/ > Fixes: 484861e09f3e ("soc: renesas: Kconfig: Select the required configs for RZ/Five SoC") > Signed-off-by: Jisheng Zhang > --- > drivers/soc/renesas/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/soc/renesas/Kconfig b/drivers/soc/renesas/Kconfig > index 5a75ab64d1ed..12040ce116a5 100644 > --- a/drivers/soc/renesas/Kconfig > +++ b/drivers/soc/renesas/Kconfig > @@ -333,6 +333,7 @@ if RISCV > > config ARCH_R9A07G043 > bool "RISC-V Platform support for RZ/Five" > + depends on NONPORTABLE > select ARCH_RZG2L > select AX45MP_L2_CACHE if RISCV_DMA_NONCOHERENT > select DMA_GLOBAL_POOL