OSDN Git Service

coresight: tmc: Hide trace buffer handling for file read
authorSuzuki K Poulose <suzuki.poulose@arm.com>
Wed, 11 Jul 2018 19:40:15 +0000 (13:40 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 15 Jul 2018 11:52:56 +0000 (13:52 +0200)
commit3495722a0093c80f66c020f90161983b46a1f5ee
tree29f5e8b8cca3f1d9bb8c26a3c3619b2449ceacab
parent5cedd22370a0a460b663c06de1fc10b4ba3c5d0b
coresight: tmc: Hide trace buffer handling for file read

At the moment we adjust the buffer pointers for reading the trace
data via misc device in the common code for ETF/ETB and ETR. Since
we are going to change how we manage the buffer for ETR, let us
move the buffer manipulation to the respective driver files, hiding
it from the common code. We do so by adding type specific helpers
for finding the length of data and the pointer to the buffer,
for a given length at a file position.

Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwtracing/coresight/coresight-tmc-etf.c
drivers/hwtracing/coresight/coresight-tmc-etr.c
drivers/hwtracing/coresight/coresight-tmc.c
drivers/hwtracing/coresight/coresight-tmc.h