Commit 6abf0f45 authored by Leo Yan's avatar Leo Yan Committed by Arnaldo Carvalho de Melo

perf cs-etm: Introduce invalid address macro

This patch introduces invalid address macro and uses it to replace dummy
value '0xdeadbeefdeadbeefUL'.
Signed-off-by: default avatarLeo Yan <leo.yan@linaro.org>
Reviewed-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Kim Phillips <kim.phillips@arm.com>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Robert Walker <robert.walker@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/1529298599-3876-2-git-send-email-leo.yan@linaro.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent e9de7e2f
...@@ -31,6 +31,8 @@ ...@@ -31,6 +31,8 @@
#endif #endif
#endif #endif
#define CS_ETM_INVAL_ADDR 0xdeadbeefdeadbeefUL
struct cs_etm_decoder { struct cs_etm_decoder {
void *data; void *data;
void (*packet_printer)(const char *msg); void (*packet_printer)(const char *msg);
...@@ -261,8 +263,8 @@ static void cs_etm_decoder__clear_buffer(struct cs_etm_decoder *decoder) ...@@ -261,8 +263,8 @@ static void cs_etm_decoder__clear_buffer(struct cs_etm_decoder *decoder)
decoder->tail = 0; decoder->tail = 0;
decoder->packet_count = 0; decoder->packet_count = 0;
for (i = 0; i < MAX_BUFFER; i++) { for (i = 0; i < MAX_BUFFER; i++) {
decoder->packet_buffer[i].start_addr = 0xdeadbeefdeadbeefUL; decoder->packet_buffer[i].start_addr = CS_ETM_INVAL_ADDR;
decoder->packet_buffer[i].end_addr = 0xdeadbeefdeadbeefUL; decoder->packet_buffer[i].end_addr = CS_ETM_INVAL_ADDR;
decoder->packet_buffer[i].last_instr_taken_branch = false; decoder->packet_buffer[i].last_instr_taken_branch = false;
decoder->packet_buffer[i].exc = false; decoder->packet_buffer[i].exc = false;
decoder->packet_buffer[i].exc_ret = false; decoder->packet_buffer[i].exc_ret = false;
...@@ -295,8 +297,8 @@ cs_etm_decoder__buffer_packet(struct cs_etm_decoder *decoder, ...@@ -295,8 +297,8 @@ cs_etm_decoder__buffer_packet(struct cs_etm_decoder *decoder,
decoder->packet_buffer[et].exc = false; decoder->packet_buffer[et].exc = false;
decoder->packet_buffer[et].exc_ret = false; decoder->packet_buffer[et].exc_ret = false;
decoder->packet_buffer[et].cpu = *((int *)inode->priv); decoder->packet_buffer[et].cpu = *((int *)inode->priv);
decoder->packet_buffer[et].start_addr = 0xdeadbeefdeadbeefUL; decoder->packet_buffer[et].start_addr = CS_ETM_INVAL_ADDR;
decoder->packet_buffer[et].end_addr = 0xdeadbeefdeadbeefUL; decoder->packet_buffer[et].end_addr = CS_ETM_INVAL_ADDR;
if (decoder->packet_count == MAX_BUFFER - 1) if (decoder->packet_count == MAX_BUFFER - 1)
return OCSD_RESP_WAIT; return OCSD_RESP_WAIT;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment