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 X-Spam-Level: X-Spam-Status: No, score=-10.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8AADCC433B4 for ; Tue, 27 Apr 2021 06:44:19 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B92B960FDC for ; Tue, 27 Apr 2021 06:44:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B92B960FDC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ghiti.fr Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 401CE6B0036; Tue, 27 Apr 2021 02:44:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3C5336B006E; Tue, 27 Apr 2021 02:44:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 279486B0070; Tue, 27 Apr 2021 02:44:18 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0032.hostedemail.com [216.40.44.32]) by kanga.kvack.org (Postfix) with ESMTP id 0A3E56B0036 for ; Tue, 27 Apr 2021 02:44:18 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id AFB3B4DBD for ; Tue, 27 Apr 2021 06:44:17 +0000 (UTC) X-FDA: 78077207754.07.F5F0290 Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by imf30.hostedemail.com (Postfix) with ESMTP id AC86EE00011D for ; Tue, 27 Apr 2021 06:43:57 +0000 (UTC) X-Originating-IP: 2.7.49.219 Received: from [192.168.1.12] (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 4272660007; Tue, 27 Apr 2021 06:44:11 +0000 (UTC) Subject: Re: [PATCH v8] RISC-V: enable XIP To: Naresh Kamboju , Palmer Dabbelt , vitaly.wool@konsulko.com Cc: Paul Walmsley , Albert Ou , linux-riscv , open list , Linux-Arch , linux-mm , lkft-triage@lists.linaro.org References: From: Alex Ghiti Message-ID: <3b6ff653-f29f-3230-201d-8ca756346792@ghiti.fr> Date: Tue, 27 Apr 2021 02:44:11 -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 X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: AC86EE00011D X-Stat-Signature: fdx619paxzsj9kx5jr38uyrjqsagn15z Received-SPF: none (ghiti.fr>: No applicable sender policy available) receiver=imf30; identity=mailfrom; envelope-from=""; helo=relay3-d.mail.gandi.net; client-ip=217.70.183.195 X-HE-DKIM-Result: none/none X-HE-Tag: 1619505837-581864 Content-Transfer-Encoding: quoted-printable 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: Le 4/26/21 =E0 12:46 PM, Naresh Kamboju a =E9crit=A0: > my two cents, >=20 > The riscv build failed on Linux -next 20210426 tag kernel due to > below warnings / errors. > Following builds failed. > - riscv (tinyconfig) with gcc-8 > - riscv (allnoconfig) with gcc-8 > - riscv (tinyconfig) with gcc-9 > - riscv (allnoconfig) with gcc-9 > - riscv (tinyconfig) with gcc-10 > - riscv (allnoconfig) with gcc-10 >=20 >>>>> diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c >>>>> index 30e4af0fd50c..2ddf654c72bb 100644 >>>>> --- a/arch/riscv/kernel/setup.c >>>>> +++ b/arch/riscv/kernel/setup.c >>>>> @@ -50,7 +50,11 @@ struct screen_info screen_info __section(".data"= ) =3D { >>>>> * This is used before the kernel initializes the BSS so it can't= be in the >>>>> * BSS. >>>>> */ >>>>> -atomic_t hart_lottery __section(".sdata"); >>>>> +atomic_t hart_lottery __section(".sdata") >>>>> +#ifdef CONFIG_XIP_KERNEL >>>>> +=3D ATOMIC_INIT(0xC001BEEF) >>>>> +#endif >>>>> +; >>>>> unsigned long boot_cpu_hartid; >>>>> static DEFINE_PER_CPU(struct cpu, cpu_devices); >>>>> >>>>> @@ -254,7 +258,7 @@ void __init setup_arch(char **cmdline_p) >>>>> #if IS_ENABLED(CONFIG_BUILTIN_DTB) >>>>> unflatten_and_copy_device_tree(); >>>>> #else >>>>> - if (early_init_dt_verify(__va(dtb_early_pa))) >>>>> + if (early_init_dt_verify(__va(XIP_FIXUP(dtb_early_pa)))) >=20 > arch/riscv/kernel/setup.c: In function 'setup_arch': > arch/riscv/kernel/setup.c:284:32: error: implicit declaration of > function 'XIP_FIXUP' [-Werror=3Dimplicit-function-declaration] > if (early_init_dt_verify(__va(XIP_FIXUP(dtb_early_pa)))) > ^~~~~~~~~ > arch/riscv/include/asm/page.h:112:62: note: in definition of macro > 'linear_mapping_pa_to_va' > #define linear_mapping_pa_to_va(x) ((void *)((unsigned long)(x) + > va_pa_offset)) > ^ > arch/riscv/include/asm/page.h:156:27: note: in expansion of macro > '__pa_to_va_nodebug' > #define __va(x) ((void *)__pa_to_va_nodebug((phys_addr_t)(x))) > ^~~~~~~~~~~~~~~~~~ > arch/riscv/kernel/setup.c:284:27: note: in expansion of macro '__va' > if (early_init_dt_verify(__va(XIP_FIXUP(dtb_early_pa)))) > ^~~~ > cc1: some warnings being treated as errors >=20 > Reported-by: Naresh Kamboju >=20 >=20 > steps to reproduce: > --------------------------- > # TuxMake is a command line tool and Python library that provides > # portable and repeatable Linux kernel builds across a variety of > # architectures, toolchains, kernel configurations, and make targets. > # > # TuxMake supports the concept of runtimes. > # See https://docs.tuxmake.org/runtimes/, for that to work it requires > # that you install podman or docker on your system. > # > # To install tuxmake on your system globally: > # sudo pip3 install -U tuxmake > # > # See https://docs.tuxmake.org/ for complete documentation. >=20 >=20 > tuxmake --runtime podman --target-arch riscv --toolchain gcc-8 > --kconfig allnoconfig > Thank you Naresh for the report, I will fix that today. Thanks again, Alex > -- > Linaro LKFT > https://lkft.linaro.org >=20 > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv >=20