linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "liuqi (BA)" <liuqi115@huawei.com>
To: Suzuki K Poulose <suzuki.poulose@arm.com>,
	Linuxarm <linuxarm@huawei.com>,
	<alexander.shishkin@linux.intel.com>,
	<mathieu.poirier@linaro.org>, <jonathan.zhouwen@huawei.com>,
	<f.fangjian@huawei.com>
Cc: <linux-kernel@vger.kernel.org>, <coresight@lists.linaro.org>
Subject: Re: [RFC PATCH 4/4] ultrasoc: Add System Memory Buffer driver
Date: Thu, 8 Jul 2021 16:25:59 +0800	[thread overview]
Message-ID: <93cd762d-3f37-6805-0958-b7e1eb79caac@huawei.com> (raw)
In-Reply-To: <da4d5c5e-5536-b8ca-3aa5-601c12d4e5ae@arm.com>


Hi Suzuki,
On 2021/6/25 6:47, Suzuki K Poulose wrote:
> Hi Qi
> 
> On 15/06/2021 10:34, Qi Liu wrote:
>> This patch adds driver for System Memory Buffer. It includes
>> a platform driver for the SMB device.
>>
>> Signed-off-by: Jonathan Zhou <jonathan.zhouwen@huawei.com>
>> Signed-off-by: Qi Liu <liuqi115@huawei.com>
>> ---
>>   drivers/hwtracing/ultrasoc/Kconfig        |   9 +
>>   drivers/hwtracing/ultrasoc/Makefile       |   3 +
>>   drivers/hwtracing/ultrasoc/ultrasoc-smb.c | 663 
>> ++++++++++++++++++++++++++++++
>>   drivers/hwtracing/ultrasoc/ultrasoc-smb.h | 182 ++++++++
>>   4 files changed, 857 insertions(+)
>>   create mode 100644 drivers/hwtracing/ultrasoc/ultrasoc-smb.c
>>   create mode 100644 drivers/hwtracing/ultrasoc/ultrasoc-smb.h
>>
> 
>> +/*
>> + * Coresight doesn't export the following
>> + * structures(cs_mode,cs_buffers,etm_event_data),
>> + * so we redefine a copy here.
>> + */
> 
> Please do not duplicate them. This indicates, either :
> 
>   - You need to place your driver under coresight
> 
>   OR
> 
>   - Export the required definitions.
> 

got it, I'll move this driver to coresight/ultrasoc, thanks.

Qi
>> +enum cs_mode {
>> +    CS_MODE_DISABLED,
>> +    CS_MODE_SYSFS,
>> +    CS_MODE_PERF,
>> +};
>> +
> 
>> +struct cs_buffers {
>> +    unsigned int        cur;
>> +    unsigned int        nr_pages;
>> +    unsigned long        offset;
>> +    local_t            data_size;
>> +    bool            snapshot;
>> +    void            **data_pages;
>> +};
>> +
> 
> Why does this need to be replicated ?
> 
>> +struct etm_event_data {
>> +    struct work_struct work;
>> +    cpumask_t mask;
>> +    void *snk_config;
>> +    struct list_head * __percpu *path;
>> +};
>> +
>> +#if IS_ENABLED(CONFIG_CORESIGHT)
>> +int etm_perf_symlink(struct coresight_device *csdev, bool link);
>> +int etm_perf_add_symlink_sink(struct coresight_device *csdev);
>> +void etm_perf_del_symlink_sink(struct coresight_device *csdev);
>> +static inline void *etm_perf_sink_config(struct perf_output_handle 
>> *handle)
>> +{
>> +    struct etm_event_data *data = perf_get_aux(handle);
>> +
>> +    if (data)
>> +        return data->snk_config;
>> +    return NULL;
>> +}
>> +#else
>> +static inline int etm_perf_symlink(struct coresight_device *csdev, 
>> bool link)
>> +{ return -EINVAL; }
>> +int etm_perf_add_symlink_sink(struct coresight_device *csdev)
>> +{ return -EINVAL; }
>> +void etm_perf_del_symlink_sink(struct coresight_device *csdev) {}
>> +static inline void *etm_perf_sink_config(struct perf_output_handle 
>> *handle)
>> +{
>> +    return NULL;
>> +}
>> +
>> +#endif /* CONFIG_CORESIGHT */
>> +
>> +#endif
>>
> 
> Suzuki
> .


  reply	other threads:[~2021-07-08  8:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-15  9:34 [RFC PATCH 0/4] Add support for Ultrasoc Trace Module Qi Liu
2021-06-15  9:34 ` [RFC PATCH 1/4] Documentation: tracing: Documentation for ultrasoc framework and drivers Qi Liu
2021-06-23 22:51   ` Mathieu Poirier
2021-06-24 12:43     ` liuqi (BA)
2021-06-24 16:26       ` Mathieu Poirier
2021-06-15  9:34 ` [RFC PATCH 2/4] ultrasoc: add ultrasoc core layer framework Qi Liu
2021-06-15  9:34 ` [RFC PATCH 3/4] ultrasoc: Add ultrasoc AXI Communicator driver Qi Liu
2021-06-29 21:22   ` Mathieu Poirier
2021-07-08  9:27     ` liuqi (BA)
2021-06-15  9:34 ` [RFC PATCH 4/4] ultrasoc: Add System Memory Buffer driver Qi Liu
2021-06-24 22:47   ` Suzuki K Poulose
2021-07-08  8:25     ` liuqi (BA) [this message]
2021-06-29 20:50   ` Mathieu Poirier
2021-07-08  8:47     ` liuqi (BA)

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=93cd762d-3f37-6805-0958-b7e1eb79caac@huawei.com \
    --to=liuqi115@huawei.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=coresight@lists.linaro.org \
    --cc=f.fangjian@huawei.com \
    --cc=jonathan.zhouwen@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=mathieu.poirier@linaro.org \
    --cc=suzuki.poulose@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 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).