linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Greg KH <gregkh@linuxfoundation.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-api@vger.kernel.org" <linux-api@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Kaixu Xia <kaixu.xia@linaro.org>,
	Chunyan Zhang <zhang.chunyan@linaro.org>
Subject: Re: [PATCH 01/11] coresight-etm4x: Adding CoreSight ETM4x driver
Date: Fri, 8 May 2015 08:07:39 -0600	[thread overview]
Message-ID: <CANLsYkwT9zinP6KLi6o95+fGwPbxbUgWTpMnL7yZfsfTU8p31A@mail.gmail.com> (raw)
In-Reply-To: <CACRpkdak5-iuWEDAvhDq3uwYobK+tW_N-t-QaY+-5TUSCa7uOg@mail.gmail.com>

On 28 April 2015 at 06:28, Linus Walleij <linus.walleij@linaro.org> wrote:
> On Thu, Apr 23, 2015 at 12:40 AM, Mathieu Poirier
> <mathieu.poirier@linaro.org> wrote:
>
>> From: Pratik Patel <pratikp@codeaurora.org>
>>
>> This driver manages the CoreSight ETMv4 (Embedded Trace Macrocell) IP block
>> to support HW assisted tracing on ARMv7 and ARMv8 architectures.
>>
>> Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
>> Signed-off-by: Kaixu Xia <xiakaixu@huawei.com>
>> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
>
> (...)
>> +/* The number of ETMv4 currently registered */
>> +static int etm4_count;
>> +static struct etmv4_drvdata *etmdrvdata[NR_CPUS];
>
> Don't you need a mutex or something around etm4_count so
> as to protect it? You could also make it an atomic.

Sorry for the late reply, your email got lost under the pile.

The etm4_count is only used at boot time to avoid registering the
notifiers twice and not used otherwise.  Since the discovery of
coresight devices is sequential there is no point in guarding it.

>
> Also why is it a signed int ... unsigned int?
>
> I know, lame comments, the runtime PM stuff looks perfect now,

I like it too - thanks for the review.

> someone had a refcount comment but it's doing the right thing.
>
> Yours,
> Linus Walleij

  reply	other threads:[~2015-05-08 14:07 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-22 22:40 [PATCH 00/11] Support for coresight ETMv4 tracer Mathieu Poirier
2015-04-22 22:40 ` [PATCH 01/11] coresight-etm4x: Adding CoreSight ETM4x driver Mathieu Poirier
2015-04-23 15:17   ` Christopher Covington
2015-04-24 15:05   ` Ivan T. Ivanov
2015-04-27 15:51     ` Mathieu Poirier
2015-04-24 15:41   ` Ivan T. Ivanov
2015-04-27 15:48     ` Mathieu Poirier
2015-04-28  8:30       ` Ivan T. Ivanov
2015-04-28 20:32         ` Mathieu Poirier
2015-04-28 12:23     ` Linus Walleij
2015-04-28 12:28   ` Linus Walleij
2015-05-08 14:07     ` Mathieu Poirier [this message]
2015-04-22 22:40 ` [PATCH 02/11] coresight-etm4x: Controls pertaining to tracer configuration Mathieu Poirier
2015-04-22 22:40 ` [PATCH 03/11] coresight-etm4x: Controls pertaining to the reset, mode, pe and events Mathieu Poirier
2015-04-22 22:40 ` [PATCH 04/11] coresight-etm4x: Controls pertaining to various configuration options Mathieu Poirier
2015-04-22 22:40 ` [PATCH 05/11] coresight-etm4x: Controls pertaining to the ViewInst register Mathieu Poirier
2015-04-22 22:40 ` [PATCH 06/11] coresight-etm4x: Controls pertaining to the address comparator functions Mathieu Poirier
2015-04-22 22:40 ` [PATCH 07/11] coresight-etm4x: Controls pertaining to the sequencer functions Mathieu Poirier
2015-04-22 22:40 ` [PATCH 08/11] coresight-etm4x: Controls pertaining to the counter functions Mathieu Poirier
2015-04-22 22:40 ` [PATCH 09/11] coresight-etm4x: Controls pertaining to the selection of resources Mathieu Poirier
2015-04-22 22:40 ` [PATCH 10/11] coresight-etm4x: Controls pertaining to the context ID functions Mathieu Poirier
2015-04-23 15:08   ` Christopher Covington
2015-04-23 15:16     ` Mathieu Poirier
2015-04-23 16:59       ` Christopher Covington
2015-04-22 22:40 ` [PATCH 11/11] coresight-etm4x: Controls pertaining to the VM " Mathieu Poirier

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=CANLsYkwT9zinP6KLi6o95+fGwPbxbUgWTpMnL7yZfsfTU8p31A@mail.gmail.com \
    --to=mathieu.poirier@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kaixu.xia@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zhang.chunyan@linaro.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).