coresight: Make sysFS functional on topologies with per core sink
PATCH v2 1/1 coresight: Make sysFS functional on topologies with per core sink
Coresight driver assumes sink is common across all the ETMs, and tries to build a path between ETM and the first enabled sink found using bus based search. This breaks sysFS usage on implementations that has multiple per core sinks in enabled state.
For this,
- coresight_find_sink API is updated with an additional flag so that it is able to return an enabled sink
- coresight_get_enabled_sink API is updated to do a connection based search, when a source reference is given.
---
Applies on https://git.linaro.org/kernel/coresight.git/log/?h=next
Changes in V2:
- Fixed few typos in commit message
- Rephrased commit message
.../hwtracing/coresight/coresight-etm-perf.c | 2 +- drivers/hwtracing/coresight/coresight-priv.h | 5 +- drivers/hwtracing/coresight/coresight.c | 51 +++++++++++++++++-- 3 files changed, 51 insertions(+), 7 deletions(-)
drivers/hwtracing/coresight/coresight-etm-perf.c +1 -1
@@ -223,7 +223,7 @@ static void *etm_setup_aux(struct perf_event *event, void **pages, id = (u32 )event->attr.config2; sink =coresight_get_sink_by_id (id); }else { - sink =coresight_get_enabled_sink (true); + sink =coresight_get_enabled_sink (NULL , true); } mask = &event_data->mask;
drivers/hwtracing/coresight/coresight-priv.h +4 -1
@@ -148,10 +148,13 @@ static inline void coresight_write_reg_pair(void __iomem *addr, u64 val,void coresight_disable_path (struct list_head *path);int coresight_enable_path (struct list_head *path,u32 mode,void *sink_data);struct coresight_device *coresight_get_sink (struct list_head *path); -struct coresight_device *coresight_get_enabled_sink (bool reset); +struct coresight_device * +coresight_get_enabled_sink (struct coresight_device *source,bool reset);struct coresight_device *coresight_get_sink_by_id (u32 id);struct coresight_device *coresight_find_default_sink (struct coresight_device *csdev); +struct coresight_device * +coresight_find_enabled_sink (struct coresight_device *csdev);struct list_head *coresight_build_path (struct coresight_device *csdev,struct coresight_device *sink);void coresight_release_path (struct list_head *path);
drivers/hwtracing/coresight/coresight.c +46 -5
105 lines not on this page · raw message
Signature · 7 lines
2.25.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Hello Linu,
Please do mention the tree on which this patch applies on. The coresight API functions being changed here are not even present on v5.8 but instead are part of linux-next (atleast next-20200731).
Quoted 1 line · Linu Cherian
Coresight driver assumes sink is common across all the ETMs,
Does 'common' just implies reachable here. Should not all the sinks on the system be reachable from all the sources.
Quoted 4 lines
and tries to build a path between ETM and the first enabled sink found using bus based search. This breaks sysFS usage on implementations that has multiple per core sinks in enabled state.
Could you please explain how it breaks the sysfs usage ? Why those per core sinks were not found through existing bus based search.
Quoted 148 lines
For this,
-coresight_find_sinkAPI is updated with an additional flag so that it is able to return an enabled sink
-coresight_get_enabled_sinkAPI is updated to do a connection based search, when a source reference is given.Change-Id I6cc91ddb3ef8936a8f41a5f7c7c455b0ece9d85dSigned-off-by Linu Cherian <[email protected]>---
Applies on https://git.linaro.org/kernel/coresight.git/log/?h=nextChanges in V2:
- Fixed few typos in commit message
- Rephrased commit message.../hwtracing/coresight/coresight-etm-perf.c | 2 +- drivers/hwtracing/coresight/coresight-priv.h | 5 +- drivers/hwtracing/coresight/coresight.c | 51 +++++++++++++++++-- 3 files changed, 51 insertions(+), 7 deletions(-)drivers/hwtracing/coresight/coresight-etm-perf.c +1
-1@@ -223,7 +223,7 @@ static void *etm_setup_aux(struct perf_event *event, void **pages, id = (u32 )event->attr.config2; sink =coresight_get_sink_by_id (id); }else { - sink =coresight_get_enabled_sink (true); + sink =coresight_get_enabled_sink (NULL , true); } mask = &event_data->mask;drivers/hwtracing/coresight/coresight-priv.h +4
-1@@ -148,10 +148,13 @@ static inline void coresight_write_reg_pair(void __iomem *addr, u64 val,void coresight_disable_path (struct list_head *path);int coresight_enable_path (struct list_head *path,u32 mode,void *sink_data);struct coresight_device *coresight_get_sink (struct list_head *path); -struct coresight_device *coresight_get_enabled_sink (bool reset); +struct coresight_device * +coresight_get_enabled_sink (struct coresight_device *source,bool reset);struct coresight_device *coresight_get_sink_by_id (u32 id);struct coresight_device *coresight_find_default_sink (struct coresight_device *csdev); +struct coresight_device * +coresight_find_enabled_sink (struct coresight_device *csdev);struct list_head *coresight_build_path (struct coresight_device *csdev,struct coresight_device *sink);void coresight_release_path (struct list_head *path);drivers/hwtracing/coresight/coresight.c +35
-4@@ -566,6 +566,10 @@ static int coresight_enabled_sink(struct device *dev, const void *data)/** * coresight_get_enabled_sink - returns the first enabled sink found on the bus +* When a source reference is given, enabled sink is found using connection based +* search. +* +* @source: Coresight source device reference * @deactivate: Whether the 'enable_sink' flag should be reset * * When operated from perf the deactivate parameter should be set to 'true'. @@ -576,10 +580,21 @@ static int coresight_enabled_sink(struct device *dev, const void *data)* parameter should be set to 'false', hence mandating users to explicitly * clear the flag. */ -struct coresight_device *coresight_get_enabled_sink (bool deactivate) +struct coresight_device * +coresight_get_enabled_sink (struct coresight_device *source,bool deactivate) {struct device *dev =NULL ; +struct coresight_device *sink; + +if (!source) + goto bus_search; + sink =coresight_find_enabled_sink (source); +if (sink && deactivate) + sink->activated = false; + +return sink; +bus_search: dev =bus_find_device (&coresight_bustype,NULL , &deactivate, coresight_enabled_sink);@@ -828,6 +843,7 @@ coresight_select_best_sink(struct coresight_device *sink, int *depth,* * @csdev: source / current device to check. * @depth: [in] search depth of calling dev, [out] depth of found sink. +* @enabled: flag to search only enabled sinks * * This will walk the connection path from a source (ETM) till a suitable * sink is encountered and return that sink to the original caller. @@ -839,7 +855,7 @@ coresight_select_best_sink(struct coresight_device *sink, int *depth,* return best sink found, or NULL if not found at this node or child nodes. */ static struct coresight_device * -coresight_find_sink (struct coresight_device *csdev,int *depth) +coresight_find_sink (struct coresight_device *csdev,int *depth,bool enabled) {int i, curr_depth = *depth +1 , found_depth =0 ;struct coresight_device *found_sink =NULL ;@@ -862,7 +878,8 @@ coresight_find_sink(struct coresight_device *csdev, int *depth) child_dev = csdev->pdata->conns[i].child_dev;if (child_dev) - sink =coresight_find_sink (child_dev, &child_depth); + sink =coresight_find_sink (child_dev, &child_depth, + enabled);if (sink) found_sink = coresight_select_best_sink(found_sink,@@ -872,6 +889,10 @@ coresight_find_sink(struct coresight_device *csdev, int *depth) } return_def_sink: +/* Check if we need to return an enabled sink */ +if (enabled && found_sink) +if (!found_sink->activated) + found_sink =NULL ;/* return found sink and depth */ if (found_sink) *depth = found_depth;@@ -901,10 +922,30 @@ coresight_find_default_sink(struct coresight_device *csdev)/* look for a default sink if we have not found for this device */ if (!csdev->def_sink) - csdev->def_sink =coresight_find_sink (csdev, &depth); + csdev->def_sink =coresight_find_sink (csdev, &depth, false);return csdev->def_sink; } +/** +* coresight_find_enabled_sink: Find the suitable enabled sink +* +* @csdev: starting source to find a connected sink. +* +* Walks connections graph looking for a suitable sink to enable for the +* supplied source. Uses CoreSight device subtypes and distance from source +* to select the best sink. +* +* Used in cases where the CoreSight user (sysfs) has selected a sink.
drivers/hwtracing/coresight/coresight.c coresight_find_default_sink(struct coresight_device *csdev) · line 948
Quoted 10 lines
drivers/hwtracing/coresight/coresight.c +10
-0+*/ +struct coresight_device * +coresight_find_enabled_sink (struct coresight_device *csdev) +{ +int depth =0 ; + +/* look for the enabled sink */ +return coresight_find_sink (csdev, &depth, true); +} +
Why this wrapper is required ? Could not coresight_find_sink() be used directly in the only caller i.e coresight_get_enabled_sink(). Besides, their names are really very similar and might lead to confusion.
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Hi Anshuman,
Quoted 6 lines · Anshuman Khandual
Hello Linu,
Please do mention the tree on which this patch applies on. The coresight API functions being changed here are not even present on v5.8 but instead are part of linux-next (atleast next-20200731).
Will be more explicit next time, though i have mentioned the relevant tree below.
Quoted 6 lines · Linu Cherian
Quoted 1 line
Coresight driver assumes sink is common across all the ETMs,
Does 'common' just implies reachable here. Should not all the sinks on the system be reachable from all the sources.
Common implies, a topology where a sink is common to all ETMs, a global ETR for example. Please see below for details.
Quoted 9 lines
Quoted 5 lines
and tries to build a path between ETM and the first enabled sink found using bus based search. This breaks sysFS usage on implementations that has multiple per core sinks in enabled state.
Could you please explain how it breaks the sysfs usage ? Why those per core sinks were not found through existing bus based search.
On an implementation with per core ETR, and when a user tries to enable multiple sinks using the syfs interface, only the first sink on the bus would get enabled at hardware level.
This is because coresight_get_enabled_sink would always select the first user enabled
sink on the coresight bus, which works fine on implementations with global ETR but
not for per core ETR/ETF.
So for example, when an user enables ETM 0 and ETR0 , followed by ETM 1 and ETR 1,
then ETR1 hardware block will never get enabled.
Quoted 40 lines
Quoted 40 lines
For this,
-coresight_find_sinkAPI is updated with an additional flag so that it is able to return an enabled sink
-coresight_get_enabled_sinkAPI is updated to do a connection based search, when a source reference is given.Change-Id I6cc91ddb3ef8936a8f41a5f7c7c455b0ece9d85dSigned-off-by Linu Cherian <[email protected]>---
Applies on https://git.linaro.org/kernel/coresight.git/log/?h=nextChanges in V2:
- Fixed few typos in commit message
- Rephrased commit message.../hwtracing/coresight/coresight-etm-perf.c | 2 +- drivers/hwtracing/coresight/coresight-priv.h | 5 +- drivers/hwtracing/coresight/coresight.c | 51 +++++++++++++++++-- 3 files changed, 51 insertions(+), 7 deletions(-)drivers/hwtracing/coresight/coresight.c +16
-0+/** +* coresight_find_enabled_sink: Find the suitable enabled sink +* +* @csdev: starting source to find a connected sink. +* +* Walks connections graph looking for a suitable sink to enable for the +* supplied source. Uses CoreSight device subtypes and distance from source +* to select the best sink. +* +* Used in cases where the CoreSight user (sysfs) has selected a sink. +*/ +struct coresight_device * +coresight_find_enabled_sink (struct coresight_device *csdev) +{ +int depth =0 ; +
Quoted 8 lines
drivers/hwtracing/coresight/coresight.c coresight_find_default_sink(struct coresight_device *csdev) · line 948
Quoted 4 lines
drivers/hwtracing/coresight/coresight.c +4
-0+/* look for the enabled sink */ +return coresight_find_sink (csdev, &depth, true); +} +Why this wrapper is required ? Could not
coresight_find_sink()be used directly in the only caller i.ecoresight_get_enabled_sink(). Besides, their names are really very similar and might lead to confusion.
Thought that a wrapper avoids exposing the internals like "depth" in the search API
to its users.
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Hi Mathieu,
Any comments on this patch ?
Quoted 177 lines · Linu Cherian
Coresight driver assumes sink is common across all the ETMs, and tries to build a path between ETM and the first enabled sink found using bus based search. This breaks sysFS usage on implementations that has multiple per core sinks in enabled state.
For this,
-coresight_find_sinkAPI is updated with an additional flag so that it is able to return an enabled sink
-coresight_get_enabled_sinkAPI is updated to do a connection based search, when a source reference is given.Change-Id I6cc91ddb3ef8936a8f41a5f7c7c455b0ece9d85dSigned-off-by Linu Cherian <[email protected]>---
Applies on https://git.linaro.org/kernel/coresight.git/log/?h=nextChanges in V2:
- Fixed few typos in commit message
- Rephrased commit message.../hwtracing/coresight/coresight-etm-perf.c | 2 +- drivers/hwtracing/coresight/coresight-priv.h | 5 +- drivers/hwtracing/coresight/coresight.c | 51 +++++++++++++++++-- 3 files changed, 51 insertions(+), 7 deletions(-)drivers/hwtracing/coresight/coresight-etm-perf.c +1
-1@@ -223,7 +223,7 @@ static void *etm_setup_aux(struct perf_event *event, void **pages, id = (u32 )event->attr.config2; sink =coresight_get_sink_by_id (id); }else { - sink =coresight_get_enabled_sink (true); + sink =coresight_get_enabled_sink (NULL , true); } mask = &event_data->mask;drivers/hwtracing/coresight/coresight-priv.h +4
-1@@ -148,10 +148,13 @@ static inline void coresight_write_reg_pair(void __iomem *addr, u64 val,void coresight_disable_path (struct list_head *path);int coresight_enable_path (struct list_head *path,u32 mode,void *sink_data);struct coresight_device *coresight_get_sink (struct list_head *path); -struct coresight_device *coresight_get_enabled_sink (bool reset); +struct coresight_device * +coresight_get_enabled_sink (struct coresight_device *source,bool reset);struct coresight_device *coresight_get_sink_by_id (u32 id);struct coresight_device *coresight_find_default_sink (struct coresight_device *csdev); +struct coresight_device * +coresight_find_enabled_sink (struct coresight_device *csdev);struct list_head *coresight_build_path (struct coresight_device *csdev,struct coresight_device *sink);void coresight_release_path (struct list_head *path);drivers/hwtracing/coresight/coresight.c +46
-6@@ -566,6 +566,10 @@ static int coresight_enabled_sink(struct device *dev, const void *data)/** * coresight_get_enabled_sink - returns the first enabled sink found on the bus +* When a source reference is given, enabled sink is found using connection based +* search. +* +* @source: Coresight source device reference * @deactivate: Whether the 'enable_sink' flag should be reset * * When operated from perf the deactivate parameter should be set to 'true'. @@ -576,10 +580,21 @@ static int coresight_enabled_sink(struct device *dev, const void *data)* parameter should be set to 'false', hence mandating users to explicitly * clear the flag. */ -struct coresight_device *coresight_get_enabled_sink (bool deactivate) +struct coresight_device * +coresight_get_enabled_sink (struct coresight_device *source,bool deactivate) {struct device *dev =NULL ; +struct coresight_device *sink; + +if (!source) + goto bus_search; + sink =coresight_find_enabled_sink (source); +if (sink && deactivate) + sink->activated = false; + +return sink; +bus_search: dev =bus_find_device (&coresight_bustype,NULL , &deactivate, coresight_enabled_sink);@@ -828,6 +843,7 @@ coresight_select_best_sink(struct coresight_device *sink, int *depth,* * @csdev: source / current device to check. * @depth: [in] search depth of calling dev, [out] depth of found sink. +* @enabled: flag to search only enabled sinks * * This will walk the connection path from a source (ETM) till a suitable * sink is encountered and return that sink to the original caller. @@ -839,7 +855,7 @@ coresight_select_best_sink(struct coresight_device *sink, int *depth,* return best sink found, or NULL if not found at this node or child nodes. */ static struct coresight_device * -coresight_find_sink (struct coresight_device *csdev,int *depth) +coresight_find_sink (struct coresight_device *csdev,int *depth,bool enabled) {int i, curr_depth = *depth +1 , found_depth =0 ;struct coresight_device *found_sink =NULL ;@@ -862,7 +878,8 @@ coresight_find_sink(struct coresight_device *csdev, int *depth) child_dev = csdev->pdata->conns[i].child_dev;if (child_dev) - sink =coresight_find_sink (child_dev, &child_depth); + sink =coresight_find_sink (child_dev, &child_depth, + enabled);if (sink) found_sink = coresight_select_best_sink(found_sink,@@ -872,6 +889,10 @@ coresight_find_sink(struct coresight_device *csdev, int *depth) } return_def_sink: +/* Check if we need to return an enabled sink */ +if (enabled && found_sink) +if (!found_sink->activated) + found_sink =NULL ;/* return found sink and depth */ if (found_sink) *depth = found_depth;@@ -901,10 +922,30 @@ coresight_find_default_sink(struct coresight_device *csdev)/* look for a default sink if we have not found for this device */ if (!csdev->def_sink) - csdev->def_sink =coresight_find_sink (csdev, &depth); + csdev->def_sink =coresight_find_sink (csdev, &depth, false);return csdev->def_sink; } +/** +* coresight_find_enabled_sink: Find the suitable enabled sink +* +* @csdev: starting source to find a connected sink. +* +* Walks connections graph looking for a suitable sink to enable for the +* supplied source. Uses CoreSight device subtypes and distance from source +* to select the best sink. +* +* Used in cases where the CoreSight user (sysfs) has selected a sink. +*/ +struct coresight_device * +coresight_find_enabled_sink (struct coresight_device *csdev) +{ +int depth =0 ; + +/* look for the enabled sink */ +return coresight_find_sink (csdev, &depth, true); +} +static int coresight_remove_sink_ref (struct device *dev,void *data) {struct coresight_device *sink = data;@@ -992,7 +1033,7 @@ int coresight_enable(struct coresight_device *csdev)* Search for a valid sink for this session but don't reset the * "enable_sink" flag in sysFS. Users get to do that explicitly. */ - sink =coresight_get_enabled_sink (false); + sink =coresight_get_enabled_sink (csdev, false);if (!sink) { ret = -EINVAL ; goto out; --
Quoted 2 lines
2.25.1
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 3 lines · Linu Cherian
Hi Mathieu,
Any comments on this patch ?
Let's see... You're poking me to review a patch that doesn't clear checkpatch (with a blatant violation) and that, 6 days after it was sent out?
Quoted 174 lines · Linu Cherian
Quoted 32 lines
Coresight driver assumes sink is common across all the ETMs, and tries to build a path between ETM and the first enabled sink found using bus based search. This breaks sysFS usage on implementations that has multiple per core sinks in enabled state.
For this,
-coresight_find_sinkAPI is updated with an additional flag so that it is able to return an enabled sink
-coresight_get_enabled_sinkAPI is updated to do a connection based search, when a source reference is given.Change-Id I6cc91ddb3ef8936a8f41a5f7c7c455b0ece9d85dSigned-off-by Linu Cherian <[email protected]>---
Applies on https://git.linaro.org/kernel/coresight.git/log/?h=nextChanges in V2:
- Fixed few typos in commit message
- Rephrased commit message.../hwtracing/coresight/coresight-etm-perf.c | 2 +- drivers/hwtracing/coresight/coresight-priv.h | 5 +- drivers/hwtracing/coresight/coresight.c | 51 +++++++++++++++++-- 3 files changed, 51 insertions(+), 7 deletions(-)drivers/hwtracing/coresight/coresight-etm-perf.c +0
-0drivers/hwtracing/coresight/coresight-etm-perf.c static void *etm_setup_aux(struct perf_event *event, void **pages, · line 223
Quoted 1 line
drivers/hwtracing/coresight/coresight-etm-perf.c +0
-0@@ -223,7 +223,7 @@ static void *etm_setup_aux(struct perf_event *event, void **pages, id = (u32 )event->attr.config2;sink = coresight_get_sink_by_id(id);Quoted 137 lines
drivers/hwtracing/coresight/coresight-etm-perf.c +1
-1}else { - sink =coresight_get_enabled_sink (true); + sink =coresight_get_enabled_sink (NULL , true); } mask = &event_data->mask;drivers/hwtracing/coresight/coresight-priv.h +4
-1@@ -148,10 +148,13 @@ static inline void coresight_write_reg_pair(void __iomem *addr, u64 val,void coresight_disable_path (struct list_head *path);int coresight_enable_path (struct list_head *path,u32 mode,void *sink_data);struct coresight_device *coresight_get_sink (struct list_head *path); -struct coresight_device *coresight_get_enabled_sink (bool reset); +struct coresight_device * +coresight_get_enabled_sink (struct coresight_device *source,bool reset);struct coresight_device *coresight_get_sink_by_id (u32 id);struct coresight_device *coresight_find_default_sink (struct coresight_device *csdev); +struct coresight_device * +coresight_find_enabled_sink (struct coresight_device *csdev);struct list_head *coresight_build_path (struct coresight_device *csdev,struct coresight_device *sink);void coresight_release_path (struct list_head *path);drivers/hwtracing/coresight/coresight.c +45
-4@@ -566,6 +566,10 @@ static int coresight_enabled_sink(struct device *dev, const void *data)/** * coresight_get_enabled_sink - returns the first enabled sink found on the bus +* When a source reference is given, enabled sink is found using connection based +* search. +* +* @source: Coresight source device reference * @deactivate: Whether the 'enable_sink' flag should be reset * * When operated from perf the deactivate parameter should be set to 'true'. @@ -576,10 +580,21 @@ static int coresight_enabled_sink(struct device *dev, const void *data)* parameter should be set to 'false', hence mandating users to explicitly * clear the flag. */ -struct coresight_device *coresight_get_enabled_sink (bool deactivate) +struct coresight_device * +coresight_get_enabled_sink (struct coresight_device *source,bool deactivate) {struct device *dev =NULL ; +struct coresight_device *sink; + +if (!source) + goto bus_search; + sink =coresight_find_enabled_sink (source); +if (sink && deactivate) + sink->activated = false; + +return sink; +bus_search: dev =bus_find_device (&coresight_bustype,NULL , &deactivate, coresight_enabled_sink);@@ -828,6 +843,7 @@ coresight_select_best_sink(struct coresight_device *sink, int *depth,* * @csdev: source / current device to check. * @depth: [in] search depth of calling dev, [out] depth of found sink. +* @enabled: flag to search only enabled sinks * * This will walk the connection path from a source (ETM) till a suitable * sink is encountered and return that sink to the original caller. @@ -839,7 +855,7 @@ coresight_select_best_sink(struct coresight_device *sink, int *depth,* return best sink found, or NULL if not found at this node or child nodes. */ static struct coresight_device * -coresight_find_sink (struct coresight_device *csdev,int *depth) +coresight_find_sink (struct coresight_device *csdev,int *depth,bool enabled) {int i, curr_depth = *depth +1 , found_depth =0 ;struct coresight_device *found_sink =NULL ;@@ -862,7 +878,8 @@ coresight_find_sink(struct coresight_device *csdev, int *depth) child_dev = csdev->pdata->conns[i].child_dev;if (child_dev) - sink =coresight_find_sink (child_dev, &child_depth); + sink =coresight_find_sink (child_dev, &child_depth, + enabled);if (sink) found_sink = coresight_select_best_sink(found_sink,@@ -872,6 +889,10 @@ coresight_find_sink(struct coresight_device *csdev, int *depth) } return_def_sink: +/* Check if we need to return an enabled sink */ +if (enabled && found_sink) +if (!found_sink->activated) + found_sink =NULL ;/* return found sink and depth */ if (found_sink) *depth = found_depth;@@ -901,10 +922,30 @@ coresight_find_default_sink(struct coresight_device *csdev)/* look for a default sink if we have not found for this device */ if (!csdev->def_sink) - csdev->def_sink =coresight_find_sink (csdev, &depth); + csdev->def_sink =coresight_find_sink (csdev, &depth, false);return csdev->def_sink; } +/** +* coresight_find_enabled_sink: Find the suitable enabled sink +* +* @csdev: starting source to find a connected sink. +* +* Walks connections graph looking for a suitable sink to enable for the +* supplied source. Uses CoreSight device subtypes and distance from source +* to select the best sink. +* +* Used in cases where the CoreSight user (sysfs) has selected a sink. +*/ +struct coresight_device * +coresight_find_enabled_sink (struct coresight_device *csdev) +{ +int depth =0 ; + +/* look for the enabled sink */ +return coresight_find_sink (csdev, &depth, true); +} +static int coresight_remove_sink_ref (struct device *dev,void *data) {struct coresight_device *sink = data;@@ -992,7 +1033,7 @@ int coresight_enable(struct coresight_device *csdev)* Search for a valid sink for this session but don't reset the * "enable_sink" flag in sysFS. Users get to do that explicitly. */
Quoted 8 lines
Quoted 8 lines
drivers/hwtracing/coresight/coresight.c +1
-2- sink =coresight_get_enabled_sink (false); + sink =coresight_get_enabled_sink (csdev, false);if (!sink) { ret = -EINVAL ; goto out; --2.25.1
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Hi Mathieu,
Quoted 7 lines · Mathieu Poirier
Quoted 3 lines · Linu Cherian
Hi Mathieu,
Any comments on this patch ?
Let's see... You're poking me to review a patch that doesn't clear checkpatch (with a blatant violation) and that, 6 days after it was sent out?
Apologies, it happened by mistake.
Have submitted V3 fixing this.
Signature · 6 lines
Linu cherian _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel