linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Williams <Michael.Williams@arm.com>
To: Chunyan Zhang <zhang.chunyan@linaro.org>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Mike Leach <Mike.Leach@arm.com>, "Al Grant" <Al.Grant@arm.com>,
	"Jeremiassen, Tor" <tor@ti.com>,
	Nicolas GUION <nicolas.guion@st.com>,
	Mark Brown <broonie@kernel.org>, Rob Herring <robh@kernel.org>,
	Pratik Patel <pratikp@codeaurora.org>,
	Jon Corbet <corbet@lwn.net>, Mark Rutland <Mark.Rutland@arm.com>,
	Lyra Zhang <zhang.lyra@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-api@vger.kernel.org" <linux-api@vger.kernel.org>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>
Subject: RE: [PATCH V3 6/6] coresight-stm: adding driver for CoreSight STM component
Date: Wed, 17 Feb 2016 12:08:17 +0000	[thread overview]
Message-ID: <VI1PR08MB0670BF982CDE54DA7EE9B0BF8AAE0@VI1PR08MB0670.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <CAG2=9p9-c5z6yXm6VDkDeqZmpFGt3z88ccNQxZTwia=dm3_GNQ@mail.gmail.com>

Hi Chunyan,

Chunyan Zhang wrote on 2016-02-17:
> Hi Michael,
>
> One question below need to be clarified.
>
> On Fri, Feb 12, 2016 at 10:55 PM, Michael Williams
> <Michael.Williams@arm.com> wrote:
>> Mathieu Poirier [mailto:mathieu.poirier@linaro.org] wrote:
>>> On 6 February 2016 at 04:04, Chunyan Zhang <zhang.chunyan@linaro.org> wrote:
>>>> From: Pratik Patel <pratikp@codeaurora.org>
>>>>
>>>> This driver adds support for the STM CoreSight IP block, allowing any
>>>> system compoment (HW or SW) to log and aggregate messages via a
>>>> single entity.
>>>>
>>>> The CoreSight STM exposes an application defined number of channels
>>>> called stimulus port.  Configuration is done using entries in sysfs
>>>> and channels made available to userspace via configfs.
>>>>
>>>> Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
>>>> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
>>>> Signed-off-by: Chunyan Zhang <zhang.chunyan@linaro.org>
>>>> ---
>>>>  .../ABI/testing/sysfs-bus-coresight-devices-stm    |  53 ++
>>>>  Documentation/trace/coresight.txt                  |  37 +-
>>>>  drivers/hwtracing/coresight/Kconfig                |  11 +
>>>>  drivers/hwtracing/coresight/Makefile               |   1 +
>>>>  drivers/hwtracing/coresight/coresight-stm.c        | 928 +++++++++++++++++++++
>>>>  include/linux/coresight-stm.h                      |   6 +
>>>>  include/uapi/linux/coresight-stm.h                 |  12 +
>>>>  7 files changed, 1046 insertions(+), 2 deletions(-)
>>>>  create mode 100644 Documentation/ABI/testing/sysfs-bus-coresight-devices-stm
>>>>  create mode 100644 drivers/hwtracing/coresight/coresight-stm.c
>>>>  create mode 100644 include/linux/coresight-stm.h
>>>>  create mode 100644 include/uapi/linux/coresight-stm.h
>
> [...]
>
>>>> +static int stm_send(void *addr, const void *data, u32 size, u8 max)
>>>> +{
>>>> +       u32 len = size;
>>>> +       u8 paload[8];
>>>> +
>>>> +       if (stm_addr_unaligned(data, max)) {
>>>> +               memcpy(paload, data, size);
>>>> +               data = paload;
>>>> +       }
>>>> +
>>>> +       /* now we are 64bit/32bit aligned */
>>>> +#ifdef CONFIG_64BIT
>>>> +       if (size == 8)
>>>> +               writeq_relaxed(*(u64 *)data, addr);
>>>> +#endif
>>>
>>> We probably don't need an #ifdef here.  Checking the size of the
>>> transfer against the fundamental data size will result in the same
>>> outcome, i.e preventing 64 bit transfers on a 32 bit architecture.  An
>>> error (understandable by the caller) should probably be returned in
>>> this case.
>>
>> In theory this is correct, but if the code is unreachable for non-32-bit architectures,
> why include it at all?
>
>                             ^^^^^^^
> I guess you mean the code is unreachable for "non-64-bit" architectures?

Yes; apologies for my mistake!

[snip]

Mike

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

  reply	other threads:[~2016-02-17 12:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-06 11:04 [PATCH V3 0/6] Introduce CoreSight STM support Chunyan Zhang
2016-02-06 11:04 ` [PATCH V3 1/6] stm class: Add ioctl get_options interface Chunyan Zhang
2016-02-12 15:18   ` Alexander Shishkin
2016-02-12 18:33     ` Mathieu Poirier
2016-02-06 11:04 ` [PATCH V3 2/6] stm class: Support devices with multiple instances Chunyan Zhang
2016-02-06 11:04 ` [PATCH V3 3/6] stm class: provision for statically assigned masterIDs Chunyan Zhang
2016-02-06 11:04 ` [PATCH V3 4/6] Documentations: Add explanations of the case for non-configurable masters Chunyan Zhang
2016-02-06 11:04 ` [PATCH V3 5/6] coresight-stm: Bindings for System Trace Macrocell Chunyan Zhang
2016-02-06 11:04 ` [PATCH V3 6/6] coresight-stm: adding driver for CoreSight STM component Chunyan Zhang
2016-02-11 16:59   ` Mathieu Poirier
2016-02-12 14:55     ` Michael Williams
2016-02-12 18:24       ` Mathieu Poirier
2016-02-17  3:18       ` Chunyan Zhang
2016-02-17 12:08         ` Michael Williams [this message]
2016-02-17  3:49     ` Chunyan Zhang
2016-02-12 15:28   ` Alexander Shishkin
2016-02-12 19:02     ` 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=VI1PR08MB0670BF982CDE54DA7EE9B0BF8AAE0@VI1PR08MB0670.eurprd08.prod.outlook.com \
    --to=michael.williams@arm.com \
    --cc=Al.Grant@arm.com \
    --cc=Mark.Rutland@arm.com \
    --cc=Mike.Leach@arm.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=corbet@lwn.net \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=nicolas.guion@st.com \
    --cc=pratikp@codeaurora.org \
    --cc=robh@kernel.org \
    --cc=tor@ti.com \
    --cc=zhang.chunyan@linaro.org \
    --cc=zhang.lyra@gmail.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).