Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2680600rdb; Wed, 4 Oct 2023 08:21:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHD1k8k8YrqSNxG+zA0C9VK5/+SZ6w25yOx/11uiGRV9M/5K/AjJRNNyrK6YafSIdgjH2H2 X-Received: by 2002:a05:6a00:1410:b0:693:3c11:4293 with SMTP id l16-20020a056a00141000b006933c114293mr2574937pfu.14.1696432907174; Wed, 04 Oct 2023 08:21:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696432907; cv=none; d=google.com; s=arc-20160816; b=zAhi3wMpNHsxFHQaSwwfiVPc1pC+SeNPblnJXYgSSk7CC7PxKsWVG8ruqkPJpUSSPs 79KJtzOpMPK/1mlDBzzHoWhHpYw/rwYy4b7lj8dw0EHxh6fMxaKdb0xu8RCuJpnL6reK vltn3UkQ60/r1qYUDRX7guO7Puew1/SlFhudcS2ko+FNeVWCMcu4QOkhEqYPO355oUhD AmoRoASyjOakr8pMzdrl7bYdgvl/cSJdjTNnvgDAF65eMz5mIW4wf4ici8N83sk8f/MX /6Iz5bTwExnYoyHIk1IdCHLhdLh8itMEHQwrGswPqAkfgA3IY4Fw6g4a3ID6am9Sfq4m yhSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=RkLXf5km4NNAHzx/SKboF7qBqNcXeR5Tp8NbdugqZA8=; fh=M11BRpyM9r9nUa6OPmbPXuP9fwpMciuT6a+xhlIFsHk=; b=TQFMGb2uur5V2C4xDgkbWT0j0J4fcG1YQEpWWYq8bb/919ZnfoDVFl+7vpqDsZBzJH XPbUPZd6heYMb7NQyicyFi1mQJiQlOeU7T69F+TCGsnVij1TkDf4SXistaWAGrd160iZ SDcRyzQ4TqZpW/tSCW5EAFYz+nFFPEpCY/wEZPDNb+uGEk3VogPFOW9crGXPND3FkZ03 wrSDD+1sRxw04cwPK3EWMETuxXdLoa2u1fra0u73Z0FL/pHs6BLmH2DrgMg/4WcqSGY8 MmFJwHieCIGxwsGshJYgMYphZWe0XhA4s+jxjqbVc4bRCmvRgTmMuAm38glG4vDFufUK yUAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Chh7oeJ+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id n125-20020a632783000000b00578bd92e502si4075208pgn.558.2023.10.04.08.21.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 08:21:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Chh7oeJ+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 88BCE8072A0B; Wed, 4 Oct 2023 08:21:44 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233542AbjJDPVX (ORCPT + 99 others); Wed, 4 Oct 2023 11:21:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233478AbjJDPVU (ORCPT ); Wed, 4 Oct 2023 11:21:20 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C1C7BF; Wed, 4 Oct 2023 08:21:14 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 714F4C433C8; Wed, 4 Oct 2023 15:21:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696432873; bh=BR+PVMz/ReRBIlT1fOhImOYNK5ZWPSxCh5WYYcVu/ys=; h=From:To:Cc:Subject:Date:From; b=Chh7oeJ+A4mln+ikBhojpHDOIhJBfLVXn5Ws6cF1qsi1LuJhWKt/H7zp4KUGfv5aH YKMR9ORLbYksk1FP9WZZhXKgAdFi4hNuEq5rAZ54KOAtbsXqdMc67AbjSA1LjWeHL7 RuUViLrYsPxjUFx6ewqpeTIXS0RNvGaS8WwAdxXRiCi6RKDBhdlSBGuIPXoxWdXWd1 WosubUYRotDeRfR0r8ekOLw7Q4NSQ6JlSEbrLb/NTb5bTJ9YssmeBVLu9e1tVDlVld tCNRqw7X+vWOMQ14fHTv7mcQghtrG8ql6dTzkgZiVpSzlnKoUGutzwuFjKzqzpFqmj bSvA3bz3Hgrqw== From: Jisheng Zhang To: 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, Robin Murphy , Christoph Hellwig , Drew Fustini Subject: [PATCH] soc: renesas: make ARCH_R9A07G043 (riscv version) depend on NONPORTABLE Date: Wed, 4 Oct 2023 23:08:56 +0800 Message-Id: <20231004150856.2540-1-jszhang@kernel.org> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email 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 (groat.vger.email [0.0.0.0]); Wed, 04 Oct 2023 08:21:44 -0700 (PDT) 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. 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 -- 2.40.1