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 18081C83F12 for ; Thu, 31 Aug 2023 11:54:35 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 59CBC8E0016; Thu, 31 Aug 2023 07:54:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 54BE08D0001; Thu, 31 Aug 2023 07:54:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 413378E0016; Thu, 31 Aug 2023 07:54:34 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 2DB078D0001 for ; Thu, 31 Aug 2023 07:54:34 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 013181A01F7 for ; Thu, 31 Aug 2023 11:54:33 +0000 (UTC) X-FDA: 81184242468.28.B0ACF43 Received: from mail-io1-f42.google.com (mail-io1-f42.google.com [209.85.166.42]) by imf01.hostedemail.com (Postfix) with ESMTP id 0E2BE40018 for ; Thu, 31 Aug 2023 11:54:31 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=KS7djeqd; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf01.hostedemail.com: domain of prabhakar.csengg@gmail.com designates 209.85.166.42 as permitted sender) smtp.mailfrom=prabhakar.csengg@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1693482872; a=rsa-sha256; cv=none; b=OPAfX6RCiD31hv6i071YVYEWHzvbiuD8JKiDwluibR10qAOMXsxSo3HHaAXANjF3y1vMkm U9y5PVYf9iHq9PtBTnkcF24jWAsGdeeURUoqXzdce7qmJcgCaf1hoi6ie+oA9fr7GGDvkQ E1nMkcrM9O0/GKSVxNDtfyHiFMT8cGE= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=KS7djeqd; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf01.hostedemail.com: domain of prabhakar.csengg@gmail.com designates 209.85.166.42 as permitted sender) smtp.mailfrom=prabhakar.csengg@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1693482872; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Bz9f/egUuFrZeCNCO5EIlnzTcZaG1U5LzWIOhQb1uXc=; b=cQzer0keFs1Y36IjKV+yStDT15IG/nRUBTAjYPEyY0V2JTB0TyGNCZgTdUEx/d+1DnvdeA +0VUcR2nsss9LgUwF+NViIwd3XqdjxLeUhfkicr36ySYf4LTAfQvWblXnxAC5VLb7CjcQf mvX/PdeAtr8sW0rY8C9ynydEr3RQ5R0= Received: by mail-io1-f42.google.com with SMTP id ca18e2360f4ac-7928dc54896so26604139f.3 for ; Thu, 31 Aug 2023 04:54:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693482871; x=1694087671; darn=kvack.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Bz9f/egUuFrZeCNCO5EIlnzTcZaG1U5LzWIOhQb1uXc=; b=KS7djeqdj9glf0KNaZ7XKeAZawQM/48qiXWhNsU0kl4gYinwhgmEayHTw+THXbVugt lMP+jelnLb+RCf1JyrSXgy9h6wQlu6up8vwNHvYggQCuKPQnZPtLy1E+yviIO3JyRH8f /LK/1woYMt32CfhBT0HSfT6El2TQZJT0AWJEoFsbXjsJizgKGhQspyPAdFkDxd4Drnkt IhXz7eeoWfFGQa3mi6Pl4UFyuEwX1a23J9kcaYNtZ9u2bt9VpMXZsWxQdkM6kNDNxZyi WAf0GJFYkrMjhBi54qpZ9GnVXV0SBi+F+GRZ2QZ6SBUl9PfijYAQdEXhzkZzZggRNnhy 3mXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693482871; x=1694087671; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Bz9f/egUuFrZeCNCO5EIlnzTcZaG1U5LzWIOhQb1uXc=; b=Mr/RS0KllPmFzh8oc6t2QIgs9wXYgCnySLrJy4ReVrg7O/+bV2UD00PObq0JOpL22Z PHiJDH24Y1VXauR4dB5qY81FYqS0NEmK+vYflarMfm/gQRz1Qyu4cJUTy7JLv/mXdITu c6u2zpezhv6PWlBx75UGugUYJnL/vpKgCk1wDjbTJfOBTnE/LXvxNuNM+qFK/6/+PWZ7 dhbsk4Bla52mSE6Mfroxxhiv4GYFoca4PWxmp3vaqSZVTvkdmRz850zr2ZKOcsT+Cbvb ASAyz5bvZRWDsP2ZJVtNoGWczlONQE0zwPPpg2UBmgkwvvV4QHUC2UfD0NV2W0lrZrCF RPSg== X-Gm-Message-State: AOJu0YysJAXPLNhi0RAsgdn7xBzr8Qwzdxh9QRowfXWDzOClnnh88ubl pHrK8jXnQDdK7+FwZCtuCw86WbExIKVnvfcFDdzxE/mTfFQHsQ== X-Google-Smtp-Source: AGHT+IFQzVYsJvN8uDG6aise2xpTldkpLyWXEG9aNiyAFrW2gU0vZxIb/T3MD2V4KKmehYU7UCNJevIcJkq9BoJfAN4= X-Received: by 2002:a5e:c70a:0:b0:791:16ba:d764 with SMTP id f10-20020a5ec70a000000b0079116bad764mr5559584iop.16.1693482871145; Thu, 31 Aug 2023 04:54:31 -0700 (PDT) MIME-Version: 1.0 References: <202308311610.ec6bm2G8-lkp@intel.com> <20230831-congested-monument-44ddb496204d@wendy> <20230831-imperial-surviving-afdf6d275388@wendy> In-Reply-To: <20230831-imperial-surviving-afdf6d275388@wendy> From: "Lad, Prabhakar" Date: Thu, 31 Aug 2023 12:53:40 +0100 Message-ID: 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 To: Conor Dooley , Geert Uytterhoeven Cc: kernel test robot , Lad Prabhakar , oe-kbuild-all@lists.linux.dev, Linux Memory Management List , Palmer Dabbelt Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 0E2BE40018 X-Stat-Signature: qezsn7msx8htik195psamd9byq44cha1 X-HE-Tag: 1693482871-584713 X-HE-Meta: U2FsdGVkX18/hNMWw648kzcKj7ybAQ/uC+kGl14R6ybfk7t7lGNXkehxwJxGmKdXd/+LEocoY1n4O0juI+BfDzAz5pb9D0Gu+R3hzgvKtyxVpq28ROweulP5DIWgc54hG2yr9RW7u5V2LUMi1qA+gklJK3vgsxwLsJa4TkiZXZOihJG45smb8zsC0LGHexBGZPg8GJxnbf1BuL8Zi612OSORccoweJoVghVJX8tnxFOx+useEmgufmPU3dH8Xn4qWLZ/k3juyhJDkcRRgHaptPLUv+eCeFjNQQQbQr6l/AZf9X+naD5kobAOEIA35C4NqfnPLSxlDKzwCQle3aTQCRMyQFmIL308DGwWSMvcq1AQpad0jLHWswkE6mRFzg55HXW0oNExVCM+Ll8gfjr/QA5c8iA1igSwWm+N+gijSrrV26dlhSkLhIxiPvaOMOVN2Wr+Te2QEf0HYVDNjSayzX7Th2sU2wmlxUnVHlbYdLuFjQBFdcUvd7OcQsDwz7ogRsm6NR3is3pFNOq6YZPbVl99xgA6ooPs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FuC3Rjgd6Krta6upNzaisHfbDhOaFpyUZ23kdp3efUkntpVMGc= 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: Hi Conor, On Thu, Aug 31, 2023 at 12:34=E2=80=AFPM Conor Dooley wrote: > > On Thu, Aug 31, 2023 at 12:22:50PM +0100, Lad, Prabhakar wrote: > > Hi Conor, > > > > On Thu, Aug 31, 2023 at 10:44=E2=80=AFAM Conor Dooley > > wrote: > > > > > > On Thu, Aug 31, 2023 at 04:52:00PM +0800, kernel test robot wrote: > > > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-= next.git master > > > > head: a47fc304d2b678db1a5d760a7d644dac9b067752 > > > > commit: f2863f30d1b05e5ecf61c063609cb974954d47f8 [13230/13643] risc= v: errata: Add Andes alternative ports > > > > config: riscv-randconfig-001-20230831 (https://download.01.org/0day= -ci/archive/20230831/202308311610.ec6bm2G8-lkp@intel.com/config) > > > > compiler: riscv64-linux-gcc (GCC) 13.2.0 > > > > reproduce (this is a W=3D1 build): (https://download.01.org/0day-ci= /archive/20230831/202308311610.ec6bm2G8-lkp@intel.com/reproduce) > > > > > > > > If you fix the issue in a separate patch/commit (i.e. not just a ne= w version of > > > > the same patch/commit), kindly add following tags > > > > | Reported-by: kernel test robot > > > > | Closes: https://lore.kernel.org/oe-kbuild-all/202308311610.ec6bm2= G8-lkp@intel.com/ > > > > > > > > All error/warnings (new ones prefixed by >>): > > > > > > > > arch/riscv/errata/andes/errata.c: In function 'ax45mp_iocp_sw_wo= rkaround': > > > > >> 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 declarat= ion 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; > > > > | ^~~ > > > > cc1: some warnings being treated as errors > > > > > > > > > > > > vim +29 arch/riscv/errata/andes/errata.c > > > > > > > > 26 > > > > 27 static long ax45mp_iocp_sw_workaround(void) > > > > 28 { > > > > > 29 struct sbiret ret; > > > > 30 > > > > 31 /* > > > > 32 * ANDES_SBI_EXT_IOCP_SW_WORKAROUND SBI EXT c= hecks if the IOCP is missing and > > > > 33 * cache is controllable only then CMO will b= e applied to the platform. > > > > 34 */ > > > > > 35 ret =3D sbi_ecall(ANDESTECH_SBI_EXT_ANDES, AN= DES_SBI_EXT_IOCP_SW_WORKAROUND, > > > > 36 0, 0, 0, 0, 0, 0); > > > > 37 > > > > 38 return ret.error ? 0 : ret.value; > > > > 39 } > > > > 40 > > > > > > Looks like the config doesn't enable SBI, so ERRATA_ANDES_CMO will ne= ed > > > to grow a dependency on RISCV_SBI. > > I think adding dependency for RISCV_SBI on ERRATA_ANDES would be a good= idea. > > > > While at it I am seeing below warnings with this randconfig: > > WARNING: unmet direct dependencies detected for ERRATA_ANDES_CMO > > Depends on [n]: ERRATA_ANDES [=3Dy] && MMU [=3Dn] && ARCH_R9A07G043 [= =3Dy] > > Selected by [y]: > > - ARCH_R9A07G043 [=3Dy] && SOC_RENESAS [=3Dy] && RISCV [=3Dy] > > > > WARNING: unmet direct dependencies detected for AX45MP_L2_CACHE > > Depends on [n]: RISCV_DMA_NONCOHERENT [=3Dn] > > Selected by [y]: > > - ARCH_R9A07G043 [=3Dy] && SOC_RENESAS [=3Dy] && RISCV [=3Dy] > > configuration written to .config > > > > *** End of the configuration. > > *** Execute 'make' to start the build or try 'make help'. > > > > For which I will send the below fix: > > --- 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 > > + imply AX45MP_L2_CACHE > > select DMA_GLOBAL_POOL > > - select ERRATA_ANDES > > - select ERRATA_ANDES_CMO > > + imply ERRATA_ANDES > > + imply ERRATA_ANDES_CMO > > help > > This enables support for the Renesas RZ/Five SoC. > > I've only ever heard bad things from Arnd about using imply. > > Why don't you just make the erratum config option select > RISCV_DMA_NONCOHERENT, just like the THEAD_CMO erratum does? > The cache driver should probably then depend on the erratum Kconfig > option, since there's no point in having it otherwise? > Agreed. I have the below proposal: --------------------------------------- diff --git a/arch/riscv/Kconfig.errata b/arch/riscv/Kconfig.errata index 92c779764b27..672480f4f983 100644 --- a/arch/riscv/Kconfig.errata +++ b/arch/riscv/Kconfig.errata @@ -3,6 +3,7 @@ menu "CPU errata selection" config ERRATA_ANDES bool "Andes AX45MP errata" depends on RISCV_ALTERNATIVE + depends on RISCV_SBI help All Andes errata Kconfig depend on this Kconfig. Disabling this Kconfig will disable all Andes errata. Please say "Y" @@ -12,7 +13,7 @@ config ERRATA_ANDES config ERRATA_ANDES_CMO bool "Apply Andes cache management errata" - depends on ERRATA_ANDES && MMU && ARCH_R9A07G043 + depends on ERRATA_ANDES && MMU select RISCV_DMA_NONCOHERENT default y help diff --git a/drivers/cache/Kconfig b/drivers/cache/Kconfig index a57677f908f3..14d0ff5ec71b 100644 --- a/drivers/cache/Kconfig +++ b/drivers/cache/Kconfig @@ -3,7 +3,7 @@ menu "Cache Drivers" config AX45MP_L2_CACHE bool "Andes Technology AX45MP L2 Cache controller" - depends on RISCV_DMA_NONCOHERENT + depends on ERRATA_ANDES_CMO select RISCV_NONSTANDARD_CACHE_OPS help Support for the L2 cache controller on Andes Technology AX45MP platforms. diff --git a/drivers/soc/renesas/Kconfig b/drivers/soc/renesas/Kconfig index 67604f24973e..4f14fa149985 100644 --- a/drivers/soc/renesas/Kconfig +++ b/drivers/soc/renesas/Kconfig @@ -333,11 +333,9 @@ if RISCV config ARCH_R9A07G043 bool "RISC-V Platform support for RZ/Five" + depends on AX45MP_L2_CACHE select ARCH_RZG2L - select AX45MP_L2_CACHE select DMA_GLOBAL_POOL - select ERRATA_ANDES - select ERRATA_ANDES_CMO help This enables support for the Renesas RZ/Five SoC. Cheers, Prabhakar