[patch 35/37] x86/smpboot: Support parallel startup of secondary CPUs

Thomas Gleixner tglx at linutronix.de
Mon Apr 24 10:58:36 PDT 2023


On Sat, Apr 15 2023 at 23:06, Thomas Gleixner wrote:

> On Sat, Apr 15 2023 at 09:22, Brian Gerst wrote:
>> On Fri, Apr 14, 2023 at 7:45 PM Thomas Gleixner <tglx at linutronix.de> wrote:
>>> @@ -248,10 +311,20 @@ SYM_INNER_LABEL(secondary_startup_64_no_
>>>          *
>>>          * RDX contains the per-cpu offset
>>>          */
>>> -       movq    pcpu_hot + X86_current_task(%rdx), %rax
>>> -       movq    TASK_threadsp(%rax), %rsp
>>> +       movq    pcpu_hot + X86_top_of_stack(%rdx), %rsp
>>
>> Switching to using pcpu_hot.top_of_stack is ok, but it's not
>> completely equivalent.  top_of_stack points to the end of the pt_regs
>> structure, while the kernel stack starts below pt_regs even for kernel
>> threads.  So you need to subtract PTREGS_SIZE from the stack pointer
>> after this.
>>
>> This change should also be a separate patch.
>
> You're right on both counts.

Actually no. We can't do that as this breaks suspend/resume (again).

/me drops it.



More information about the linux-riscv mailing list