summaryrefslogtreecommitdiffstats
path: root/hw/block/pflash_cfi02.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé2019-11-08 15:11:34 +0100
committerPhilippe Mathieu-Daudé2019-11-19 14:45:58 +0100
commit10f9f1fbed11e520e6fd71f02cd71f0e9c759b69 (patch)
tree138028d0bfcca678dea1da63bde346cf4fde8ffd /hw/block/pflash_cfi02.c
parentMerge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2019-11-19' into st... (diff)
downloadqemu-10f9f1fbed11e520e6fd71f02cd71f0e9c759b69.tar.gz
qemu-10f9f1fbed11e520e6fd71f02cd71f0e9c759b69.tar.xz
qemu-10f9f1fbed11e520e6fd71f02cd71f0e9c759b69.zip
hw/block/pflash: Remove dynamic field width from trace events
Since not all trace backends support dynamic field width in format (dtrace via stap does not), replace by a static field width instead. We previously passed to the trace API 'width << 1' as the number of hex characters to display (the dynamic field width). We don't need this anymore. Instead, display the size of bytes accessed. Fixes: e8aa2d95ea ("pflash: Simplify trace_pflash_io_read/write") Fixes: c1474acd5d ("pflash: Simplify trace_pflash_data_read/write") Reported-by: Eric Blake <eblake@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Buglink: https://bugs.launchpad.net/qemu/+bug/1844817 Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Diffstat (limited to 'hw/block/pflash_cfi02.c')
-rw-r--r--hw/block/pflash_cfi02.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c
index 4baca701b7..c7d92c3e79 100644
--- a/hw/block/pflash_cfi02.c
+++ b/hw/block/pflash_cfi02.c
@@ -260,7 +260,7 @@ static uint64_t pflash_data_read(PFlashCFI02 *pfl, hwaddr offset,
{
uint8_t *p = (uint8_t *)pfl->storage + offset;
uint64_t ret = pfl->be ? ldn_be_p(p, width) : ldn_le_p(p, width);
- trace_pflash_data_read(offset, width << 1, ret);
+ trace_pflash_data_read(offset, width, ret);
return ret;
}
@@ -385,7 +385,7 @@ static uint64_t pflash_read(void *opaque, hwaddr offset, unsigned int width)
}
break;
}
- trace_pflash_io_read(offset, width, width << 1, ret, pfl->cmd, pfl->wcycle);
+ trace_pflash_io_read(offset, width, ret, pfl->cmd, pfl->wcycle);
return ret;
}
@@ -432,7 +432,7 @@ static void pflash_write(void *opaque, hwaddr offset, uint64_t value,
uint8_t *p;
uint8_t cmd;
- trace_pflash_io_write(offset, width, width << 1, value, pfl->wcycle);
+ trace_pflash_io_write(offset, width, value, pfl->wcycle);
cmd = value;
if (pfl->cmd != 0xA0) {
/* Reset does nothing during chip erase and sector erase. */
@@ -542,7 +542,7 @@ static void pflash_write(void *opaque, hwaddr offset, uint64_t value,
}
goto reset_flash;
}
- trace_pflash_data_write(offset, width << 1, value, 0);
+ trace_pflash_data_write(offset, width, value, 0);
if (!pfl->ro) {
p = (uint8_t *)pfl->storage + offset;
if (pfl->be) {