trace: fix ARM TrustZone PPC hwaddr type
PATCH 1/1 trace: fix ARM TrustZone PPC hwaddr type
Commit 9eb8040c2d2b ("hw/misc/tz-ppc: Model TrustZone peripheral protection controller") added trace events with hwaddr type arguments.
This is not allowed and leads to the following compiler errors when building with ./configure --enable-trace-backends=ust:
trace-ust-all.h:11847:20: error: unknown type name ‘hwaddr’; did you mean ‘h_addr’?
TP_ARGS(int, n, hwaddr, offset, bool, secure, bool, user),
Generated LTTng UST tracepoint definitions cannot include declarations for all QEMU types and therefore docs/devel/tracing.txt requires using only primitive or stdint.h types.
--- hw/misc/trace-events | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
hw/misc/trace-events +2 -2
@@ -92,8 +92,8 @@ tz_ppc_cfg_sec_resp(int level) "TZ PPC: cfg_sec_resp = %d" tz_ppc_irq_enable(int level) "TZ PPC: int_enable = %d" tz_ppc_irq_clear(int level) "TZ PPC: int_clear = %d" tz_ppc_update_irq(int level) "TZ PPC: setting irq line to %d" -tz_ppc_read_blocked(int n, hwaddr offset, bool secure, bool user) "TZ PPC: port %d offset 0x%" HWADDR_PRIx " read (secure %d user %d) blocked" -tz_ppc_write_blocked(int n, hwaddr offset, bool secure, bool user) "TZ PPC: port %d offset 0x%" HWADDR_PRIx " write (secure %d user %d) blocked" +tz_ppc_read_blocked(int n, uint64_t offset, bool secure, bool user) "TZ PPC: port %d offset 0x%" PRIx64 " read (secure %d user %d) blocked" +tz_ppc_write_blocked(int n, uint64_t offset, bool secure, bool user) "TZ PPC: port %d offset 0x%" PRIx64 " write (secure %d user %d) blocked" # hw/misc/iotkit-secctl.c iotkit_secctl_s_read(uint32_t offset, uint64_t data, unsigned size) "IoTKit SecCtl S regs read: offset 0x%x data 0x%" PRIx64 " size %u"
Signature · 1 line
2.14.3
Quoted 6 lines · Stefan Hajnoczi
Commit
9eb8040c2d2b("hw/misc/tz-ppc: Model TrustZone peripheral protection controller") added trace events with hwaddr type arguments.This is not allowed and leads to the following compiler errors when building with ./configure --enable-trace-backends=ust:
Quoted 6 lines
trace-ust-all.h:11847:20: error: unknown type name ‘hwaddr’; did you mean ‘h_addr’?
TP_ARGS(int, n, hwaddr, offset, bool, secure, bool, user),Generated LTTng UST tracepoint definitions cannot include declarations for all QEMU types and therefore
docs/devel/tracing.txtrequires using only primitive orstdint.htypes.
Maybe the trace generator script can check for legal/forbidden types?
Quoted 3 lines
Cc Peter Maydell <[email protected]>Signed-off-by Stefan Hajnoczi <[email protected]>
Quoted 20 lines
--- hw/misc/trace-events | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)hw/misc/trace-events +2
-2@@ -92,8 +92,8 @@ tz_ppc_cfg_sec_resp(int level) "TZ PPC: cfg_sec_resp = %d" tz_ppc_irq_enable(int level) "TZ PPC: int_enable = %d" tz_ppc_irq_clear(int level) "TZ PPC: int_clear = %d" tz_ppc_update_irq(int level) "TZ PPC: setting irq line to %d" -tz_ppc_read_blocked(int n, hwaddr offset, bool secure, bool user) "TZ PPC: port %d offset 0x%" HWADDR_PRIx " read (secure %d user %d) blocked" -tz_ppc_write_blocked(int n, hwaddr offset, bool secure, bool user) "TZ PPC: port %d offset 0x%" HWADDR_PRIx " write (secure %d user %d) blocked" +tz_ppc_read_blocked(int n, uint64_t offset, bool secure, bool user) "TZ PPC: port %d offset 0x%" PRIx64 " read (secure %d user %d) blocked" +tz_ppc_write_blocked(int n, uint64_t offset, bool secure, bool user) "TZ PPC: port %d offset 0x%" PRIx64 " write (secure %d user %d) blocked" # hw/misc/iotkit-secctl.c iotkit_secctl_s_read(uint32_t offset, uint64_t data, unsigned size) "IoTKit SecCtl S regs read: offset 0x%x data 0x%" PRIx64 " size %u"
Quoted 9 lines · Stefan Hajnoczi
Commit
9eb8040c2d2b("hw/misc/tz-ppc: Model TrustZone peripheral protection controller") added trace events with hwaddr type arguments.This is not allowed and leads to the following compiler errors when building with ./configure --enable-trace-backends=ust:
trace-ust-all.h:11847:20: error: unknown type name ‘hwaddr’; did you mean ‘h_addr’?
TP_ARGS(int, n, hwaddr, offset, bool, secure, bool, user),
Quoted 7 lines
Generated LTTng UST tracepoint definitions cannot include declarations for all QEMU types and therefore
docs/devel/tracing.txtrequires using only primitive orstdint.htypes.Cc Peter Maydell <[email protected]>Signed-off-by Stefan Hajnoczi <[email protected]>---
Thanks -- Dan sent a patch for this already which I've committed to master as commit f32408f3b472a08.
-- PMM
Quoted 7 lines · Philippe Mathieu-Daudé
Quoted 6 lines · Stefan Hajnoczi
Commit
9eb8040c2d2b("hw/misc/tz-ppc: Model TrustZone peripheral protection controller") added trace events with hwaddr type arguments.This is not allowed and leads to the following compiler errors when building with ./configure --enable-trace-backends=ust:
Quoted 8 lines
Quoted 6 lines
trace-ust-all.h:11847:20: error: unknown type name ‘hwaddr’; did you mean ‘h_addr’?
TP_ARGS(int, n, hwaddr, offset, bool, secure, bool, user),Generated LTTng UST tracepoint definitions cannot include declarations for all QEMU types and therefore
docs/devel/tracing.txtrequires using only primitive orstdint.htypes.Maybe the trace generator script can check for legal/forbidden types?
Yes, good idea. I'll add it to my todo list.
Stefan