On Mon, 3 Oct 2022 at 12:06, Suzuki K Poulose suzuki.poulose@arm.com wrote:
On 09/08/2022 23:34, Mike Leach wrote:
Adds in a number of pr_debug macros to allow the debugging and test of the trace ID allocation system.
Signed-off-by: Mike Leach mike.leach@linaro.org
.../hwtracing/coresight/coresight-trace-id.c | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+)
diff --git a/drivers/hwtracing/coresight/coresight-trace-id.c b/drivers/hwtracing/coresight/coresight-trace-id.c index ac9092896dec..24c19ff493a9 100644 --- a/drivers/hwtracing/coresight/coresight-trace-id.c +++ b/drivers/hwtracing/coresight/coresight-trace-id.c @@ -69,6 +69,30 @@ static void coresight_trace_id_set_pend_rel(int id, struct coresight_trace_id_ma set_bit(id, id_map->pend_rel_ids); }
+/* #define TRACE_ID_DEBUG 1 */ +#ifdef TRACE_ID_DEBUG +static char page_buf[PAGE_SIZE];
+static void coresight_trace_id_dump_table(struct coresight_trace_id_map *id_map,
const char *func_name)
+{
pr_debug("%s id_map::\n", func_name);
bitmap_print_to_pagebuf(0, page_buf, id_map->used_ids, CORESIGHT_TRACE_IDS_MAX);
pr_debug("Avial= %s\n", page_buf);
Could we not use %pb directly and skip the bitmap_print_to_pagebuf ?
Suzuki
In short, yes!
Mike