[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] arm/alternatives: Drop the !HAS_ALTERNATIVE infrastructure
commit 351a03aae2352efb5688f7af96c1f3c358d8fb4b Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> AuthorDate: Tue Jan 30 11:08:45 2018 +0000 Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CommitDate: Thu Feb 1 10:54:10 2018 +0000 arm/alternatives: Drop the !HAS_ALTERNATIVE infrastructure 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.cooper3@xxxxxxxxxx> Acked-by: Julien Grall <julien.grall@xxxxxxx> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> --- xen/arch/arm/xen.lds.S | 2 -- xen/include/asm-arm/alternative.h | 15 --------------- xen/include/asm-arm/cpuerrata.h | 15 --------------- xen/test/livepatch/xen_hello_world_func.c | 2 +- 4 files changed, 1 insertion(+), 33 deletions(-) diff --git a/xen/arch/arm/xen.lds.S b/xen/arch/arm/xen.lds.S index c9b9546..b039018 100644 --- a/xen/arch/arm/xen.lds.S +++ b/xen/arch/arm/xen.lds.S @@ -154,14 +154,12 @@ SECTIONS *(.initcall1.init) __initcall_end = .; -#ifdef CONFIG_HAS_ALTERNATIVE . = ALIGN(4); __alt_instructions = .; *(.altinstructions) __alt_instructions_end = .; . = ALIGN(4); *(.altinstr_replacement) -#endif *(.init.data) *(.init.data.rel) diff --git a/xen/include/asm-arm/alternative.h b/xen/include/asm-arm/alternative.h index 6cc9d0d..4e33d1c 100644 --- a/xen/include/asm-arm/alternative.h +++ b/xen/include/asm-arm/alternative.h @@ -3,8 +3,6 @@ #include <asm/cpufeature.h> -#ifdef CONFIG_HAS_ALTERNATIVE - #ifndef __ASSEMBLY__ #include <xen/init.h> @@ -152,17 +150,4 @@ int apply_alternatives(const struct alt_instr *start, const struct alt_instr *en #define ALTERNATIVE(oldinstr, newinstr, ...) \ _ALTERNATIVE_CFG(oldinstr, newinstr, __VA_ARGS__, 1) -#else /* !CONFIG_HAS_ALTERNATIVE */ - -static inline void apply_alternatives_all(void) -{ -} - -static inline int apply_alternatives(void *start, size_t length) -{ - return 0; -} - -#endif - #endif /* __ASM_ALTERNATIVE_H */ 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) diff --git a/xen/test/livepatch/xen_hello_world_func.c b/xen/test/livepatch/xen_hello_world_func.c index 1518f71..b358224 100644 --- a/xen/test/livepatch/xen_hello_world_func.c +++ b/xen/test/livepatch/xen_hello_world_func.c @@ -29,7 +29,7 @@ const char *xen_hello_world(void) rc = __get_user(tmp, non_canonical_addr); BUG_ON(rc != -EFAULT); #endif -#if defined(CONFIG_ARM) && defined(CONFIG_HAS_ALTERNATIVE) +#if defined(CONFIG_ARM) asm(ALTERNATIVE("nop", "nop", LIVEPATCH_FEATURE)); #endif -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |