mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
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:
1 parent
7d5e58730d
commit
f4be887879
2 files changed
+5
-2
No files matched your search
@@ -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:
|
||||
|
||||
@@ -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;
|
||||
|
||||