Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp4246842pxy; Mon, 26 Apr 2021 23:45:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwjjHNxYbDL7C5rFeiSFluVut6JLF5nLn2zKmYf33a4r9DNmWcWJ0CfOp24+tK4BXTEC3ad X-Received: by 2002:a17:90b:1c0f:: with SMTP id oc15mr26454456pjb.228.1619505903535; Mon, 26 Apr 2021 23:45:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619505903; cv=none; d=google.com; s=arc-20160816; b=HfXVHjbz/XwEz5t1MtlP1GdyYv5+ZglEKoFOtum+QLQidUmhO11NNQhWFtIFjKErS0 YRBXMmZ3hTUTwYagcfEyVYheiIdNLOaq9z0S2Xliq4vaz2NYPaaSAOMSiwpF2uL69AeZ uCyDKgiLlh2Syq64Ijql7IjdxLUVpBjhMx4wMMQeyYS2g01Y9qD3EDoaNihwdhY0HMy7 NV/2RTwhcM+bdMlIoZ/hrKiWISwuTO8sYLNjnGcvvFQ4SUkUmwqhRdnqSSG2X3X0HuSC vKaBFARxyMe6Z61K4JBm4GEcXIq7ceSD5p+Ok7Zcm99M2vOKTCpc2UyVSEpyaG84RAwM IZFw== 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=qX8XoVDFV9zM92+v+Mcotb4X6xQJFvPhVLnMuS5VXTU=; b=w2tiLuaMFBNDn/rOKfqKW8JlzOV0F4YAeeajQNhkCXXYHvz6F+2IsG4pmMbw0RIGOK tadh8NmvSLmmN/8mLeKEMmlJD7gfp5uk4LOk5JZ/rdPXix61MhIRXrpl8XsU0+B3OInl hTiJGdk0ysc20DVwMenZEaYsDloRBMfHpDZ9wiotOJnztZR1WsMu5W8NuewdXTRRC7F7 TdC/oeGsQ4Po+YubfCWmA0lua0c7GHm3aEfyhd66yGSbg43ENJDjZYApDDz0AhoXvJJU enKsz6hZ2FZvyDGDX2uXyFTqUXj5KSERrV6F9eTpx5o+2pj6+XJ9IHeqZr1sgd0Z4MWf T6yw== 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 h12si5313333pll.396.2021.04.26.23.44.50; Mon, 26 Apr 2021 23:45:03 -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 S230050AbhD0GpA (ORCPT + 99 others); Tue, 27 Apr 2021 02:45:00 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:46381 "EHLO relay3-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229578AbhD0Go7 (ORCPT ); Tue, 27 Apr 2021 02:44:59 -0400 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 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 4/26/21 ? 12:46 PM, Naresh Kamboju a ?crit?: > my two cents, > > 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 > >>>>> 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") = { >>>>> * 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 >>>>> += 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)))) > > arch/riscv/kernel/setup.c: In function 'setup_arch': > arch/riscv/kernel/setup.c:284:32: error: implicit declaration of > function 'XIP_FIXUP' [-Werror=implicit-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 > > Reported-by: Naresh Kamboju > > > 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. > > > 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 > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv >