Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp785252pxp; Fri, 11 Mar 2022 15:05:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJwpcRBG6oCnUTQf9YkPZ44ciVwjqSLBXjbJWAnnTV2QlrA+ACaTaoMfdoFOC/5z1eTTYvKb X-Received: by 2002:a17:902:b697:b0:151:4c2e:48be with SMTP id c23-20020a170902b69700b001514c2e48bemr12365901pls.70.1647039919113; Fri, 11 Mar 2022 15:05:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1647039919; cv=none; d=google.com; s=arc-20160816; b=s/FuXXOThdG7kkcu5AQzHWb2Ts2W5NF6DYrWJDQFiDZY3xcHKEhxGCrGOw3bk4wzx6 osCGUseL5BxAkajCQJ68pQbYMNaynMafal3bi0ZMepdjDCiGAf4/NxQWOlyVqFt8htTi 8DcrApJFCtR0CmuJQOQJgAWwxmtIec5JaMvT3F3V0so9ZmDQ7U1CwFkN5G/Z6yInEx7U p/oA6c8JDhQscTJv9rphjxtRCIDTqbOxugM3WHyrABGrF6CsNsF2oCnWOToVpASGVZBc 7FavOn2xMPZ+SMqqdAo4te0qRHhzIAHSqDjXHZSnFMo9kq3ybOV7MXDhrczrfjquP8Jv /nIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:to:from:cc:in-reply-to:subject:date:dkim-signature; bh=Ppb+nGqWIW/h/QwBcLw4pfKIt8cQodBBM6cAdLT5fmg=; b=U7xi9Fpg+dNen8TGc6dnkqxb82xq/W+NB9lD0r+1UG+5GF1fJT9kw8ycescB+QnGjh NPSc3DYhbUYd382PgEYEAe5/PAOOdwGGe44xT+Z9AulULYD1XHICPfOPBJe9eHd/6iBS L4cOQKWIG+s40IekPpV/5i14TjhM57nCKNBOSt43lzJYg7SW7B6jJzPnKv7Z0Y1KWYsg 8GHDzHG3jmo4/F6/RhiQdboa5zM6H4z1hssUqhZZbSYFrdCDfA34pxgeeOH9WOPDs81G iv7KeYz8OIfbr8b7YPRLq71xXfNaRx48uUM2CVhSJDzoS5d6Nsugy8/f27yqbWizRuah ILdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dabbelt-com.20210112.gappssmtp.com header.s=20210112 header.b=YBCZBfTI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id z12-20020a170902cccc00b0014d6649388bsi9291994ple.613.2022.03.11.15.05.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Mar 2022 15:05:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@dabbelt-com.20210112.gappssmtp.com header.s=20210112 header.b=YBCZBfTI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 52F6E19753F; Fri, 11 Mar 2022 14:01:15 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244438AbiCJUIG (ORCPT + 99 others); Thu, 10 Mar 2022 15:08:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238154AbiCJUIF (ORCPT ); Thu, 10 Mar 2022 15:08:05 -0500 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B658199E1D for ; Thu, 10 Mar 2022 12:07:04 -0800 (PST) Received: by mail-pl1-x629.google.com with SMTP id e2so5838789pls.10 for ; Thu, 10 Mar 2022 12:07:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20210112.gappssmtp.com; s=20210112; h=date:subject:in-reply-to:cc:from:to:message-id:mime-version :content-transfer-encoding; bh=Ppb+nGqWIW/h/QwBcLw4pfKIt8cQodBBM6cAdLT5fmg=; b=YBCZBfTIz23WWu52f/w33APGnaMo4Ft4vbVYLvHDN5C8XSlriqdDpZ2Eohqo/r8lOM GbJ393d6CB40bzKpuc7X+GXaJ93iAZHIZCnVQsc8VjEtG3zEaldDyQffxuWaZmbaxUhg nomlAeOcgZixR3aA5pCDXs3fcAz4LForgtfbNVXWUQ1SkBqCNH1a/6TZFAGl25xBXKDT ZPLlVFfx2w5RC1Q2gbS9fwGkNeCMwKcHUiMGPU0ZI2Vi7xCO+xRkwPsBQYho/397MX0+ O88MiL4bFACHTX0DbUkIq+05yugAALYXQVQMLvD6dkxqaXz2TdeOEa2z5Qk7YmBWJhNv fTQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:subject:in-reply-to:cc:from:to:message-id :mime-version:content-transfer-encoding; bh=Ppb+nGqWIW/h/QwBcLw4pfKIt8cQodBBM6cAdLT5fmg=; b=zfSwmQO1ZAu60mZoI4JwMfMG1H7pzQ4I3+BezLOedOPv51EqYfa2bshax3EnObf0ys Zit6NP7B81ZmRa4gagsDlZU5BIaFV5kvcy6TZLQdJSIHOH99+Z1yKY2G/LxJILdoUi0h lnOK5R3RZhLsA8gdZrRuus3j/4NX5za4H5whiMRObZOgBfzfMoLihckT9eaKYi2YwiNs AJzXfrsJskGuNPOgiR8//Cvf5Emq70M887PCYm5fO5jjM/i3o42hznwrr4nnpemyn21X JxnRzX7Szv+SbIEIqbwuQnbno130Cg7ssZwrdcJpgFfyLJ7DnRJdsA9NuhhYC210iGNp WDnA== X-Gm-Message-State: AOAM531ClQ2g4E7IOcqaSBE2bt42ExUYbDYZFng4XAxwQk6FdZKTnvUo PVA/uc9M9H6LA0272eak8NKz6A== X-Received: by 2002:a17:90b:1e01:b0:1bf:5f6e:cbef with SMTP id pg1-20020a17090b1e0100b001bf5f6ecbefmr6853622pjb.130.1646942823454; Thu, 10 Mar 2022 12:07:03 -0800 (PST) Received: from localhost ([12.3.194.138]) by smtp.gmail.com with ESMTPSA id a32-20020a631a20000000b003756899829csm6258878pga.58.2022.03.10.12.07.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Mar 2022 12:07:02 -0800 (PST) Date: Thu, 10 Mar 2022 12:07:02 -0800 (PST) X-Google-Original-Date: Thu, 10 Mar 2022 12:06:07 PST (-0800) Subject: Re: [PATCH] riscv: alternative only works on !XIP_KERNEL In-Reply-To: <20220210164943.2646-1-jszhang@kernel.org> CC: Paul Walmsley , aou@eecs.berkeley.edu, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, heiko@sntech.de From: Palmer Dabbelt To: jszhang@kernel.org Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 On Thu, 10 Feb 2022 08:49:43 PST (-0800), jszhang@kernel.org wrote: > The alternative mechanism needs runtime code patching, it can't work > on XIP_KERNEL. And the errata workarounds are implemented via the > alternative mechanism. So add !XIP_KERNEL dependency for alternative > and erratas. > > Signed-off-by: Jisheng Zhang > --- > arch/riscv/Kconfig.erratas | 1 + > arch/riscv/Kconfig.socs | 4 ++-- > 2 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/arch/riscv/Kconfig.erratas b/arch/riscv/Kconfig.erratas > index b44d6ecdb46e..0aacd7052585 100644 > --- a/arch/riscv/Kconfig.erratas > +++ b/arch/riscv/Kconfig.erratas > @@ -2,6 +2,7 @@ menu "CPU errata selection" > > config RISCV_ERRATA_ALTERNATIVE > bool "RISC-V alternative scheme" > + depends on !XIP_KERNEL > default y > help > This Kconfig allows the kernel to automatically patch the > diff --git a/arch/riscv/Kconfig.socs b/arch/riscv/Kconfig.socs > index 6ec44a22278a..c112ab2a9052 100644 > --- a/arch/riscv/Kconfig.socs > +++ b/arch/riscv/Kconfig.socs > @@ -14,8 +14,8 @@ config SOC_SIFIVE > select CLK_SIFIVE > select CLK_SIFIVE_PRCI > select SIFIVE_PLIC > - select RISCV_ERRATA_ALTERNATIVE > - select ERRATA_SIFIVE > + select RISCV_ERRATA_ALTERNATIVE if !XIP_KERNEL > + select ERRATA_SIFIVE if !XIP_KERNEL > help > This enables support for SiFive SoC platform hardware. Thanks, this is on fixes.