From: Arnaldo Carvalho de Melo <acme@kernel•org>
To: Ingo Molnar <mingo@kernel•org>, Thomas Gleixner <tglx@linutronix•de>
Cc: Mark Rutland <mark.rutland@arm•com>,
Arnaldo Carvalho de Melo <acme@redhat•com>,
Mathieu Poirier <mathieu.poirier@linaro•org>,
Suzuki Poulouse <suzuki.poulose@arm•com>,
Clark Williams <williams@redhat•com>,
coresight ml <coresight@lists•linaro.org>,
linux-kernel@vger•kernel.org, linux-perf-users@vger•kernel.org,
Alexander Shishkin <alexander.shishkin@linux•intel.com>,
Peter Zijlstra <peterz@infradead•org>,
Jiri Olsa <jolsa@kernel•org>, Leo Yan <leo.yan@linaro•org>,
Namhyung Kim <namhyung@kernel•org>, Jiri Olsa <jolsa@redhat•com>,
linux-arm-kernel@lists•infradead.org
Subject: [PATCH 08/63] perf cs-etm: Fix definition of macro TO_CS_QUEUE_NR
Date: Thu, 7 Nov 2019 15:59:16 -0300 [thread overview]
Message-ID: <20191107190011.23924-9-acme@kernel.org> (raw)
In-Reply-To: <20191107190011.23924-1-acme@kernel.org>
From: Leo Yan <leo.yan@linaro•org>
Macro TO_CS_QUEUE_NR definition has a typo, which uses 'trace_id_chan'
as its parameter, this doesn't match with its definition body which uses
'trace_chan_id'. So renames the parameter to 'trace_chan_id'.
It's luck to have a local variable 'trace_chan_id' in the function
cs_etm__setup_queue(), even we wrongly define the macro TO_CS_QUEUE_NR,
the local variable 'trace_chan_id' is used rather than the macro's
parameter 'trace_id_chan'; so the compiler doesn't complain for this
before.
After renaming the parameter, it leads to a compiling error due
cs_etm__setup_queue() has no variable 'trace_id_chan'. This patch uses
the variable 'trace_chan_id' for the macro so that fixes the compiling
error.
Signed-off-by: Leo Yan <leo.yan@linaro•org>
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro•org>
Cc: Alexander Shishkin <alexander.shishkin@linux•intel.com>
Cc: Jiri Olsa <jolsa@redhat•com>
Cc: Mark Rutland <mark.rutland@arm•com>
Cc: Namhyung Kim <namhyung@kernel•org>
Cc: Peter Zijlstra <peterz@infradead•org>
Cc: Suzuki Poulouse <suzuki.poulose@arm•com>
Cc: coresight ml <coresight@lists•linaro.org>
Cc: linux-arm-kernel@lists•infradead.org
Link: http://lore.kernel.org/lkml/20191021074808.25795-1-leo.yan@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat•com>
---
tools/perf/util/cs-etm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c
index 4ba0f871f086..f5f855fff412 100644
--- a/tools/perf/util/cs-etm.c
+++ b/tools/perf/util/cs-etm.c
@@ -110,7 +110,7 @@ static int cs_etm__decode_data_block(struct cs_etm_queue *etmq);
* encode the etm queue number as the upper 16 bit and the channel as
* the lower 16 bit.
*/
-#define TO_CS_QUEUE_NR(queue_nr, trace_id_chan) \
+#define TO_CS_QUEUE_NR(queue_nr, trace_chan_id) \
(queue_nr << 16 | trace_chan_id)
#define TO_QUEUE_NR(cs_queue_nr) (cs_queue_nr >> 16)
#define TO_TRACE_CHAN_ID(cs_queue_nr) (cs_queue_nr & 0x0000ffff)
@@ -819,7 +819,7 @@ static int cs_etm__setup_queue(struct cs_etm_auxtrace *etm,
* Note that packets decoded above are still in the traceID's packet
* queue and will be processed in cs_etm__process_queues().
*/
- cs_queue_nr = TO_CS_QUEUE_NR(queue_nr, trace_id_chan);
+ cs_queue_nr = TO_CS_QUEUE_NR(queue_nr, trace_chan_id);
ret = auxtrace_heap__add(&etm->heap, cs_queue_nr, timestamp);
out:
return ret;
--
2.21.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists•infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next parent reply other threads:[~2019-11-07 19:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20191107190011.23924-1-acme@kernel.org>
2019-11-07 18:59 ` Arnaldo Carvalho de Melo [this message]
2019-11-07 18:59 ` [PATCH 39/63] perf tools: Fix cross compile for ARM64 Arnaldo Carvalho de Melo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191107190011.23924-9-acme@kernel.org \
--to=acme@kernel$(echo .)org \
--cc=acme@redhat$(echo .)com \
--cc=alexander.shishkin@linux$(echo .)intel.com \
--cc=coresight@lists$(echo .)linaro.org \
--cc=jolsa@kernel$(echo .)org \
--cc=jolsa@redhat$(echo .)com \
--cc=leo.yan@linaro$(echo .)org \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-perf-users@vger$(echo .)kernel.org \
--cc=mark.rutland@arm$(echo .)com \
--cc=mathieu.poirier@linaro$(echo .)org \
--cc=mingo@kernel$(echo .)org \
--cc=namhyung@kernel$(echo .)org \
--cc=peterz@infradead$(echo .)org \
--cc=suzuki.poulose@arm$(echo .)com \
--cc=tglx@linutronix$(echo .)de \
--cc=williams@redhat$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox