coresight: trbe: Make sure we have enough space
authorSuzuki K Poulose <suzuki.poulose@arm.com>
Tue, 19 Oct 2021 16:31:50 +0000 (17:31 +0100)
committerMathieu Poirier <mathieu.poirier@linaro.org>
Wed, 27 Oct 2021 17:45:59 +0000 (11:45 -0600)
commitadf35d058617c94810c03628efd7ae7821f3c5e7
tree7820962ed3895405bdc49565afa2271c9a16ca35
parent7c2cc5e26cc0c6bc2478ac203e3fe71950418ea0
coresight: trbe: Make sure we have enough space

The TRBE driver makes sure that there is enough space for a meaningful
run, otherwise pads the given space and restarts the offset calculation
once. But there is no guarantee that we may find space or hit "no space".
Make sure that we repeat the step until, either :
  - We have the minimum space
   OR
  - There is NO space at all.

Cc: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Leo Yan <leo.yan@linaro.org>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20211019163153.3692640-13-suzuki.poulose@arm.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
drivers/hwtracing/coresight/coresight-trbe.c