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.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 08041C433B4 for ; Mon, 26 Apr 2021 16:46:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 786496101C for ; Mon, 26 Apr 2021 16:46:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 786496101C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B83986B0036; Mon, 26 Apr 2021 12:46:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B329C6B006E; Mon, 26 Apr 2021 12:46:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9FA1A6B0070; Mon, 26 Apr 2021 12:46:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0233.hostedemail.com [216.40.44.233]) by kanga.kvack.org (Postfix) with ESMTP id 82D2F6B0036 for ; Mon, 26 Apr 2021 12:46:31 -0400 (EDT) Received: from smtpin38.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 3C5355923C07 for ; Mon, 26 Apr 2021 16:46:31 +0000 (UTC) X-FDA: 78075096582.38.B7A460D Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) by imf04.hostedemail.com (Postfix) with ESMTP id 94D3C3C3 for ; Mon, 26 Apr 2021 16:46:27 +0000 (UTC) Received: by mail-ej1-f50.google.com with SMTP id r12so85447536ejr.5 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=F16iArwMKVGPPDLBJK8p/qDsK4rTo2TZLl6ej4Ofdx75lAH7TofHexz3PunSII6NJk CUCjn5MpVogifZ1Vec4FPE8iAyILG+sG3zbcjJabp6T+/nfxxg4SzX4xf7YNHXKnAFvh kqPQlFIJGOAJ6YkjaN/4XSjvl9uiIe85f+yyNqAjnBfW4n6RVDZ1irDMjteXRKcMlID1 dObIUXISI8OHUbPc2mohmNG3W/WY+5S9/I8EsuqlG60t1yLRAAfrbl7i84lIupsECIgh wxtQVukjGOot/frvTPAXW2LGamPXQc+7KAjPmW2la8TXbysYuiQgVh5st3KTxpesCs6K N1DQ== X-Gm-Message-State: AOAM532RSpvAFK4u7Ry1CjQ5GP8YmKZ9GTenaTZgVvNDMIUUmrh5txIA c4rsNnvvKx3Wp2ZQ5mDVtnbWtRwmz0jlibL+iRPMJQ== X-Google-Smtp-Source: ABdhPJws/y0oULVP57G4/mhkzRlFFYXwQtjXS/r9gsn/T4CCZJ9e2nplrFWa9TdmZd0Bs4ayfImWcKyFyY4sxmAp7k0= 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" X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 94D3C3C3 X-Stat-Signature: idygmsao6o1buzk41koqputt7gjpucne Received-SPF: none (linaro.org>: No applicable sender policy available) receiver=imf04; identity=mailfrom; envelope-from=""; helo=mail-ej1-f50.google.com; client-ip=209.85.218.50 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1619455587-22818 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: 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