From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D4E38C83F2E for ; Thu, 31 Aug 2023 16:36:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 246778D0015; Thu, 31 Aug 2023 12:36:14 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1F6178D0001; Thu, 31 Aug 2023 12:36:14 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0BF598D0015; Thu, 31 Aug 2023 12:36:14 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id F12418D0001 for ; Thu, 31 Aug 2023 12:36:13 -0400 (EDT) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 92B9E140213 for ; Thu, 31 Aug 2023 16:36:13 +0000 (UTC) X-FDA: 81184952226.03.F92970E Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf27.hostedemail.com (Postfix) with ESMTP id A636E40012 for ; Thu, 31 Aug 2023 16:36:10 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="ggwI8/8r"; spf=pass (imf27.hostedemail.com: domain of conor@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=conor@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1693499770; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=LAE12RZx3EgJCwufCHlWBnnD7uOml5DRGn1gJwf5jd0=; b=lTtcTabI1rL1Saf0ebAWI9X8ZdocobPQ1hLci88UXTOQoq2+Nm0eKmNaLK8r9R2pTN8SKV h2uPJIYbpIJYfmrZJA9GA/ENPtflffrlcT9crbXRTBmY2k0f1M88+0dMqesTZD75N33igP ukC633yLrVPDA8qaIdJdP/SWC8YKPlU= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="ggwI8/8r"; spf=pass (imf27.hostedemail.com: domain of conor@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=conor@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1693499770; a=rsa-sha256; cv=none; b=PhpeiuV85x4OPOPCzJBESVA8/wZ54aPEHU2OUy3l5kHzFE3UKI+ea9+tf6pCzbPlx+2bGL DiCTjO4En562DzqwXjqZt2D1DB5m7VZrwkRcX6Mog1cZ+ENJERka9gpkH0tlirDJbMmZWE /PAMq6+QsxOtE2/sUh2UqMbIPMoh7EM= Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8C85E60F4E; Thu, 31 Aug 2023 16:36:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 48193C433C8; Thu, 31 Aug 2023 16:36:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1693499769; bh=DbkjI5fCXetjSSIuXgR1W10vvZtbaLuMnAXzmZwx0No=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ggwI8/8r/YjQPSCQqeAsq0oi1BQP8suGaV/p0BPlpLrSxDrsQNDRHIzjlXFizRYHs ugbqcQVb/YdXZ3tSJC4UH/V1l3LkYEO0ErN70Fv4NbbU5y/W/s5+J/gofRdv5fQGxG AMFNrPL76t0SvvWNILqT4/FRAcuZ3xthyh4CpBShTwJ7sM8GZM35WzpnZzJqcdZUxz Kv5fOOSnSJ/neza9ILZLd8DAMd9ifGFvsdJ8D9ZBdBT0N9dzun1LCKUXOR5sB+NLlq 713eIDMsokt18O7+BxEF51VMKUw/n0t0tKy4dCcH5ZO3nqqdqSKZnMW3YX+UWc2f3e n/wfaZ+fJtMCA== Date: Thu, 31 Aug 2023 17:36:05 +0100 From: Conor Dooley To: "Lad, Prabhakar" Cc: Geert Uytterhoeven , Conor Dooley , kernel test robot , Lad Prabhakar , oe-kbuild-all@lists.linux.dev, Linux Memory Management List , Palmer Dabbelt Subject: Re: [WARNING: ATTACHMENT UNSCANNED]Re: [linux-next:master 13230/13643] arch/riscv/errata/andes/errata.c:29:23: error: storage size of 'ret' isn't known Message-ID: <20230831-nimble-rust-00821dccffdf@spud> References: <202308311610.ec6bm2G8-lkp@intel.com> <20230831-congested-monument-44ddb496204d@wendy> <20230831-imperial-surviving-afdf6d275388@wendy> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="0ZWLegoGS3NBH/qw" Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: A636E40012 X-Rspam-User: X-Stat-Signature: i4acdyj6r1kt4nxbciofdgscdyu9th5z X-Rspamd-Server: rspam01 X-HE-Tag: 1693499770-130401 X-HE-Meta: U2FsdGVkX18cM8N63xPg4WVHGRVGLIey3fP9al3RgkdZvrwmcp0pHfD5Dmhe3T+8566q3tJL3ldUhUkxJ20EhaDqBgZn5Wghm+KZxS4yHXTmwNtWJrBv2FBcWPqvgj7WaaTwHzvXZxyYJL3xk45EO6/6M4ClNWhq2vXGgwCIe6dpGdQX53odoWo/IaYFCqTl5gBxFtN1Qe8BUVB/MG9chU0NgA3n0uCc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ZMcb7xAZYovy5ZE0lvo265jMnSxZUqwpIyUc+aidiwZLuatdbLHzpiKJniV3Gai3Lyrk6/PksUxYi9belbQQClPf4h6BkZg1CP8pM5Pp8Q5nn5Mnmzh2KjjHYUPOcHLy6hzBVKsl9XykFJV2gFTAcRu/ZVF1AtchWqVzooWCRbjKaZExUEzY3i79wbWqwrYErOHXxabi4tEHyD+wEK X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: --0ZWLegoGS3NBH/qw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 31, 2023 at 03:59:37PM +0100, Lad, Prabhakar wrote: > > > Currently ARCH_R9A07G043 selects DMA_GLOBAL_POOL and we have > > > RISCV_DMA_NONCOHERENT selecting DMA_DIRECT_REMAP which causes below > > > build issue when MMU is disabled: > > > > > > kernel/dma/pool.c: In function 'atomic_pool_expand': > > > kernel/dma/pool.c:105:44: error: implicit declaration of function > > > 'pgprot_dmacoherent' [-Werror=3Dimplicit-function-declaration] > > > 105 | > > > pgprot_dmacoherent(PAGE_KERNEL), > > > | ^~~~~~~~~~~~~~~~~~ > > > kernel/dma/pool.c:105:44: error: incompatible type for argument 3 of > > > 'dma_common_contiguous_remap' > > > 105 | > > > pgprot_dmacoherent(PAGE_KERNEL), > > > | > > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > | | > > > | int > > > In file included from kernel/dma/pool.c:8: > > > > Hmm, kernel/dma/mapping.c has its use of pgprot_dmacoherent() inside > > an #ifdef CONFIG_MMU block. > > kernel/dma/pool.c has it inside an #ifdef CONFIG_DMA_DIRECT_REMAP block. > > > > I guess that select should get a dependency on MMU: > > > > config RISCV_DMA_NONCOHERENT > > select DMA_DIRECT_REMAP if MMU > > > > For comparison, m68k does take that into account: > > > > select DMA_DIRECT_REMAP if HAS_DMA && MMU && !COLDFIRE > > > Thanks for the pointer. With this changes we dont get an unmet > dependencies warning. >=20 > arch/riscv/errata/andes/errata.c: In function 'ax45mp_iocp_sw_workaround': > arch/riscv/errata/andes/errata.c:29:23: error: storage size of 'ret' isn'= t known > 29 | struct sbiret ret; > | ^~~ > arch/riscv/errata/andes/errata.c:35:15: error: implicit declaration of > function 'sbi_ecall' [-Werror=3Dimplicit-function-declaration] > 35 | ret =3D sbi_ecall(ANDESTECH_SBI_EXT_ANDES, > ANDES_SBI_EXT_IOCP_SW_WORKAROUND, > | ^~~~~~~~~ > arch/riscv/errata/andes/errata.c:29:23: warning: unused variable 'ret' > [-Wunused-variable] > 29 | struct sbiret ret; > | ^~~ > arch/riscv/errata/andes/errata.c:39:1: error: control reaches end of > non-void function [-Werror=3Dreturn-type] > 39 | } > | ^ > cc1: some warnings being treated as errors >=20 > To fix the above build issue reported by the bot, adding a dependency > for RISCV_SBI in ERRATA_ANDES won't help as ARCH_R9A07G043 is > explicitly selecting it. To avoid imply should explicitly select based > on dependency something like below? >=20 > diff --git a/arch/riscv/Kconfig.errata b/arch/riscv/Kconfig.errata > index 92c779764b27..566bcefeab50 100644 > --- a/arch/riscv/Kconfig.errata > +++ b/arch/riscv/Kconfig.errata > @@ -2,7 +2,7 @@ menu "CPU errata selection" >=20 > config ERRATA_ANDES > bool "Andes AX45MP errata" > - depends on RISCV_ALTERNATIVE > + depends on RISCV_ALTERNATIVE && RISCV_SBI > help > All Andes errata Kconfig depend on this Kconfig. Disabling > this Kconfig will disable all Andes errata. Please say "Y" > @@ -12,7 +12,7 @@ config ERRATA_ANDES >=20 > config ERRATA_ANDES_CMO > bool "Apply Andes cache management errata" > - depends on ERRATA_ANDES && MMU && ARCH_R9A07G043 > + depends on ERRATA_ANDES && ARCH_R9A07G043 > select RISCV_DMA_NONCOHERENT > default y > help > diff --git a/drivers/soc/renesas/Kconfig b/drivers/soc/renesas/Kconfig > index 67604f24973e..543300fe9862 100644 > --- a/drivers/soc/renesas/Kconfig > +++ b/drivers/soc/renesas/Kconfig > @@ -334,10 +334,10 @@ if RISCV > config ARCH_R9A07G043 > bool "RISC-V Platform support for RZ/Five" > select ARCH_RZG2L > - select AX45MP_L2_CACHE > + select AX45MP_L2_CACHE if RISCV_DMA_NONCOHERENT > select DMA_GLOBAL_POOL > - select ERRATA_ANDES > - select ERRATA_ANDES_CMO > + select ERRATA_ANDES if RISCV_SBI > + select ERRATA_ANDES_CMO if ERRATA_ANDES > help > This enables support for the Renesas RZ/Five SoC. >=20 > Or am I missing a simpler way to fix this. This seems reasonable to me at least /shrug --0ZWLegoGS3NBH/qw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZPDBdAAKCRB4tDGHoIJi 0nPgAP9y4+oZNdjct60KvEmHHZwE1zqeZf2Ee4XFCJIHFiUf0QEA2pn5RbzQQXYO Fv+B1/EnTwmZpAx5zwp1iyKEs4mvjAw= =CuAP -----END PGP SIGNATURE----- --0ZWLegoGS3NBH/qw--