Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp1755792rdb; Mon, 9 Oct 2023 01:35:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHG0qQ68IdD+lnad5dod/7HwqU12yYYDWo5VJ30knWtISVkva1M+iM+pczonMuSdyLvt6zH X-Received: by 2002:a17:902:e5c1:b0:1c6:777:712c with SMTP id u1-20020a170902e5c100b001c60777712cmr14298986plf.51.1696840505934; Mon, 09 Oct 2023 01:35:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696840505; cv=none; d=google.com; s=arc-20160816; b=Lhg8ZSO4f/uqxJy7nLTpvF2g30VoaWujvXn6roOcyv/w4JNM0wkqbjQ7t/Z5jK2+d9 wGwq/2S8vZ7ktKpCdEU6IskC27dQkm5UE/nthHE59zXhR2MZG8sidyZmm9VIbkUxD7fS WK4jmwztQHvLuEDjWLzb4UCly/+s49igE948snTdDCnYTedBC/r1hATpdDlHycbUPvl3 RHtpGXe1qE2H+S1UJxsrKZHMZ10qTlOyJwPvVjJIimfRdr9Itdgo4csxeDSR6UVRzbB3 Gt5UtFRB6vLu4oXaPM81uftmsSr7DA/wqeyycStXEAFvpyTYjvoAKtr2TiitUYIuPP8g WCBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=NwdP8jelc7BiFPwhVYVJAsOiPK4xvw93CVrrhQ/v1d0=; fh=uUdx4GyahAt+tbljO7gL++DBwOqzbofqRDBqGg0fvR0=; b=1Fm+/UCEtQhX/nev/QwTUu9d9ttIwP37tmeRIBzWgO8q+w9tXPAKzQ0ab+jghgzcEo jhCeqyr7sFGg2Im8ecvfj9zZ85SYP4AVQw1+tJ+pP8I3HBz2i1mCh5KGgN2dG6XbCc59 6cwD0oRvgqDI7AwzrJAQD6V9FzkYDhQ9LcQzqTt7uIIV5wbeQ1Sz/sn8j7vDg7xUTEja wWZpvjwkLTkfE6+pkbxNjgW3e0igQ1iQQBjtKX1dFYI+75D3i9jZirTjXR1dcNtYwhy6 G0pwu4nNwHUcYJ8gPYjvVEWSOeFsf/FSB8uZjrbMN+sVRCqbPuvT8MkeYgEXc1EiGiUJ eTrw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id u3-20020a170902b28300b001b9ed021929si3765536plr.225.2023.10.09.01.35.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 01:35:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 435FA805FD17; Mon, 9 Oct 2023 01:35:03 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234424AbjJIIex convert rfc822-to-8bit (ORCPT + 99 others); Mon, 9 Oct 2023 04:34:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234378AbjJIIev (ORCPT ); Mon, 9 Oct 2023 04:34:51 -0400 Received: from mail-yw1-f169.google.com (mail-yw1-f169.google.com [209.85.128.169]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 396D49F; Mon, 9 Oct 2023 01:34:48 -0700 (PDT) Received: by mail-yw1-f169.google.com with SMTP id 00721157ae682-59f6e6b206fso53460597b3.3; Mon, 09 Oct 2023 01:34:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696840487; x=1697445287; 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=+3OahYfdCxv80l6RdHzhMjxT84AMNbMTgSYeJWK9cGg=; b=FhaQ0bmWr4pGjG2fPNyJCsGhPuyMXXPxC8mQIQcLscNxOPT/stRjwu9vS7kiy7RZH4 bOix44miWmmxfn4AvEbj+H00rTMXEkFp58rc2USHm3pllmD+3S1bVL5rgHuEGv/L/QGO YVPBJKJDkb957p9PrXiurUrmBlQfd4vEVMDvvmUu6g7KZ85JvS14t2K4nC98iCA4jyEV dz58wbZHB0px4tyCD+Rd4WwQUUvKXwHstbYQB51FYYBl+8eJersc83JQsb6/iQm15MHW EkNwlppEiC14EKSppf9con6hCftwgLYKofRq4vabp+Sf3D1zLI7gg1BCGRbBPAZEADQE 3bug== X-Gm-Message-State: AOJu0YxCt4+kgb0pZYNSRwmRtnRbfwfs/7fNqM5GFuQ69Xdxd6Se9mOa NYp+G8MMu+SA13gpZRxuCifqDHW4blOIcA== X-Received: by 2002:a81:4f94:0:b0:59f:5dc3:9fac with SMTP id d142-20020a814f94000000b0059f5dc39facmr15773219ywb.6.1696840487262; Mon, 09 Oct 2023 01:34:47 -0700 (PDT) Received: from mail-yw1-f170.google.com (mail-yw1-f170.google.com. [209.85.128.170]) by smtp.gmail.com with ESMTPSA id m188-20020a0dcac5000000b0059beb468cb4sm3520024ywd.1.2023.10.09.01.34.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 09 Oct 2023 01:34:46 -0700 (PDT) Received: by mail-yw1-f170.google.com with SMTP id 00721157ae682-59f6e6b206fso53460437b3.3; Mon, 09 Oct 2023 01:34:46 -0700 (PDT) X-Received: by 2002:a81:d24f:0:b0:5a1:d398:2e with SMTP id m15-20020a81d24f000000b005a1d398002emr18003738ywl.37.1696840486754; Mon, 09 Oct 2023 01:34:46 -0700 (PDT) MIME-Version: 1.0 References: <20231009-sandbar-botch-0f398fd2e289@wendy> In-Reply-To: <20231009-sandbar-botch-0f398fd2e289@wendy> From: Geert Uytterhoeven Date: Mon, 9 Oct 2023 10:34:34 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] soc: renesas: select ERRATA_ANDES for R9A07G043 only when alternatives are present To: Conor Dooley Cc: linux-renesas-soc@vger.kernel.org, conor@kernel.org, Randy Dunlap , Magnus Damm , Paul Walmsley , Palmer Dabbelt , Albert Ou , Lad Prabhakar , linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=2.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.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 (lipwig.vger.email [0.0.0.0]); Mon, 09 Oct 2023 01:35:03 -0700 (PDT) X-Spam-Level: ** Hi Conor, On Mon, Oct 9, 2023 at 10:12 AM 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 [=n] && RISCV_SBI [=y] > Selected by [y]: > - ARCH_R9A07G043 [=y] && SOC_RENESAS [=y] && RISCV [=y] && NONPORTABLE [=y] && RISCV_SBI [=y] > > ../arch/riscv/errata/andes/errata.c:59:54: warning: 'struct alt_entry' declared inside parameter list will not be visible outside of this definition 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-329c47393d1d@infradead.org/ > Signed-off-by: Conor Dooley Thanks for your patch! > --- 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) 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)). > select ERRATA_ANDES_CMO if ERRATA_ANDES And then this "if" can go as well. Any other hard dependencies? E.g. can RZ/Five work without RISCV_DMA_NONCOHERENT? > help > This enables support for the Renesas RZ/Five SoC. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org 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