Kendryte build warnings

Sean Anderson seanga2 at gmail.com
Tue Jul 28 13:07:32 CEST 2020


On 7/28/20 6:56 AM, Heinrich Schuchardt wrote:
> Hello Sean,
> 
> when I compile for Kendryte K210 I see the following build warnings:
> 
> In file included from drivers/clk/kendryte/clk.c:15:
> include/kendryte/pll.h:46: warning: "nop" redefined
>    46 | #define nop()
>       |
> In file included from ./arch/riscv/include/asm/io.h:13,
>                  from drivers/clk/kendryte/clk.c:7:
> ./arch/riscv/include/asm/barrier.h:16: note: this is the location of the
> previous definition
>    16 | #define nop()  __asm__ __volatile__ ("nop")
>       |
> In file included from ./arch/riscv/include/asm/io.h:13,
>                  from drivers/clk/kendryte/pll.c:8:
> ./arch/riscv/include/asm/barrier.h:16: warning: "nop" redefined
>    16 | #define nop()  __asm__ __volatile__ ("nop")
>       |
> In file included from drivers/clk/kendryte/pll.c:6:
> include/kendryte/pll.h:46: note: this is the location of the previous
> definition
>    46 | #define nop()
>       |
> 
> Should nop() be the assembler instruction nop or nothing?

It should be the assembler instruction. The redefinion is to allow
testing the frequency calculation function on the sandbox architecture
(which has no nops). The actual code which uses the nop is never called,
but it still gets compiled, so I added a shim. Can you send me the
config you are using?

--Sean


More information about the U-Boot mailing list