|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] x86/ucode: Turn microcode_init_cache() into a presmp_initcall
commit 29a4fbf60a34c9b7803125651e4371c651d298ee
Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Sat Oct 26 18:05:39 2024 +0100
Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Tue Nov 5 23:42:30 2024 +0000
x86/ucode: Turn microcode_init_cache() into a presmp_initcall
There's no need for microcode_init_cache() to be called exactly where it is
in
__start_xen(). All that matters is it must be after xmalloc() is available
and before APs start up.
As a consequence, microcode_init_cache() runs a little later on boot now.
No functional change.
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
Reviewed-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>
---
xen/arch/x86/cpu/microcode/core.c | 4 +++-
xen/arch/x86/include/asm/microcode.h | 1 -
xen/arch/x86/setup.c | 2 --
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/xen/arch/x86/cpu/microcode/core.c
b/xen/arch/x86/cpu/microcode/core.c
index 8d916d891e..9a2cc631d2 100644
--- a/xen/arch/x86/cpu/microcode/core.c
+++ b/xen/arch/x86/cpu/microcode/core.c
@@ -819,8 +819,9 @@ static int __init early_update_cache(const void *data,
size_t len)
return rc;
}
-int __init microcode_init_cache(struct boot_info *bi)
+static int __init cf_check microcode_init_cache(void)
{
+ struct boot_info *bi = &xen_boot_info;
int rc = 0;
if ( !ucode_ops.apply_microcode )
@@ -838,6 +839,7 @@ int __init microcode_init_cache(struct boot_info *bi)
return rc;
}
+presmp_initcall(microcode_init_cache);
/* BSP calls this function to parse ucode blob and then apply an update. */
static int __init early_microcode_update_cpu(void)
diff --git a/xen/arch/x86/include/asm/microcode.h
b/xen/arch/x86/include/asm/microcode.h
index a278773f8b..c62c131fd0 100644
--- a/xen/arch/x86/include/asm/microcode.h
+++ b/xen/arch/x86/include/asm/microcode.h
@@ -28,6 +28,5 @@ int microcode_update_one(void);
struct boot_info;
int early_microcode_init(struct boot_info *bi);
-int microcode_init_cache(struct boot_info *bi);
#endif /* ASM_X86__MICROCODE_H */
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index 177f4024ab..5db57e1b1a 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -1952,8 +1952,6 @@ void asmlinkage __init noreturn __start_xen(void)
timer_init();
- microcode_init_cache(bi); /* Needs xmalloc() */
-
tsx_init(); /* Needs microcode. May change HLE/RTM feature bits. */
calculate_raw_cpu_policy(); /* Needs microcode. No other dependenices. */
--
generated by git-patchbot for /home/xen/git/xen.git#staging
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |