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@citrix.com>
Reviewed-by: Julien Grall <jgrall@amazon.com>
This commit is contained in:
Roger Pau Monné authored and Jan Beulich committed 2023-06-13 11:13:39 +02:00
1 parent 7d5e58730d
commit f4be887879
2 files changed
+5 -2

No files matched your search

+2
View File
@@ -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(&region, 0);
}
#endif
/*
* Local variables:
+3 -2
View File
@@ -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;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.