OpenCloudOS-Kernel/drivers/hwtracing/coresight
Suzuki K Poulose 5014e90468 coresight: Handle build path error
Enabling a component via sysfs (echo 1 > enable_source), would
trigger building a path from the enabled sources to the sink.
If there is an error in the process (e.g, sink not enabled or
the device (CPU corresponding to ETM) is not online), we never report
failure, except for leaving a message in the dmesg.

Do proper error checking for the build path and return the error.

Before:
 $ echo 0 > /sys/devices/system/cpu/cpu2/online
 $ echo 1 > /sys/devices/cs_etm/cpu2/enable_source
 $ echo $?
 0

After:
 $ echo 0 > /sys/devices/system/cpu/cpu2/online
 $ echo 1 > /sys/devices/cs_etm/cpu2/enable_source
 -bash: echo: write error: No such device or address

Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Acked-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-16 00:13:06 -07:00
..
Kconfig coresight: stm: adding driver for CoreSight STM component 2016-05-03 14:59:30 -07:00
Makefile coresight: tmc: splitting driver in ETB/ETF and ETR components 2016-05-03 14:59:30 -07:00
coresight-etb10.c coresight: etb10: adjust read pointer only when needed 2016-05-03 14:59:30 -07:00
coresight-etm-cp14.c coresight: moving to new "hwtracing" directory 2015-04-03 16:17:04 +02:00
coresight-etm-perf.c drivers/hwtracing: make coresight-etm-perf.c explicitly non-modular 2016-03-05 12:19:39 -08:00
coresight-etm-perf.h coresight: etm-perf: new PMU driver for ETM tracers 2016-02-20 14:11:01 -08:00
coresight-etm.h coresight: etm3x: implementing user/kernel mode tracing 2016-02-20 14:11:01 -08:00
coresight-etm3x-sysfs.c coresight: moving coresight_simple_func() to header file 2016-05-01 14:12:14 -07:00
coresight-etm3x.c drivers/hwtracing: make coresight-* explicitly non-modular 2016-02-20 14:11:01 -08:00
coresight-etm4x-sysfs.c coresight: moving coresight_simple_func() to header file 2016-05-01 14:12:14 -07:00
coresight-etm4x.c coresight: etm4x: add tracer ID for A72 Maia processor. 2016-05-03 14:59:30 -07:00
coresight-etm4x.h coresight: etm4x: modify q_support type 2016-05-03 14:59:30 -07:00
coresight-funnel.c coresight: removing gratuitous boot time log messages 2016-05-01 14:12:14 -07:00
coresight-priv.h coresight: moving struct cs_buffers to header file 2016-05-03 14:59:30 -07:00
coresight-replicator-qcom.c drivers/hwtracing: make coresight-* explicitly non-modular 2016-02-20 14:11:01 -08:00
coresight-replicator.c coresight: removing gratuitous boot time log messages 2016-05-01 14:12:14 -07:00
coresight-stm.c coresight: stm: adding driver for CoreSight STM component 2016-05-03 14:59:30 -07:00
coresight-tmc-etf.c coresight: tmc: implementing TMC-ETF AUX space API 2016-05-03 14:59:30 -07:00
coresight-tmc-etr.c coresight: Fix erroneous memset in tmc_read_unprepare_etr 2016-06-16 00:13:06 -07:00
coresight-tmc.c coresight: tmc: keep track of memory width 2016-05-03 14:59:30 -07:00
coresight-tmc.h coresight: tmc: implementing TMC-ETF AUX space API 2016-05-03 14:59:30 -07:00
coresight-tpiu.c coresight: removing gratuitous boot time log messages 2016-05-01 14:12:14 -07:00
coresight.c coresight: Handle build path error 2016-06-16 00:13:06 -07:00
of_coresight.c drivers/hwtracing: make coresight-* explicitly non-modular 2016-02-20 14:11:01 -08:00