All of lore.kernel.org
 help / color / mirror / Atom feed
From: Suzuki K Poulose <suzuki.poulose@arm.com>
To: Qi Liu <liuqi115@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,
	linuxarm@huawei.com
Subject: Re: [RFC PATCH 4/4] ultrasoc: Add System Memory Buffer driver
Date: Thu, 24 Jun 2021 23:47:34 +0100	[thread overview]
Message-ID: <da4d5c5e-5536-b8ca-3aa5-601c12d4e5ae@arm.com> (raw)
In-Reply-To: <1623749684-65432-5-git-send-email-liuqi115@huawei.com>

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.

> +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

  parent reply	other threads:[~2021-06-24 22:47 UTC|newest]

Thread overview: 16+ 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-16 23:23   ` kernel test robot
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-16 18:04   ` kernel test robot
2021-06-24 22:47   ` Suzuki K Poulose [this message]
2021-07-08  8:25     ` liuqi (BA)
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=da4d5c5e-5536-b8ca-3aa5-601c12d4e5ae@arm.com \
    --to=suzuki.poulose@arm.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=liuqi115@huawei.com \
    --cc=mathieu.poirier@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 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.