On 30/01/18 11:29, Julien Grall wrote:
> Hi Andrew,
>
> Thank you for doing the clean-up.
>
> On 30/01/18 11:16, Andrew Cooper wrote:
>> ARM now unconditionally selects HAS_ALTERNATIVE, which has caused the
>> !HAS_ALTERNATIVE code in include/asm-arm/alternative.h to bitrot to
>> the point
>> of failing to compile.
>>
>> Expand all the CONFIG_HAS_ALTERNATIVE references in ARM code.
>>
>> Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com>
>> ---
>> CC: Stefano Stabellini <sstabell...@kernel.org>
>> CC: Julien Grall <julien.gr...@arm.com>
>> CC: Konrad Rzeszutek Wilk <konrad.w...@oracle.com>
>>
>> N.B. Only compile tested
>> ---
>>   xen/arch/arm/xen.lds.S                    |  2 --
>>   xen/include/asm-arm/alternative.h         | 15 ---------------
>>   xen/test/livepatch/xen_hello_world_func.c |  2 +-
>
> You forgot on in include/asm-arm/cpuerrata.h :).

Oops - so I did.  Folded this incremental diff.

~Andrew

diff --git a/xen/include/asm-arm/cpuerrata.h
b/xen/include/asm-arm/cpuerrata.h
index 7de6836..4e45b23 100644
--- a/xen/include/asm-arm/cpuerrata.h
+++ b/xen/include/asm-arm/cpuerrata.h
@@ -7,8 +7,6 @@
 void check_local_cpu_errata(void);
 void enable_errata_workarounds(void);
 
-#ifdef CONFIG_HAS_ALTERNATIVE
-
 #define CHECK_WORKAROUND_HELPER(erratum, feature, arch)         \
 static inline bool check_workaround_##erratum(void)             \
 {                                                               \
@@ -27,19 +25,6 @@ static inline bool
check_workaround_##erratum(void)             \
     }                                                           \
 }
 
-#else /* CONFIG_HAS_ALTERNATIVE */
-
-#define CHECK_WORKAROUND_HELPER(erratum, feature, arch)         \
-static inline bool check_workaround_##erratum(void)             \
-{                                                               \
-    if ( !IS_ENABLED(arch) )                                    \
-        return false;                                           \
-    else                                                        \
-        return unlikely(cpus_have_cap(feature));                \
-}
-
-#endif
-
 CHECK_WORKAROUND_HELPER(766422, ARM32_WORKAROUND_766422, CONFIG_ARM_32)
 CHECK_WORKAROUND_HELPER(834220, ARM64_WORKAROUND_834220, CONFIG_ARM_64)
 


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to