[PATCH v1 1/7] RISC-V: introduce ARCH_FOO kconfig aliases for SOC_FOO symbols

Damien Le Moal damien.lemoal at opensource.wdc.com
Tue Jan 10 14:22:47 PST 2023


On 1/11/23 06:14, Geert Uytterhoeven wrote:
> Hi Conor,
> 
> On Mon, Nov 21, 2022 at 11:18 PM Conor Dooley <conor at kernel.org> wrote:
>> From: Conor Dooley <conor.dooley at microchip.com>
>>
>> To facilitate a transfer from SOC_FOO to ARCH_FOO, over a release cycle,
>> introduce some aliases so that drivers etc that use the SOC_FOO symbols
>> can be converted.
>>
>> Signed-off-by: Conor Dooley <conor.dooley at microchip.com>
> 
> Thanks for your patch, which is now commit fc43211939bb6874
> ("RISC-V: kconfig.socs: convert usage of SOC_CANAAN to
> ARCH_CANAAN") in riscv/for-next
> 
>> --- a/arch/riscv/Kconfig.socs
>> +++ b/arch/riscv/Kconfig.socs
> 
>> @@ -73,6 +91,9 @@ config SOC_CANAAN_K210_DTB_BUILTIN
>>           This option should be selected if no bootloader is being used.
>>           If unsure, say Y.
>>
>> +config ARCH_CANAAN_K210_DTB_SOURCE
>> +       def_bool SOC_CANAAN_K210_DTB_SOURCE
> 
> This is not correct, as SOC_CANAAN_K210_DTB_SOURCE below is
> not a bool, but a string.
> 
>> +
>>  config SOC_CANAAN_K210_DTB_SOURCE
>>         string "Source file for the Canaan Kendryte K210 builtin DTB"
>>         depends on SOC_CANAAN
> 
> Hence
> 
>     obj-$(CONFIG_ARCH_CANAAN_K210_DTB_BUILTIN) += $(addsuffix .dtb.o,
> $(CONFIG_ARCH_CANAAN_K210_DTB_SOURCE))
> 
> will do the wrong thing later, and I get a non-bootable system (no output)
> on my MAiX-BiT.
> 
> Unfortunately there is no def_string, so I don't think we can fix this
> in a backwards-compatible way, and have to replace all
> SOC_CANAAN_K210_DTB_SOURCE by ARCH_CANAAN_K210_DTB_SOURCE,
> and urging users to update their .config manually.

Yes, the default built-in dtb is set to k210_generic.dts since we have a
only generic nommu_k210[_sdcard] defconfig. We could add defconfigs per
board type, but that is not the common approach.

By the way, I recall some pushback with the renaming of SOC_XXX to
ARCH_XXX. I personally do not like it and Christoph suggested the revers
approach of renaming arm ARCH_XXX to something else instead. I did not
follow further on that discussion, but it looks like the riscv SOC_XXX
renaming went through ?

> 
> Gr{oetje,eeting}s,
> 
>                         Geert
> 
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org
> 
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                 -- Linus Torvalds

-- 
Damien Le Moal
Western Digital Research




More information about the linux-riscv mailing list