lkml.org 
[lkml]   [2023]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 3/6] x86/smpboot: Remove initial_stack on 64-bit
From
Date
On Wed, 2023-02-22 at 17:12 -0500, Brian Gerst wrote:
> @@ -245,11 +245,11 @@ SYM_INNER_LABEL(secondary_startup_64_no_verify, SYM_L_GLOBAL)
>  #ifdef CONFIG_SMP
>         /*
>          * Is this the boot CPU coming up? If so everything is available
> -        * in initial_gs, initial_stack and early_gdt_descr.
> +        * in initial_gs and early_gdt_descr.
>          */
>         movl    smpboot_control(%rip), %edx
>         testl   $STARTUP_SECONDARY, %edx
> -       jz      .Lsetup_cpu
> +       jz      .Linit_cpu0_data
>  
>         /*
>          * For parallel boot, the APIC ID is retrieved from CPUID, and then
> @@ -302,6 +302,10 @@ SYM_INNER_LABEL(secondary_startup_64_no_verify, SYM_L_GLOBAL)
>         hlt
>         jmp     1b
>  
> +.Linit_cpu0_data:
> +       movq    __per_cpu_offset(%rip), %rdx
> +       jmp     .Lsetup_cpu
> +

Aren't all CPUs taking this .Linit_cpu0_data path for non-parallel
startup, not just cpu0? I think you want something more like

.Linit_cpuN_data:
orl $0x0fffffff, %edx
leaq __per_cpu_offset(%rip), %rbx
movq (%rbx,%rdx,8), %rdx
jmp .Lsetup_cpu

[unhandled content-type:application/pkcs7-signature]
\
 
 \ /
  Last update: 2023-03-27 00:33    [W:0.108 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site