linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicholas Piggin <npiggin@gmail.com>
To: Christophe LEROY <christophe.leroy@c-s.fr>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	Michael Ellerman <mpe@ellerman.id.au>,
	aneesh.kumar@linux.vnet.ibm.com, linux-kernel@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [RFC PATCH v3 5/7] powerpc: 'current_set' is now a table of task_struct pointers
Date: Wed, 3 Oct 2018 16:09:11 +1000	[thread overview]
Message-ID: <20181003160911.18fb0c60@roar.ozlabs.ibm.com> (raw)
In-Reply-To: <0336ff43-55ac-067b-23a9-4cb4b2fd38f3@c-s.fr>

On Wed, 3 Oct 2018 08:00:43 +0200
Christophe LEROY <christophe.leroy@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@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

  reply	other threads:[~2018-10-03  6:09 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-01 12:30 [RFC PATCH v3 0/7] powerpc: Switch to CONFIG_THREAD_INFO_IN_TASK Christophe Leroy
2018-10-01 12:30 ` [RFC PATCH v3 1/7] book3s/64: avoid circular header inclusion in mmu-hash.h Christophe Leroy
2018-10-03  4:24   ` Nicholas Piggin
2018-10-04  8:20     ` Christophe LEROY
2018-10-04  8:23       ` Aneesh Kumar K.V
2018-10-04  8:32         ` Christophe LEROY
2018-10-01 12:30 ` [RFC PATCH v3 2/7] powerpc: Prepare for moving thread_info into task_struct Christophe Leroy
2018-10-03  5:02   ` Nicholas Piggin
2018-10-03  5:49     ` Christophe LEROY
2018-10-03  5:57       ` Nicholas Piggin
2018-10-04 14:29       ` Christophe LEROY
2018-10-01 12:30 ` [RFC PATCH v3 3/7] powerpc: Activate CONFIG_THREAD_INFO_IN_TASK Christophe Leroy
2018-10-03  5:30   ` Nicholas Piggin
2018-10-03  5:47     ` Christophe LEROY
2018-10-03  5:52       ` Nicholas Piggin
2018-10-03  6:04         ` Christophe LEROY
2018-10-03  6:23           ` Nicholas Piggin
2018-10-01 12:30 ` [RFC PATCH v3 4/7] powerpc: regain entire stack space Christophe Leroy
2018-10-03  5:34   ` Nicholas Piggin
2018-10-03  5:52     ` Christophe LEROY
2018-10-03  6:30       ` Nicholas Piggin
2018-10-03  6:45         ` Christophe LEROY
2018-10-03  7:07           ` Nicholas Piggin
2018-10-03  9:30             ` Christophe LEROY
2018-10-01 12:30 ` [RFC PATCH v3 5/7] powerpc: 'current_set' is now a table of task_struct pointers Christophe Leroy
2018-10-03  5:41   ` Nicholas Piggin
2018-10-03  6:00     ` Christophe LEROY
2018-10-03  6:09       ` Nicholas Piggin [this message]
2018-10-01 12:30 ` [RFC PATCH v3 6/7] powerpc/32: Remove CURRENT_THREAD_INFO and rename TI_CPU Christophe Leroy
2018-10-01 12:30 ` [RFC PATCH v3 7/7] powerpc/64: Modify CURRENT_THREAD_INFO() Christophe Leroy
2018-10-03  5:44   ` Nicholas Piggin
2018-10-03  6:01     ` Christophe LEROY

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181003160911.18fb0c60@roar.ozlabs.ibm.com \
    --to=npiggin@gmail.com \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=benh@kernel.crashing.org \
    --cc=christophe.leroy@c-s.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).