mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
x86/alternatives: Introduce init_or_livepatch_ro_after_init
... and use it for ideal_nops and toolchain_nops_are_ideal; both of which are invariant after arch_init_ideal_nops() has run. No functional change. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
1 parent
ea20eafb46
commit
0dc67f3aab
2 files changed
+10
-8
No files matched your search
@@ -47,7 +47,7 @@ static const unsigned char p6_nops[] init_or_livepatch_const = {
|
||||
};
|
||||
#endif
|
||||
|
||||
static const unsigned char *ideal_nops init_or_livepatch_data = p6_nops;
|
||||
static const unsigned char *init_or_livepatch_ro_after_init ideal_nops = p6_nops;
|
||||
|
||||
#ifdef HAVE_AS_NOPS_DIRECTIVE
|
||||
|
||||
@@ -56,7 +56,7 @@ asm ( ".pushsection .init.rodata, \"a\", @progbits\n\t"
|
||||
"toolchain_nops: .nops " __stringify(ASM_NOP_MAX) "\n\t"
|
||||
".popsection\n\t");
|
||||
extern char toolchain_nops[ASM_NOP_MAX];
|
||||
static bool init_or_livepatch_read_mostly toolchain_nops_are_ideal;
|
||||
static bool init_or_livepatch_ro_after_init toolchain_nops_are_ideal;
|
||||
|
||||
#else
|
||||
# define toolchain_nops_are_ideal false
|
||||
|
||||
@@ -28,14 +28,16 @@
|
||||
# define init_or_livepatch_const
|
||||
# define init_or_livepatch_constrel
|
||||
# define init_or_livepatch_data
|
||||
# define init_or_livepatch_read_mostly __read_mostly
|
||||
# define init_or_livepatch_read_mostly __read_mostly
|
||||
# define init_or_livepatch_ro_after_init __ro_after_init
|
||||
# define init_or_livepatch
|
||||
#else /* !CONFIG_LIVEPATCH */
|
||||
# define init_or_livepatch_const __initconst
|
||||
# define init_or_livepatch_constrel __initconstrel
|
||||
# define init_or_livepatch_data __initdata
|
||||
# define init_or_livepatch_read_mostly __initdata
|
||||
# define init_or_livepatch __init
|
||||
# define init_or_livepatch_const __initconst
|
||||
# define init_or_livepatch_constrel __initconstrel
|
||||
# define init_or_livepatch_data __initdata
|
||||
# define init_or_livepatch_read_mostly __initdata
|
||||
# define init_or_livepatch_ro_after_init __initdata
|
||||
# define init_or_livepatch __init
|
||||
#endif /* !CONFIG_LIVEPATCH */
|
||||
|
||||
/* These macros are used to mark some functions or
|
||||
|
||||