[RFC PATCH v3 5/7] powerpc: 'current_set' is now a table of task_struct pointers
Nicholas Piggin
npiggin at gmail.com
Wed Oct 3 16:09:11 AEST 2018
On Wed, 3 Oct 2018 08:00:43 +0200
Christophe LEROY <christophe.leroy at c-s.fr> wrote:
> Le 03/10/2018 à 07:41, Nicholas Piggin a écrit :
> > On Mon, 1 Oct 2018 12:30:27 +0000 (UTC)
> > Christophe Leroy <christophe.leroy at c-s.fr> wrote:
> >
> >> The table of pointers 'current_set' has been used for retrieving
> >> the stack and current. They used to be thread_info pointers as
> >> they were pointing to the stack and current was taken from the
> >> 'task' field of the thread_info.
> >>
> >> Now, the pointers of 'current_set' table are now both pointers
> >> to task_struct and pointers to thread_info.
> >>
> >> As they are used to get current, and the stack pointer is
> >> retrieved from current's stack field, this patch changes
> >> their type to task_struct, and renames secondary_ti to
> >> secondary_current.
> >
> > I'm not sure if current_set is actually needed is it? Because
> > 64-bit already initializes paca->ksave / PACAKSAVE. That might
> > be a cleanup to do after your series.
>
> head_64.S contains:
>
> __secondary_start:
> /* Set thread priority to MEDIUM */
> HMT_MEDIUM
>
> /* Initialize the kernel stack */
> LOAD_REG_ADDR(r3, current_set)
> sldi r28,r24,3 /* get current_set[cpu#] */
> ldx r14,r3,r28
> addi r14,r14,THREAD_SIZE-STACK_FRAME_OVERHEAD
> std r14,PACAKSAVE(r13)
Right, I don't *think* that's needed because boot CPU should already
have set PACAKSAVE before starting secondaries here. ld r14,PACAKSAVE
should have the same result I think.
But never mind that for your series, just something I saw that could
be cleaned up.
Thanks,
Nick
More information about the Linuxppc-dev
mailing list