lkml.org 
[lkml]   [2023]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
SubjectRe: [External] Re: [PATCH v13 00/11] Parallel CPU bringup for x86_64
From


> static bool prepare_parallel_bringup(void)
> {
> bool has_sev_es = IS_ENABLED(CONFIG_AMD_MEM_ENCRYPT) &&
> static_branch_unlikely(&sev_es_enable_key);

sev_es_enable_key is only defined when CONFIG_AMD_MEM_ENCRYPT is
enabled, so it gives a build error when AMD_MEM_ENCRYPT is disabled.
maybe below is better?

diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 282cca020777..e7df41436cfe 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1519,8 +1519,12 @@ void __init smp_prepare_cpus_common(void)
*/
static bool prepare_parallel_bringup(void)
{
- bool has_sev_es = IS_ENABLED(CONFIG_AMD_MEM_ENCRYPT) &&
- static_branch_unlikely(&sev_es_enable_key);
+ bool has_sev_es;
+#ifdef CONFIG_AMD_MEM_ENCRYPT
+ has_sev_es = static_branch_unlikely(&sev_es_enable_key);
+#else
+ has_sev_es = 0;
+#endif

if (IS_ENABLED(CONFIG_X86_32))
return false;
\
 
 \ /
  Last update: 2023-03-27 00:50    [W:0.158 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site