Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp3790490pxy; Mon, 26 Apr 2021 09:47:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXbde6sn4EcOTh67BsBO6dt5qk5gZCS67zEf2tQhAW38PVZ6g/46TK7bptFqBpSAiQv5R+ X-Received: by 2002:a17:90a:9511:: with SMTP id t17mr23953562pjo.235.1619455641403; Mon, 26 Apr 2021 09:47:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619455641; cv=none; d=google.com; s=arc-20160816; b=wU0+TtzaELX/CxARtcA47dc4NPJD5F5KexzmnR8tgXo1ia8Tv32oP09R7kEqAFSCPf dyDpr2PuAoGXSGKHk8cWOWS2+AEhzutyYmIa2TSQJEyqgG0rV1YwWYcuBr35ZdvvtVA6 UxlQ32CWgdHxP9wo4Ibx8CPfaDBQgTxIacqb0kKYLJbgcJDVIiW9zNnnmCwFfma3o+G2 y3TeY0chVTC0sIlPel9kpieLvThhE1hWE+2NZsOfSM1MIbGnCj1h9VSnvjXMmIABXLKs 18DCQk3t/RAvp4T4SsRt0Ir8E990yLvFtM1QEenrHe2keh+w1hu+6obKUyQUvPNcR1fY kQcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=S+cgDeAfZzzmuCTTq4lC5PvZ1hvbfvFcMRWuLEIgDNM=; b=COaZjZD7Nf48wX481TK4AHFnVtfC2ty33chD1GDO/rGpzgEOpgQriRpadgbHMA989l 3EFZdfRmn/uRSqMNbvV2bto/iEAOmf5J7NZfWtwNsQYlQhCNRdeRY3fKo6dVEAJdSEsj k33f6GWHje2AHXrznllbyYleEvB1BhOnED95PQbMARJel+1LdNCqeLvUQ9Pg2CqiTS89 MVVlmAl3VOP2ccHh5NEe6FWbS4OPYnvjpeWFso0Q0IQDnFvnDvxKG0asIABJlfuENdNA sZfN61uNdvqEBSuHFhghOLI38eIBkO98tlJFd7+2YClPgjj8ofAnAHz15gT2owjdZrbm iWJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lkECTZxt; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o131si341412pfd.215.2021.04.26.09.47.08; Mon, 26 Apr 2021 09:47:21 -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; dkim=pass header.i=@linaro.org header.s=google header.b=lkECTZxt; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234693AbhDZQrL (ORCPT + 99 others); Mon, 26 Apr 2021 12:47:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234595AbhDZQrL (ORCPT ); Mon, 26 Apr 2021 12:47:11 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61AEBC061574 for ; Mon, 26 Apr 2021 09:46:29 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id u17so85526133ejk.2 for ; Mon, 26 Apr 2021 09:46:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=S+cgDeAfZzzmuCTTq4lC5PvZ1hvbfvFcMRWuLEIgDNM=; b=lkECTZxtYGXafDLJP7gcUe64u+wM11kk0hx2AVgnxCgsxjNdrKGXelp0XWzjzW8BaV NiJWu26mb53eN/c3AjVrdTyjhbQU8SVvQGEaZCWuaB0IHie1Y7FC+5jurVJIviX0HYt7 D8mdWbMEF8cqs3fPeUQ0ilHqkrRBSevyC7rL61Gj6Yq7Qbklr7m2UtnK0I9TlbXKbCpy /cbvn1TLcOxrOFC+bWhLc1IUWFFowNWOTpHL92+8AGzgtTvS3Yvx+imkFtEHDCFsQ6lw UERhY0vkTjn13WVfN9A2gBJi9+S7DnXOeFKWv2rK3LenyunLxtbckBK0Sej49btV/Rm0 7Fnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=S+cgDeAfZzzmuCTTq4lC5PvZ1hvbfvFcMRWuLEIgDNM=; b=orgDLw14Mspan1n71TrBUfo/gFysTgoUbQfIBlD9/JPY1MvDZCQTmZ2pd9tBH2gCC8 goBstQWNDU6+QHfLMOOuxBhd5vGRbuFVHYt4WHQCKOx71E6TwPpzfpUjtPGubAtuUwDY 98RtUYaAfRrCDtHCNtV79TUXYNit9Fe+h6rv8dPKSDxAADLmpYMK3vKanvhIRZPimrKd sOyYsreuD1JquQxKPB5XbaKiRVan4b7W10NHU7vcZhernrch6Arns0YLup/WCY4n7nV8 9qXZXUPmNzqCEgKG7HiaN9HRutnQyYz4IrtVbjkiOY5LLJZQBEU4cgwVpUCUuk79fKnp urjA== X-Gm-Message-State: AOAM532A/DdmxKc0XO7wRrNbIG65JW9rcH8zp/EagWhPmReNzffbM8gF 2kSO2JLFvoWyIcbdzSW5kJflXoyZCw/v304hN1Sgkg== X-Received: by 2002:a17:906:688e:: with SMTP id n14mr8886230ejr.375.1619455587957; Mon, 26 Apr 2021 09:46:27 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Naresh Kamboju Date: Mon, 26 Apr 2021 22:16:16 +0530 Message-ID: Subject: Re: [PATCH v8] RISC-V: enable XIP To: Palmer Dabbelt , alex@ghiti.fr, vitaly.wool@konsulko.com Cc: Paul Walmsley , Albert Ou , linux-riscv , open list , Linux-Arch , linux-mm , lkft-triage@lists.linaro.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 -- Linaro LKFT https://lkft.linaro.org