Commit Graph

13 Commits

Author SHA1 Message Date
Pratik Patel 9609f534ff coresight: use pr_err_ratelimited for coresight abort error
Switch to using pr_err_ratelimited so as to not flood the logs if
coresight_abort gets called repeatedly from panic while the
semaphore is acquired but not released.

Change-Id: Ife180795be0e605c587b117eb0441081b154da5e
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
2014-09-19 16:56:54 -07:00
Pratik Patel 7f9855900b coresight: use export_symbol api consistently
Switch to using EXPORT_SYMBOL from EXPORT_SYMBOL_GPL where
applicable to make export symbol api usage consistent for all
coresight drivers.

Change-Id: Iad00b6a55a23a9ae87a5534d523e4e1eb1c56395
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
2013-09-04 16:24:57 -07:00
Pratik Patel bba3669d95 coresight: use core_initcall for coresight core layer code
Move to using core_initcall instead of subsys_initcall for the
coresight core layer code so that drivers (eg. bus driver) that
probe early on can use the core layer coresight_register api in
their probe functions.

Change-Id: I8e7f208e177513d4da73d0931a4fa0767841b8cf
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
2013-09-04 15:56:07 -07:00
Pratik Patel 588f27aa4f coresight: improve error handling for exported coresight apis
Enhance error handling to provide graceful behavior in the case
of incorrect topology representation by the user. This
specifically improves the behavior when some of the required
device DT nodes are missed or required driver(s) are not
compiled.

Change-Id: I1bb72732a6f2d230775d8ce1ffec574adc3890d0
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
2013-09-04 15:55:08 -07:00
Pratik Patel 0f30883c19 coresight: return error if null or error is passed to coresight_register
Fail coresight_register if invalid (error or null) argument is
passed to avoid crashes.

Change-Id: I6c39ba2b81333f24480fdf5b348934651e095be5
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
2013-09-04 15:49:50 -07:00
Pratik Patel 0f04d6d0ea coresight: ignore multiple calls to coresight_abort
coresight_abort allows for abruptly stopping the current sink from
accepting new data hence avoiding polluting trace with information
after the point of interest.

Depending upon the call site, coresight_abort could end up getting
called more than once. This change will help with ignoring
subsequent calls to coresight_abort so that abort callback is
called just once. This is in line with treating abort as a one time
abrupt stop.

Change-Id: I634001e832ee7fa1b23f67698bd2d5dd12f8d65d
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
2013-09-04 15:22:57 -07:00
Pratik Patel 1fa14e959e coresight: support for etr to usb output
Support for etr to usb trace output using QDSS BAM to USB BAM
transfers.

Change-Id: Ibb6f8d0cf1d9799668cb22ccaa13966139c8dea5
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
2013-09-04 15:17:07 -07:00
Pratik Patel 1847b5321c coresight: fix whitespace in coresight drivers
Add/remove whitespace to improve code readability.

Change-Id: Iade3100b7eb9a57f95849d6665257cffe85b26b3
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
2013-09-04 15:08:57 -07:00
Pratik Patel 2cf0b0a1d7 coresight: implement coresight abort
Provide CoreSight abort debug api to stop the active trace sink
from any context. This is a best effort api that can be used to
abruptly stop and disable the current trace sink from anywhere
in the kernel to avoid tracing and hence polluting the trace data
after the point of interest has been executed.

Change-Id: I34c528d9febec4265088a7267dbcf0e7a1f87fcf
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
2013-09-04 15:08:42 -07:00
Pratik Patel fa51345513 coresight: switch to use coresight core layer code
Switch all CoreSight drivers to start using the new CoreSight core
layer code. Remove obsolete qdss code.

Change-Id: I2d4496aea0ffd918e0bfbf4b4e58ad82ea634a59
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
2013-09-04 15:07:49 -07:00
Pratik Patel 5f2822f800 coresight: sink switching support for coresight core layer code
This allows users to switch between available trace sinks thus
providing user to choose the best switch for the debug use case.

Change-Id: I0c90396010cfcd9f3ab9d3c6d4c1cc7230632c42
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
2013-09-04 15:04:26 -07:00
Pratik Patel 63a0ab6fe4 coresight: rename variables and functions from cs to coresight
Complete the rename by changing cs to coresight for variables,
functions and constants.

Change-Id: I506d5872e5c09f201c4f3674d7722d36eca26921
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
2013-09-04 14:58:31 -07:00
Pratik Patel 30700919f3 coresight: rename directory and files from cs to coresight
Since cs is not a well known acronym for CoreSight, rename
directory and files from cs to coresight.

Change-Id: I5f9b12794b80b1c01c9ce0621d53ee6be408a361
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
2013-09-04 14:58:31 -07:00