All of lore.kernel.org
 help / color / mirror / Atom feed
From: Will Deacon <will.deacon@arm.com>
To: Jan Glauber <jan.glauber@caviumnetworks.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v4 1/5] arm64: perf: Basic uncore counter support for Cavium ThunderX SOC
Date: Thu, 17 Nov 2016 18:10:37 +0000	[thread overview]
Message-ID: <20161117181036.GS22855@arm.com> (raw)
In-Reply-To: <20161111103029.GD16907@hardcore>

On Fri, Nov 11, 2016 at 11:30:29AM +0100, Jan Glauber wrote:
> On Tue, Nov 08, 2016 at 11:50:10PM +0000, Will Deacon wrote:
> > On Sat, Oct 29, 2016 at 01:55:29PM +0200, Jan Glauber wrote:
> > > +/* node attribute depending on number of NUMA nodes */
> > > +static ssize_t node_show(struct device *dev, struct device_attribute *attr,
> > > +			 char *page)
> > > +{
> > > +	if (NODES_SHIFT)
> > > +		return sprintf(page, "config:16-%d\n", 16 + NODES_SHIFT - 1);
> > 
> > If NODES_SHIFT is 1, you'll end up with "config:16-16", which might confuse
> > userspace.
> 
> So should I use "config:16" in that case? Is it OK to use this also for
> NODES_SHIFT=0 ?

If you only need one bit, then "config:16" is the right thing to do.

Will

WARNING: multiple messages have this Message-ID (diff)
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 1/5] arm64: perf: Basic uncore counter support for Cavium ThunderX SOC
Date: Thu, 17 Nov 2016 18:10:37 +0000	[thread overview]
Message-ID: <20161117181036.GS22855@arm.com> (raw)
In-Reply-To: <20161111103029.GD16907@hardcore>

On Fri, Nov 11, 2016 at 11:30:29AM +0100, Jan Glauber wrote:
> On Tue, Nov 08, 2016 at 11:50:10PM +0000, Will Deacon wrote:
> > On Sat, Oct 29, 2016 at 01:55:29PM +0200, Jan Glauber wrote:
> > > +/* node attribute depending on number of NUMA nodes */
> > > +static ssize_t node_show(struct device *dev, struct device_attribute *attr,
> > > +			 char *page)
> > > +{
> > > +	if (NODES_SHIFT)
> > > +		return sprintf(page, "config:16-%d\n", 16 + NODES_SHIFT - 1);
> > 
> > If NODES_SHIFT is 1, you'll end up with "config:16-16", which might confuse
> > userspace.
> 
> So should I use "config:16" in that case? Is it OK to use this also for
> NODES_SHIFT=0 ?

If you only need one bit, then "config:16" is the right thing to do.

Will

  reply	other threads:[~2016-11-17 18:10 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-29 11:55 [PATCH v4 0/5] Cavium ThunderX uncore PMU support Jan Glauber
2016-10-29 11:55 ` Jan Glauber
2016-10-29 11:55 ` [PATCH v4 1/5] arm64: perf: Basic uncore counter support for Cavium ThunderX SOC Jan Glauber
2016-10-29 11:55   ` Jan Glauber
2016-11-08 23:50   ` Will Deacon
2016-11-08 23:50     ` Will Deacon
2016-11-11 10:30     ` Jan Glauber
2016-11-11 10:30       ` Jan Glauber
2016-11-17 18:10       ` Will Deacon [this message]
2016-11-17 18:10         ` Will Deacon
2016-11-10 16:54   ` Mark Rutland
2016-11-10 16:54     ` Mark Rutland
2016-11-10 19:46     ` Will Deacon
2016-11-10 19:46       ` Will Deacon
2016-11-11  7:37     ` Jan Glauber
2016-11-11  7:37       ` Jan Glauber
2016-11-11 10:39     ` Jan Glauber
2016-11-11 10:39       ` Jan Glauber
2016-11-11 11:18       ` Mark Rutland
2016-11-11 11:18         ` Mark Rutland
2016-10-29 11:55 ` [PATCH v4 2/5] arm64: perf: Cavium ThunderX L2C TAD uncore support Jan Glauber
2016-10-29 11:55   ` Jan Glauber
2016-10-29 11:55 ` [PATCH v4 3/5] arm64: perf: Cavium ThunderX L2C CBC " Jan Glauber
2016-10-29 11:55   ` Jan Glauber
2016-10-29 11:55 ` [PATCH v4 4/5] arm64: perf: Cavium ThunderX LMC " Jan Glauber
2016-10-29 11:55   ` Jan Glauber
2016-10-29 11:55 ` [PATCH v4 5/5] arm64: perf: Cavium ThunderX OCX TLK " Jan Glauber
2016-10-29 11:55   ` Jan Glauber

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=20161117181036.GS22855@arm.com \
    --to=will.deacon@arm.com \
    --cc=jan.glauber@caviumnetworks.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.