coresight: tmc-etr: Refactor function tmc_etr_setup_perf_buf()
authorMathieu Poirier <mathieu.poirier@linaro.org>
Thu, 25 Apr 2019 19:53:02 +0000 (13:53 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Apr 2019 20:00:17 +0000 (22:00 +0200)
commit855ab61c16bf70b646fa9c84e7b07d14a003cd42
treee832b6b5428c9aea6a225e47d257f93594f5c45b
parenta0f08a6a9fee0ce3f2d36e3e30799e4c1ec171f4
coresight: tmc-etr: Refactor function tmc_etr_setup_perf_buf()

Refactoring function tmc_etr_setup_perf_buf() so that it only deals
with the high level etr_perf_buffer, leaving the allocation of the
backend buffer (i.e etr_buf) to another function.

That way the backend buffer allocation function can decide if it wants
to reuse an existing buffer (CPU-wide trace scenarios) or simply create
a new one.

Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Tested-by: Leo Yan <leo.yan@linaro.org>
Tested-by: Robert Walker <robert.walker@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwtracing/coresight/coresight-tmc-etr.c