From: Alistair Delva Date: Mon, 26 Sep 2022 20:47:55 +0000 (+0000) Subject: spl: atf: Fix clang -Wasm-operand-widths warning X-Git-Tag: baikal/mips/sdk5.8.2~5^2~194^2 X-Git-Url: https://git.baikalelectronics.ru/?a=commitdiff_plain;h=5ba393356787a99c87bffc017ddd86485fadfd8f;p=uboot.git spl: atf: Fix clang -Wasm-operand-widths warning common/spl/spl_atf.c:187:51: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths] __asm__ __volatile__("msr DAIF, %0\n\t" : : "r" (daif) : "memory"); ^ common/spl/spl_atf.c:187:34: note: use constraint modifier "w" __asm__ __volatile__("msr DAIF, %0\n\t" : : "r" (daif) : "memory"); ^~ %w0 Use %x0 to match what Linux does in write_sysreg(). Signed-off-by: Alistair Delva Cc: Kever Yang Cc: Michael Walle Cc: Simon Glass Cc: Tom Rini Cc: Nick Desaulniers --- diff --git a/common/spl/spl_atf.c b/common/spl/spl_atf.c index e1b68dd561..bae5c010c8 100644 --- a/common/spl/spl_atf.c +++ b/common/spl/spl_atf.c @@ -184,7 +184,7 @@ __weak struct bl_params *bl2_plat_get_bl31_params_v2(uintptr_t bl32_entry, static inline void raw_write_daif(unsigned int daif) { - __asm__ __volatile__("msr DAIF, %0\n\t" : : "r" (daif) : "memory"); + __asm__ __volatile__("msr DAIF, %x0\n\t" : : "r" (daif) : "memory"); } typedef void (*atf_entry_t)(struct bl31_params *params, void *plat_params);