[PATCH v8] RISC-V: enable XIP
Alex Ghiti
alex at ghiti.fr
Tue Apr 27 07:44:11 BST 2021
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 <naresh.kamboju at linaro.org>
>
>
> 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 at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv
>
More information about the linux-riscv
mailing list