Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp1343128pxy; Thu, 29 Apr 2021 05:14:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwqE80w/Ul5Q3LgAX2myzXjAu57tp2IQV3C9yaG6QqNZTjOyiovN8CMmHEC56gMCBJwKiMQ X-Received: by 2002:a17:90a:7893:: with SMTP id x19mr39507061pjk.3.1619698497582; Thu, 29 Apr 2021 05:14:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619698497; cv=none; d=google.com; s=arc-20160816; b=eazMCjH7GPJjJNNIiW4QZek0/4rcPtOQH4FBTgJMigdFV7z2etMjGRuEdJCiakypOs QXY7xdM38k+Oxq1bPHmSqGyyZhFjSYWMpR3HTq949sI6txQbDUQyIY7A1Bjtw8HJ5dQ2 fkwVwgJsiyEnMotU3cIE8LUXVj91kQIdd11bZhYd1ZrAmYQKIuPwy8j34QaQDpLBWPRi UqaH6vIKkYlLRFP4LOvO8gUy6aLcaHkxQLNCwY6y8DIYQ4r0hbzZd7Nw/yVE7GClqcmW kXNVPoJeSj9ZrC207hvXQVtqgE91cUk6UDbihOBJ5jeNUCJCOpyMz3XEMjfIjx8jfe0V 4Hog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=3DyHQiZW6yWs3Iu0ELNQ2Mt8b8aNCM30kQlbO6d5Ei4=; b=KjdX4piSezeCXeOqhLW3CQfR98tqWOjWylHCqaArB1wGPWN29PjmsY6KYEEWkGRTP2 GuxocbVEb7QYKu03qYfImPgz5Aob/RMTETU24dKoXp3cUTsb3c+bw7CRTEaGwHUsq0hb Pmg4RM7WGWBy8fQHDnYsD0a3sYGa5CjV8Uqt3ZH9ScLDKMaWgY6INSBXhX3P1ihVe7iw nxuVLVZQzFKBFpQvp54Jj1XBphUzRDTezDTvfGXCX5LTsJbwxO0Fm0DJ0BjpTVCXLLU1 9r20Ud3sRp+dYZBbG+imEVKa7rtJ2CC3K2cUqqGErXur6sqtTYbw6VYuyHD2ZIItKE0G onbQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v11si3369879pfu.198.2021.04.29.05.14.44; Thu, 29 Apr 2021 05:14:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232657AbhD2MOV (ORCPT + 99 others); Thu, 29 Apr 2021 08:14:21 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:51425 "EHLO relay3-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230148AbhD2MOU (ORCPT ); Thu, 29 Apr 2021 08:14:20 -0400 X-Originating-IP: 2.7.49.219 Received: from [192.168.1.100] (lfbn-lyo-1-457-219.w2-7.abo.wanadoo.fr [2.7.49.219]) (Authenticated sender: alex@ghiti.fr) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 5142860008; Thu, 29 Apr 2021 12:13:31 +0000 (UTC) Subject: Re: [PATCH] riscv: Disallow to build XIP_KERNEL with SOC_SIFIVE To: Vitaly Wool Cc: Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-riscv , LKML References: <20210429084541.28083-1-alex@ghiti.fr> From: Alex Ghiti Message-ID: <1a4a0a88-6ff5-66ad-6819-53dd96f76849@ghiti.fr> Date: Thu, 29 Apr 2021 08:13:30 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 4/29/21 ? 5:11 AM, Vitaly Wool a ?crit?: > On Thu, Apr 29, 2021 at 10:47 AM Alexandre Ghiti wrote: >> >> RISCV_ERRATA_ALTERNATIVE patches text at runtime which is not possible when >> the kernel is executed from the flash in XIP mode, and as the SIFIVE >> errata must be fixed somehow, disallow to build a XIP kernel that >> supports SIFIVE socs. > > Could you please hold off this patch for a bit? I will try to come up > with an alternative solution. It should be possible to define a > special section within the RW area and place the functions that need > such patching there. > Not that I like that much but at least we'll keep the ability to use > XIP on SiFive. Ok, I'm wondering why I did not think of that...I'll give it a try just to punish myself. Thanks Vitaly, Alex > > Best regards, > Vitaly > >> Signed-off-by: Alexandre Ghiti >> --- >> arch/riscv/Kconfig.erratas | 2 +- >> arch/riscv/Kconfig.socs | 1 + >> 2 files changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/arch/riscv/Kconfig.erratas b/arch/riscv/Kconfig.erratas >> index d5d03ae8d685..9537dbd67357 100644 >> --- a/arch/riscv/Kconfig.erratas >> +++ b/arch/riscv/Kconfig.erratas >> @@ -2,7 +2,7 @@ menu "CPU errata selection" >> >> config RISCV_ERRATA_ALTERNATIVE >> bool "RISC-V alternative scheme" >> - default y >> + default y if !XIP_KERNEL >> help >> This Kconfig allows the kernel to automatically patch the >> errata required by the execution platform at run time. The >> diff --git a/arch/riscv/Kconfig.socs b/arch/riscv/Kconfig.socs >> index 00c2b205654c..9cb38bc9d7cd 100644 >> --- a/arch/riscv/Kconfig.socs >> +++ b/arch/riscv/Kconfig.socs >> @@ -9,6 +9,7 @@ config SOC_MICROCHIP_POLARFIRE >> >> config SOC_SIFIVE >> bool "SiFive SoCs" >> + depends on !XIP_KERNEL >> select SERIAL_SIFIVE if TTY >> select SERIAL_SIFIVE_CONSOLE if TTY >> select CLK_SIFIVE >> -- >> 2.20.1 >> >> >> _______________________________________________ >> linux-riscv mailing list >> linux-riscv@lists.infradead.org >> http://lists.infradead.org/mailman/listinfo/linux-riscv > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv >