linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
To: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc/kernel/sysfs: Export ldbar spr to sysfs
Date: Mon, 30 Oct 2017 17:26:27 +0530	[thread overview]
Message-ID: <5412d102-b586-76e7-1133-7f09e70cdcb4@linux.vnet.ibm.com> (raw)
In-Reply-To: <1509096890-22655-1-git-send-email-anju@linux.vnet.ibm.com>



On Friday 27 October 2017 03:04 PM, Anju T Sudhakar wrote:
> Add ldbar spr to sysfs. The spr will hold thread level In-Memory Collection (IMC)
> counter configuration data.
>
> Signed-off-by: Anju T Sudhakar <anju@linux.vnet.ibm.com>
> Acked-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
> ---
>   arch/powerpc/kernel/sysfs.c | 8 ++++++++
>   1 file changed, 8 insertions(+)
>
> diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c
> index 4437c70c7c2b..8efcaece4796 100644
> --- a/arch/powerpc/kernel/sysfs.c
> +++ b/arch/powerpc/kernel/sysfs.c
> @@ -466,6 +466,7 @@ static ssize_t __used \
>   #ifdef HAS_PPC_PMC_CLASSIC
>   SYSFS_PMCSETUP(mmcr0, SPRN_MMCR0);
>   SYSFS_PMCSETUP(mmcr1, SPRN_MMCR1);
> +SYSFS_PMCSETUP(ldbar, SPRN_LDBAR);

My bad. Missed to mention this. For ldbar spr,
use SYSFS_SPRSETUP macro instead.

Maddy

>   SYSFS_PMCSETUP(pmc1, SPRN_PMC1);
>   SYSFS_PMCSETUP(pmc2, SPRN_PMC2);
>   SYSFS_PMCSETUP(pmc3, SPRN_PMC3);
> @@ -492,6 +493,7 @@ SYSFS_SPRSETUP(pir, SPRN_PIR);
>     Lets be conservative and default to pseries.
>   */
>   static DEVICE_ATTR(mmcra, 0600, show_mmcra, store_mmcra);
> +static DEVICE_ATTR(ldbar, 0600, show_ldbar, store_ldbar);
>   static DEVICE_ATTR(spurr, 0400, show_spurr, NULL);
>   static DEVICE_ATTR(purr, 0400, show_purr, store_purr);
>   static DEVICE_ATTR(pir, 0400, show_pir, NULL);
> @@ -757,6 +759,9 @@ static int register_cpu_online(unsigned int cpu)
>   			device_create_file(s, &pmc_attrs[i]);
>
>   #ifdef CONFIG_PPC64
> +	if (cpu_has_feature(CPU_FTR_ARCH_300))
> +		device_create_file(s, &dev_attr_ldbar);
> +
>   	if (cpu_has_feature(CPU_FTR_MMCRA))
>   		device_create_file(s, &dev_attr_mmcra);
>
> @@ -842,6 +847,9 @@ static int unregister_cpu_online(unsigned int cpu)
>   			device_remove_file(s, &pmc_attrs[i]);
>
>   #ifdef CONFIG_PPC64
> +	if (cpu_has_feature(CPU_FTR_ARCH_300))
> +		device_remove_file(s, &dev_attr_ldbar);
> +
>   	if (cpu_has_feature(CPU_FTR_MMCRA))
>   		device_remove_file(s, &dev_attr_mmcra);
>

      parent reply	other threads:[~2017-10-30 11:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-27  9:34 [PATCH] powerpc/kernel/sysfs: Export ldbar spr to sysfs Anju T Sudhakar
2017-10-30 10:26 ` kbuild test robot
2017-10-30 11:56 ` Madhavan Srinivasan [this message]

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=5412d102-b586-76e7-1133-7f09e70cdcb4@linux.vnet.ibm.com \
    --to=maddy@linux.vnet.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.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).