mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
coresight: perf: Remove set_buffer call back
In coresight perf mode, we need to prepare the sink before starting a session, which is done via set_buffer call back. We then proceed to enable the tracing. If we fail to start the session successfully, we leave the sink configuration unchanged. In order to make the operation atomic and to avoid yet another call back to clear the buffer, we get rid of the "set_buffer" call back and pass the buffer details via enable() call back to the sink. Cc: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
d25054ee8d
commit
3d6e893575
8 changed files with 59 additions and 38 deletions
|
@ -185,18 +185,14 @@ struct coresight_device {
|
|||
* @disable: disables the sink.
|
||||
* @alloc_buffer: initialises perf's ring buffer for trace collection.
|
||||
* @free_buffer: release memory allocated in @get_config.
|
||||
* @set_buffer: initialises buffer mechanic before a trace session.
|
||||
* @update_buffer: update buffer pointers after a trace session.
|
||||
*/
|
||||
struct coresight_ops_sink {
|
||||
int (*enable)(struct coresight_device *csdev, u32 mode);
|
||||
int (*enable)(struct coresight_device *csdev, u32 mode, void *data);
|
||||
void (*disable)(struct coresight_device *csdev);
|
||||
void *(*alloc_buffer)(struct coresight_device *csdev, int cpu,
|
||||
void **pages, int nr_pages, bool overwrite);
|
||||
void (*free_buffer)(void *config);
|
||||
int (*set_buffer)(struct coresight_device *csdev,
|
||||
struct perf_output_handle *handle,
|
||||
void *sink_config);
|
||||
unsigned long (*update_buffer)(struct coresight_device *csdev,
|
||||
struct perf_output_handle *handle,
|
||||
void *sink_config);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue