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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Complete the rename by changing cs to coresight for variables,
functions and constants.
Change-Id: I506d5872e5c09f201c4f3674d7722d36eca26921
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
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>