]> xenbits.xensource.com Git - people/larsk/xen.git/commitdiff
xen/arm: cpuerrata: Match register size with value size in check_workaround_*
authorJulien Grall <julien.grall@arm.com>
Tue, 26 Mar 2019 20:53:09 +0000 (20:53 +0000)
committerJulien Grall <julien.grall@arm.com>
Thu, 3 Oct 2019 10:38:30 +0000 (11:38 +0100)
Clang is pickier than GCC for the register size in asm statement. It
expects the register size to match the value size.

The asm statement expects a 32-bit (resp. 64-bit) value on Arm32
(resp. Arm64) whereas the value is a boolean (Clang consider to be
32-bit).

It would be possible to impose 32-bit register for both architecture
but this require the code to use __OP32. However, it does not really
improve the assembly generated. Instead, replace switch the variable
to use register_t.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
xen/include/asm-arm/cpuerrata.h

index 55ddfda2721de0207562dce280ce5df5d9cea28d..88ef3ca934745c81334f92c559f6d93aeba123c4 100644 (file)
@@ -14,7 +14,7 @@ static inline bool check_workaround_##erratum(void)             \
         return false;                                           \
     else                                                        \
     {                                                           \
-        bool ret;                                               \
+        register_t ret;                                         \
                                                                 \
         asm volatile (ALTERNATIVE("mov %0, #0",                 \
                                   "mov %0, #1",                 \