linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Phil Auld <pauld@redhat.com>
To: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Cc: Juri Lelli <juri.lelli@redhat.com>,
	Parth Shah <parth@linux.ibm.com>,
	Ihor Pasichnyk <Ihor.Pasichnyk@ibm.com>,
	Waiman Long <longman@redhat.com>,
	linuxppc-dev <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH v3 2/2] powerpc/shared: Use static key to detect shared processor
Date: Thu, 5 Dec 2019 08:51:23 -0500	[thread overview]
Message-ID: <20191205135123.GB18693@lorien.usersys.redhat.com> (raw)
In-Reply-To: <20191205083218.25824-2-srikar@linux.vnet.ibm.com>

On Thu, Dec 05, 2019 at 02:02:18PM +0530 Srikar Dronamraju wrote:
> With the static key shared processor available, is_shared_processor()
> can return without having to query the lppaca structure.
> 
> Cc: Parth Shah <parth@linux.ibm.com>
> Cc: Ihor Pasichnyk <Ihor.Pasichnyk@ibm.com>
> Cc: Juri Lelli <juri.lelli@redhat.com>
> Cc: Phil Auld <pauld@redhat.com>
> Cc: Waiman Long <longman@redhat.com>
> Signed-off-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
> ---
> Changelog v1 (https://patchwork.ozlabs.org/patch/1204192/) ->v2:
> Now that we no more refer to lppaca, remove the comment.
> 
> Changelog v2->v3:
> Code is now under CONFIG_PPC_SPLPAR as it depends on CONFIG_PPC_PSERIES.
> This was suggested by Waiman Long.
> 
>  arch/powerpc/include/asm/spinlock.h | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/arch/powerpc/include/asm/spinlock.h b/arch/powerpc/include/asm/spinlock.h
> index de817c25deff..e83d57f27566 100644
> --- a/arch/powerpc/include/asm/spinlock.h
> +++ b/arch/powerpc/include/asm/spinlock.h
> @@ -111,13 +111,8 @@ static inline void splpar_rw_yield(arch_rwlock_t *lock) {};
>  
>  static inline bool is_shared_processor(void)
>  {
> -/*
> - * LPPACA is only available on Pseries so guard anything LPPACA related to
> - * allow other platforms (which include this common header) to compile.
> - */
> -#ifdef CONFIG_PPC_PSERIES
> -	return (IS_ENABLED(CONFIG_PPC_SPLPAR) &&
> -		lppaca_shared_proc(local_paca->lppaca_ptr));
> +#ifdef CONFIG_PPC_SPLPAR
> +	return static_branch_unlikely(&shared_processor);
>  #else
>  	return false;
>  #endif
> -- 
> 2.18.1
> 

Fwiw,

Acked-by: Phil Auld <pauld@redhat.com>
-- 


  reply	other threads:[~2019-12-05 20:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-05  8:32 [PATCH v3 1/2] powerpc/vcpu: Assume dedicated processors as non-preempt Srikar Dronamraju
2019-12-05  8:32 ` [PATCH v3 2/2] powerpc/shared: Use static key to detect shared processor Srikar Dronamraju
2019-12-05 13:51   ` Phil Auld [this message]
2019-12-05 14:57   ` Waiman Long
2019-12-05 13:48 ` [PATCH v3 1/2] powerpc/vcpu: Assume dedicated processors as non-preempt Phil Auld
2019-12-06  9:34 ` Vaidyanathan Srinivasan
2019-12-09  8:26 ` Parth Shah
2019-12-11 14:52 ` Waiman Long

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=20191205135123.GB18693@lorien.usersys.redhat.com \
    --to=pauld@redhat.com \
    --cc=Ihor.Pasichnyk@ibm.com \
    --cc=juri.lelli@redhat.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=longman@redhat.com \
    --cc=parth@linux.ibm.com \
    --cc=srikar@linux.vnet.ibm.com \
    /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).