SoCs such as the i.MX8M Plus have several of these watchdog devices. Allow to distinguish the instances when tracing.
Signed-off-by: Bernhard Beschow <[email protected]> --- hw/watchdog/wdt_imx2.c | 8 ++++---- hw/watchdog/trace-events | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/watchdog/wdt_imx2.c b/hw/watchdog/wdt_imx2.c index c8ea704aa3..f5ba69ca7e 100644 --- a/hw/watchdog/wdt_imx2.c +++ b/hw/watchdog/wdt_imx2.c @@ -23,7 +23,7 @@ static void imx2_wdt_interrupt(void *opaque) { IMX2WdtState *s = IMX2_WDT(opaque); - trace_imx2_wdt_interrupt(); + trace_imx2_wdt_interrupt(DEVICE(s)->canonical_path); s->wicr |= IMX2_WDT_WICR_WTIS; qemu_set_irq(s->irq, 1); @@ -33,7 +33,7 @@ static void imx2_wdt_expired(void *opaque) { IMX2WdtState *s = IMX2_WDT(opaque); - trace_imx2_wdt_expired(); + trace_imx2_wdt_expired(DEVICE(s)->canonical_path); s->wrsr = IMX2_WDT_WRSR_TOUT; @@ -90,7 +90,7 @@ static uint64_t imx2_wdt_read(void *opaque, hwaddr addr, unsigned int size) break; } - trace_imx2_wdt_read(addr, value); + trace_imx2_wdt_read(DEVICE(s)->canonical_path, addr, value); return value; } @@ -149,7 +149,7 @@ static void imx2_wdt_write(void *opaque, hwaddr addr, { IMX2WdtState *s = IMX2_WDT(opaque); - trace_imx2_wdt_write(addr, value); + trace_imx2_wdt_write(DEVICE(s)->canonical_path, addr, value); switch (addr) { case IMX2_WDT_WCR: diff --git a/hw/watchdog/trace-events b/hw/watchdog/trace-events index b388f7b250..5963943d5d 100644 --- a/hw/watchdog/trace-events +++ b/hw/watchdog/trace-events @@ -18,10 +18,10 @@ aspeed_wdt_read(uint64_t addr, uint32_t size) "@0x%" PRIx64 " size=%d" aspeed_wdt_write(uint64_t addr, uint32_t size, uint64_t data) "@0x%" PRIx64 " size=%d value=0x%"PRIx64 # wdt_imx2.c -imx2_wdt_read(uint32_t addr, uint16_t data) "[0x%" PRIx32 "] -> 0x%" PRIx16 -imx2_wdt_write(uint32_t addr, uint16_t data) "[0x%" PRIx32 "] <- 0x%" PRIx16 -imx2_wdt_interrupt(void) "" -imx2_wdt_expired(void) "" +imx2_wdt_read(const char *qom_path, uint32_t addr, uint16_t data) "%s: [0x%" PRIx32 "] -> 0x%" PRIx16 +imx2_wdt_write(const char *qom_path, uint32_t addr, uint16_t data) "%s: [0x%" PRIx32 "] <- 0x%" PRIx16 +imx2_wdt_interrupt(const char *qom_path) "%s" +imx2_wdt_expired(const char *qom_path) "%s" # spapr_watchdog.c spapr_watchdog_start(uint64_t flags, uint64_t num, uint64_t timeout) "Flags 0x%" PRIx64 " num=%" PRId64 " %" PRIu64 "ms" -- 2.55.0
