[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] livepatch: apply_alternatives() is only used for livepatch
commit f4be887879c2af52a91c7511579ef01eb007eabb Author: Roger Pau Monné <roger.pau@xxxxxxxxxx> AuthorDate: Tue Jun 13 11:13:39 2023 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Tue Jun 13 11:13:39 2023 +0200 livepatch: apply_alternatives() is only used for livepatch Guard it with CONFIG_LIVEPATCH. Note alternatives are applied at boot using _apply_alternatives(). Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> Reviewed-by: Julien Grall <jgrall@xxxxxxxxxx> --- xen/arch/arm/alternative.c | 2 ++ xen/arch/x86/alternative.c | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/alternative.c b/xen/arch/arm/alternative.c index 7366af4ea6..016e66978b 100644 --- a/xen/arch/arm/alternative.c +++ b/xen/arch/arm/alternative.c @@ -223,6 +223,7 @@ void __init apply_alternatives_all(void) vunmap(xenmap); } +#ifdef CONFIG_LIVEPATCH int apply_alternatives(const struct alt_instr *start, const struct alt_instr *end) { const struct alt_region region = { @@ -232,6 +233,7 @@ int apply_alternatives(const struct alt_instr *start, const struct alt_instr *en return __apply_alternatives(®ion, 0); } +#endif /* * Local variables: diff --git a/xen/arch/x86/alternative.c b/xen/arch/x86/alternative.c index 99482766b5..21af0e8258 100644 --- a/xen/arch/x86/alternative.c +++ b/xen/arch/x86/alternative.c @@ -358,11 +358,12 @@ static void init_or_livepatch _apply_alternatives(struct alt_instr *start, } } -void init_or_livepatch apply_alternatives(struct alt_instr *start, - struct alt_instr *end) +#ifdef CONFIG_LIVEPATCH +void apply_alternatives(struct alt_instr *start, struct alt_instr *end) { _apply_alternatives(start, end, true); } +#endif static unsigned int __initdata alt_todo; static unsigned int __initdata alt_done; -- generated by git-patchbot for /home/xen/git/xen.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |