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 EC500C83F01 for ; Thu, 31 Aug 2023 13:24:21 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4C5718D000F; Thu, 31 Aug 2023 09:24:21 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 44E958D0001; Thu, 31 Aug 2023 09:24:21 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2EEA28D000F; Thu, 31 Aug 2023 09:24:21 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 17F6A8D0001 for ; Thu, 31 Aug 2023 09:24:21 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id D83B7B2A4A for ; Thu, 31 Aug 2023 13:24:20 +0000 (UTC) X-FDA: 81184468680.02.DCC3AB8 Received: from mail-yb1-f181.google.com (mail-yb1-f181.google.com [209.85.219.181]) by imf08.hostedemail.com (Postfix) with ESMTP id A4359160023 for ; Thu, 31 Aug 2023 13:24:18 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf08.hostedemail.com: domain of geert.uytterhoeven@gmail.com designates 209.85.219.181 as permitted sender) smtp.mailfrom=geert.uytterhoeven@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1693488258; a=rsa-sha256; cv=none; b=ZzXBRKJ8kB3EbaMMb9yPv8Ag45a61b/LxRHdmBaq29M5Dg2uaUjg5DkM0ZNVPM72fm+Crr x3q3OLT99zjVhfuV9KrFJvGIyjkCrz15z07wazZREgpge4W9X4c/9ACHbPa6cNAQwNyhDv ZxxNxJ60eCEl/hWuCL93zYonWZR/Bzs= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf08.hostedemail.com: domain of geert.uytterhoeven@gmail.com designates 209.85.219.181 as permitted sender) smtp.mailfrom=geert.uytterhoeven@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1693488258; 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; bh=kJ/+Xi4zcWbR6NuMjYnszGbUyAs/bLSQutm2P6DQty0=; b=U88pz9cT6GCunr9ua2KOaUgDSNaOR205jtVWub91QlMjxO/tq6rsUtjMAAFgGqAzWzrRaf FGCFI/9sisPNYBMrLQkZZzyBwEHILHwGhM2htYcOmLYUTWz/aIOVHdvln9XrTDVXxYClyY bPG3B5JHkflfePLjJ3D+wiQ1XmBiXk8= Received: by mail-yb1-f181.google.com with SMTP id 3f1490d57ef6-d7bbaa8efa7so598621276.3 for ; Thu, 31 Aug 2023 06:24:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693488257; x=1694093057; 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=kJ/+Xi4zcWbR6NuMjYnszGbUyAs/bLSQutm2P6DQty0=; b=SLJ3G67hx10nBmNrWc8jxHOVxa+oY6UmThojTBXzuDQsV9pf4fCopB060IEtzwpB5G wvZGSus37bB8UNGA+6x80LFJLFvdcSO0IxTA2eT67HQ57EebSIjpO79TdaH94ARwXL4W U85H2nMp7WO4qA66SjGidu2zUR2sD3k+NrSN3ZiEaoG/2aK59ghRrz1GmXamwabvLb/6 /J6yg0qZpSTS8DI2sDfWioTmpEb2lcQvxjIITkg1FQv75vNKOpL9eTTQhJDTMfVIFKlE yjGFoQ6JOIKTmN/iZIbBduOtmmDKtZR5P2JtGyUzG4FxTt+cQ4dFW0ZiyGd+rb8X6gIy jumA== X-Gm-Message-State: AOJu0YzUq3hGg/zeB4IF6i1bb4bGI/v2T8lyQgb5TJTlYJnD23tM5F6J kp7urGujqoLKWr2Oqa0AqR8SgiVNCqJdhg== X-Google-Smtp-Source: AGHT+IGGxWCWA8BjDrfioX53R3JCqBLYdJTzuU6cC1wgk5ZCfMce9rUOKWJbDq/iyfPiRgVjIktccQ== X-Received: by 2002:a25:9b42:0:b0:d78:47a:d76e with SMTP id u2-20020a259b42000000b00d78047ad76emr4390935ybo.49.1693488257351; Thu, 31 Aug 2023 06:24:17 -0700 (PDT) Received: from mail-yb1-f170.google.com (mail-yb1-f170.google.com. [209.85.219.170]) by smtp.gmail.com with ESMTPSA id v142-20020a252f94000000b00d17586ff1f7sm307012ybv.28.2023.08.31.06.24.16 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 31 Aug 2023 06:24:16 -0700 (PDT) Received: by mail-yb1-f170.google.com with SMTP id 3f1490d57ef6-d73c595b558so596358276.2 for ; Thu, 31 Aug 2023 06:24:16 -0700 (PDT) X-Received: by 2002:a25:b323:0:b0:d7a:d716:233c with SMTP id l35-20020a25b323000000b00d7ad716233cmr5271223ybj.41.1693488256694; Thu, 31 Aug 2023 06:24:16 -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: From: Geert Uytterhoeven Date: Thu, 31 Aug 2023 15:24:04 +0200 X-Gmail-Original-Message-ID: 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: "Lad, Prabhakar" Cc: Conor Dooley , 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-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: A4359160023 X-Stat-Signature: o7mrgnc94cgg3hr3f7gbd67a9umdoh3c X-Rspam-User: X-HE-Tag: 1693488258-95514 X-HE-Meta: U2FsdGVkX1/evZIOdcJZBH3PahVAqwtpAkEHSknMTBxl2cub2jkO9fCw4CrVofaDNsXnyuGlJmvu/o/ttQeT+q1jLCkGxu7c22HbyU9b1ObDFbbXZw4ONiZQucI0/wOHOTs9Ms4H6l3bdeI9Auh+BXn7haakh5MwmiGdvZRN2NzbXneTvts8U9bCjMPeBH0Q4IwCGqFMZsnvThzZcCGgD/UQFnU5Y3UqnXsemJ7LCCEi/ARWKfrNDzA/3WIwIVPtcAoDEsnVxTAhnhURCC8LsrYVAMD57jk0E42r0Bxolh7FE1HESoYLulvjsX3oQJgQfrmBeVxMmt5HIXMqOKEVDLfgO8IGGDetICMrmWpY0a0aPDb6k1feWP9z+1d7DhqutzG+06K+MUBnIo+HAjt01jMkEZ+d1zk3im1idoJa4njEy/V5Dfzjg+KMrAgfA549xv6WtWImzvc7oW3jJ0RNbexkfOvSYcVPv219VllWzGCdwz575vgoPL+kGej0mXuWwk8+u2OUzuH3DfgOq6f1uayyJhHl5K3cr+Zz/eiB1omWlRDUM3tTwhqF1TNkm05svdY+4yBw3YPmpAcxeO8lkRJf1ZRpKY6MxYy9Jy+fN1xEmIwxctSpt3wE8/0Eqr6PdH551ctPzI5BzH3U4aNM9NQ2zx4AcKQdkMvwAytHMRmH4RqtWydw19hg03gbb4huxjN6lCjjzU3V9YaNAUsO/+k9xZ1WwDZjCmgy6HWhY/nPNOXV74kvfTCaSk2qebq2iPdfqxA6vWlo9o+XdJjIwXNZr+ttEZUSphaSTUHc1K6cKQHSgW1Py5uHbIfh2a3QZQF2XoyAb2cbaBPvTGMKRIlT3LB0DG0He7zTNnaQZCa4/Puwt/HmesvpcX0MtNVPpjyXjdU0Nz36OSFetsdKspPm7nwSCHYlh7GbF3+CbLnqOaZuYfbyYKTbWiHdUJCKDZzEmKJItPoUiQKiIRL C6ZZMX2X 3Bn3Lv4ipYOIhDW5WlP3wkpS1VIh1aG5BI9JP0K25DOSL9DR7FSii/nEaB4i0DaS4yeU1uHx4n7bGf/XOVVHACs3e8gmSJVKCmcTyPGA/QZG0fECK1nEByHiDz4qVQjtYG6F6kxcCMjATtMHBelWLxFccu6+tpDW/vEtSHvncFKYlLbPO7sv6Idh+VARSpzZ/iqeLOv5zpjWCcCPddWLnwudDKGHrehKsIl+n3m8zg5UFRqP5GaTueEqGH//pWpN3WRXqGFLg0U578AJSRAH/jn2sQpbXDx+CZFyPfc2wvE7NP+4uTf0HJwXNGc2oRNJj/Ceye7j3P8gGu0V98qZcplo+SJGt9TWWaI4Qggkw0iUfYxesPN/xk6/AiMZGOt/oji9cV8XXakaGhrLxH5WyziOjqHRFFglMxvyUOmanFfO9TYxOpSCwP/4TqteKT8+NHTI8pTXOFik3EkrNSRhZNEBST92aRyxI1FeqvBk7+R4x0LHL3XuwPv0XVHaHC9yYIOdXmEVjPTf0gkGUnW2S/aOb9UXSNaNyJi6nGlQfQcr7qhHe13Z8Qy5ccTcEXs8BMU2R4c7hjS989V39E2oEB8Qcc42cGFZso2iaiTpIuoU05p/fTcqnXisyWrOjwP+OgTg2GehF/lqDaSBA7+kHz0l2Ulz9PIaea0Rv2TtMCLRB5YeIVzxluV56nK4nZAtYG6X4+Wn92Vk3ZQVXmQ/PZE0afrH/xjy3yts4OK69ZC4cLCLNJxEGhQEk172HVumwCoeupL9kHeXOAiNqPVYHye86tG3NvXR2SqsJwCgOwpk6yAc= 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 Prabhakar, On Thu, Aug 31, 2023 at 3:02=E2=80=AFPM Lad, Prabhakar wrote: > On Thu, Aug 31, 2023 at 1:01=E2=80=AFPM Geert Uytterhoeven wrote: > > On Thu, Aug 31, 2023 at 1:54=E2=80=AFPM Lad, Prabhakar > > wrote: > > > 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: > > > > > 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 wro= te: > > > > > > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/= linux-next.git master > > > > > > > head: a47fc304d2b678db1a5d760a7d644dac9b067752 > > > > > > > commit: f2863f30d1b05e5ecf61c063609cb974954d47f8 [13230/13643= ] riscv: errata: Add Andes alternative ports > > > > > > > config: riscv-randconfig-001-20230831 (https://download.01.or= g/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/0= day-ci/archive/20230831/202308311610.ec6bm2G8-lkp@intel.com/reproduce) > > > > > > > > > > > > > > If you fix the issue in a separate patch/commit (i.e. not jus= t a new version of > > > > > > > the same patch/commit), kindly add following tags > > > > > > > | Reported-by: kernel test robot > > > > > > > | Closes: https://lore.kernel.org/oe-kbuild-all/202308311610.= ec6bm2G8-lkp@intel.com/ > > > > > > > > > > > > > > All error/warnings (new ones prefixed by >>): > > > > > > > > > > > > > > arch/riscv/errata/andes/errata.c: In function 'ax45mp_iocp= _sw_workaround': > > > > > > > >> arch/riscv/errata/andes/errata.c:29:23: error: storage siz= e of 'ret' isn't known > > > > > > > 29 | struct sbiret ret; > > > > > > > | ^~~ > > > > > > > >> arch/riscv/errata/andes/errata.c:35:15: error: implicit de= claration 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 va= riable '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 checks if the IOCP is missing and > > > > > > > 33 * cache is controllable only then CMO = will be applied to the platform. > > > > > > > 34 */ > > > > > > > > 35 ret =3D sbi_ecall(ANDESTECH_SBI_EXT_AND= ES, ANDES_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 w= ill need > > > > > > 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_R9A07= G043 [=3Dy] > > > > So the issue is that CONFIG_MMU=3Dn. > > > > > --- 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 > > > > Why does this depend on MMU? > > > 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 Gr{oetje,eeting}s, Geert --=20 Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k= .org In personal conversations with technical people, I call myself a hacker. Bu= t when I'm talking to journalists I just say "programmer" or something like t= hat. -- Linus Torvalds