Re: [PATCH] ARM: mtd-xip: work around clang/llvm bug
From: Linus Walleij
Date: Tue Jul 09 2019 - 08:18:13 EST
On Mon, Jul 8, 2019 at 10:31 PM Arnd Bergmann <arnd@xxxxxxxx> wrote:
> -#define xip_iprefetch() do { asm volatile (".rep 8; nop; .endr"); } while (0)
> +#define xip_iprefetch() do { \
> + asm volatile ("nop; nop; nop; nop; nop; nop; nop; nop;"); \
> +} while (0) \
This is certainly an OK fix since we use a row of inline nop at
other places.
However after Russell explained the other nops I didn't understand I located
these in boot/compressed/head.S as this in __start:
.rept 7
__nop
.endr
#ifndef CONFIG_THUMB2_KERNEL
mov r0, r0
#else
And certainly this gets compiled, right?
So does .rept/.endr work better than .rep/.endr, is it simply mis-spelled?
I.e. s/.rep/.rept/g
?
In that case we should explain in the commit that .rep doesn't work
but .rept does.
Yours,
Linus Walleij