Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp1773186rdb; Mon, 9 Oct 2023 02:22:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG3TVllZEjA+aH/B4mYL2Lxx9Nb7LvWmyD2dZQAQRmhkaxps/4u7lwceSLY+497VRvV9d0a X-Received: by 2002:a05:6870:96ac:b0:1ad:5317:1f7d with SMTP id o44-20020a05687096ac00b001ad53171f7dmr17840540oaq.39.1696843327820; Mon, 09 Oct 2023 02:22:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696843327; cv=none; d=google.com; s=arc-20160816; b=1Bq5zleana9uXOgupZ5wOTUS1kf+Y3mtoLK9d95m8Ih4n7SfaqkZjPptaVydmGqXaM r8yV1KNHzG54DWdAoOMx2tVInnxDOQMAV9OPP+3vxccHyIhMrfm/vR3EkeBqsVR3HU2i gdBybRb1102l9oN0Rc9KsKBlE0YGxdvMU6wobObJlSgxXcEVFT7r/FsxjXafor+n0nvH 2/7LymAgDWPR46Jl5cabZHlypEW3d8G1bFutXxRMrYuBeWJhbYLhCuReupEFE4WNgp7x 9pNYViP8QXK4GHCgswtFu9ngExxoD7hXQhq90c/nmVdQcIf+eovB3eeeO+1/MITthV2G IUbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=HHRIXBWkoU5AaEz4J7FwSLnCvfPMLVXGU13eyycz2fM=; fh=4rtWwO6KKnqlXRdEIjlK3iyCZ56LwzGN9eaxh1TnZhs=; b=Tl3PIUR0oWDxmZYmt8VbTbFwG4zaFZeiv8TIEZLdivNwuZyGjqHOfSfNXSdU3NibC8 /XY1L8DN0X/VeXJgtpgAVpWy4+D+ktiu6TTANBFUZiyWhwpPQOEbFv9JrUE9hFCPwQBm s6WqMhF9s7hhxObwUr39GXMcRZgdaw2ZUq5C4GPWJNq1bA8UvXQgZ9X8fBRXuvOLSp7K Pgsdq2N3SEWwphFaxZNioy5xpwM+SPf12d6XBZvOFRC2nADVe9oiLhzEEr+REu8cwjA1 a7qvX/okiwrLPVtlyjovZnpdxCTu50z0QB/JbM8bHwzosKBB9e9Gf/cv9AYL7Xc5tNnl gZjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=xUIKuTlT; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id bt21-20020a056a00439500b0068a52819fd2si7002231pfb.331.2023.10.09.02.22.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 02:22:07 -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; dkim=pass header.i=@microchip.com header.s=mchp header.b=xUIKuTlT; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 668C280A22D4; Mon, 9 Oct 2023 02:22:06 -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 S1345695AbjJIJWD (ORCPT + 99 others); Mon, 9 Oct 2023 05:22:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345671AbjJIJWC (ORCPT ); Mon, 9 Oct 2023 05:22:02 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A47CC97; Mon, 9 Oct 2023 02:22:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1696843320; x=1728379320; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=nl/Pb7yNcrRSIji9Rq2BWcaYNm9rNVSMwfevq+ZJbXU=; b=xUIKuTlT4Hl4zOaiT5pfr5MaQgXYhlSCLkdhy7sIMF/4FCdJnoS82G+h xU6MRhuLH44z+pVuXJT+BKAhJx7ihfHlKQT+TkRfT9dnCI8bCrEhiNL1r Y0fivAgu/GkL2K+wJn8LSWcJu201i1CFlDCeeaGnu8Prgkkfy1iVTYKWi lNgBnWY1Il/198TbfmLlQrJ0yTqr6sE5VAj2JaG5ZszlxWi1H3WjSZ6v2 qAWINHtMYq2rMzcAi75kvlf/JyRIYG/YqasGO8z93P/jy2a1/gfP5Kh6n 3iJ9NCPTcsoY0Y+b09xYsxBk7zSzfL/NXf2wFV264DxmB+b2ANpjcHvgN A==; X-CSE-ConnectionGUID: crs7sF3tRlKn6sEwzlDrPg== X-CSE-MsgGUID: 9cWccrISQheTSGzag4PSBQ== X-ThreatScanner-Verdict: Negative X-IronPort-AV: E=Sophos;i="6.03,210,1694761200"; d="asc'?scan'208";a="176377026" X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa6.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 09 Oct 2023 02:21:59 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Mon, 9 Oct 2023 02:21:59 -0700 Received: from wendy (10.10.85.11) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21 via Frontend Transport; Mon, 9 Oct 2023 02:21:56 -0700 Date: Mon, 9 Oct 2023 10:21:36 +0100 From: Conor Dooley To: Geert Uytterhoeven CC: , , Randy Dunlap , Magnus Damm , Paul Walmsley , Palmer Dabbelt , Albert Ou , Lad Prabhakar , , Subject: Re: [PATCH] soc: renesas: select ERRATA_ANDES for R9A07G043 only when alternatives are present Message-ID: <20231009-acuteness-nutlike-1f28a2335384@wendy> References: <20231009-sandbar-botch-0f398fd2e289@wendy> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="H8JAiz5CASvgRsHi" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,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]); Mon, 09 Oct 2023 02:22:06 -0700 (PDT) --H8JAiz5CASvgRsHi Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 09, 2023 at 10:34:34AM +0200, Geert Uytterhoeven wrote: > Hi Conor, >=20 > On Mon, Oct 9, 2023 at 10:12=E2=80=AFAM Conor Dooley wrote: > > Randy reported a randconfig build issue against linux-next: > > WARNING: unmet direct dependencies detected for ERRATA_ANDES > > Depends on [n]: RISCV_ALTERNATIVE [=3Dn] && RISCV_SBI [=3Dy] > > Selected by [y]: > > - ARCH_R9A07G043 [=3Dy] && SOC_RENESAS [=3Dy] && RISCV [=3Dy] && NONP= ORTABLE [=3Dy] && RISCV_SBI [=3Dy] > > > > ../arch/riscv/errata/andes/errata.c:59:54: warning: 'struct alt_entry' = declared inside parameter list will not be visible outside of this definiti= on or declaration > > 59 | void __init_or_module andes_errata_patch_func(struct alt_entry = *begin, struct alt_entry *end, > > > > On RISC-V, alternatives are not usable in XIP kernels, which this > > randconfig happened to select. Add a check for whether alternatives are > > available before selecting the ERRATA_ANDES config option. > > > > Reported-by: Randy Dunlap > > Acked-by: Randy Dunlap > > Tested-by: Randy Dunlap > > Closes: https://lore.kernel.org/all/09a6b0f0-76a1-45e3-ab52-329c47393d1= d@infradead.org/ > > Signed-off-by: Conor Dooley >=20 > Thanks for your patch! >=20 > > --- a/drivers/soc/renesas/Kconfig > > +++ b/drivers/soc/renesas/Kconfig > > @@ -343,7 +343,7 @@ config ARCH_R9A07G043 > > select ARCH_RZG2L > > select AX45MP_L2_CACHE if RISCV_DMA_NONCOHERENT > > select DMA_GLOBAL_POOL > > - select ERRATA_ANDES if RISCV_SBI > > + select ERRATA_ANDES if (RISCV_SBI && RISCV_ALTERNATIVE) >=20 > Perhaps ARCH_R9A07G043 should depend on RISCV_ALTERNATIVE (and > RISCV_SBI) instead? It's not like RZ/Five is gonna work without the > Andes errata handling present (unless all of them are related to cache > handling, and we can run uncached; also see below)). >=20 > > select ERRATA_ANDES_CMO if ERRATA_ANDES >=20 > And then this "if" can go as well. >=20 > Any other hard dependencies? > E.g. can RZ/Five work without RISCV_DMA_NONCOHERENT? That seems fair to me, it won't work without any of the above, so it's probably fair game to make them actual dependencies & likely more user friendly since it'll prevent people creating a kernel that cannot function. Cheers, Conor. >=20 > > help > > This enables support for the Renesas RZ/Five SoC. >=20 > Gr{oetje,eeting}s, >=20 > Geert >=20 > --=20 > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m6= 8k.org >=20 > In personal conversations with technical people, I call myself a hacker. = But > when I'm talking to journalists I just say "programmer" or something like= that. > -- Linus Torvalds --H8JAiz5CASvgRsHi Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZSPGIAAKCRB4tDGHoIJi 0pQdAQDP0EDastcRyfubosMkIjTRJbu3yHBbxDcEIeHUXE1/2QEAgoXMXZl4RxM7 cxShvCs8UHEpmf2WuY+pPyQiXnxHvQ4= =VHI5 -----END PGP SIGNATURE----- --H8JAiz5CASvgRsHi--