Skip to content

Commit 143e92c

Browse files
coresight: etb10: fixing the right amount of words to read
This patch rectifies the amount of words to read when the internal buffer is deemed bigger than the amount of space available in the perf ring buffer. The amount to read is set to the amount of space in the perf ring buffer rather than being subtracted by it. Reported-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> (cherry picked from commit b5af0a26da84b75376706a92c7a58036a0bf3541)
1 parent feff85e commit 143e92c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/hwtracing/coresight/coresight-etb10.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ static void etb_update_buffer(struct coresight_device *csdev,
440440
u32 mask = ~(ETB_FRAME_SIZE_WORDS - 1);
441441

442442
/* The new read pointer must be frame size aligned */
443-
to_read -= handle->size & mask;
443+
to_read = handle->size & mask;
444444
/*
445445
* Move the RAM read pointer up, keeping in mind that
446446
* everything is in frame size units.

0 commit comments

Comments
 (0)