aboutsummaryrefslogtreecommitdiff
path: root/hw/isa/apm.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2020-05-24 18:48:06 +0200
committerLaurent Vivier <laurent@vivier.eu>2020-06-09 19:05:20 +0200
commit18cdeb72bb9ad7a574be68175e72068ced70e443 (patch)
treef648e1fb1228099156b0540456ff5c653d0c561c /hw/isa/apm.c
parent3b34ee6780f5ebf4c641a7522288b9e7e4e123d6 (diff)
downloadqemu-18cdeb72bb9ad7a574be68175e72068ced70e443.zip
qemu-18cdeb72bb9ad7a574be68175e72068ced70e443.tar.gz
qemu-18cdeb72bb9ad7a574be68175e72068ced70e443.tar.bz2
hw/isa/apm: Convert debug printf()s to trace events
Convert APM_DPRINTF() to trace events and remove ifdef'ry. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20200524164806.12658-1-f4bug@amsat.org> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'hw/isa/apm.c')
-rw-r--r--hw/isa/apm.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/hw/isa/apm.c b/hw/isa/apm.c
index 6300b1b..bce266b 100644
--- a/hw/isa/apm.c
+++ b/hw/isa/apm.c
@@ -24,14 +24,8 @@
#include "hw/isa/apm.h"
#include "hw/pci/pci.h"
#include "migration/vmstate.h"
+#include "trace.h"
-//#define DEBUG
-
-#ifdef DEBUG
-# define APM_DPRINTF(format, ...) printf(format, ## __VA_ARGS__)
-#else
-# define APM_DPRINTF(format, ...) do { } while (0)
-#endif
/* fixed I/O location */
#define APM_STS_IOPORT 0xb3
@@ -41,8 +35,8 @@ static void apm_ioport_writeb(void *opaque, hwaddr addr, uint64_t val,
{
APMState *apm = opaque;
addr &= 1;
- APM_DPRINTF("apm_ioport_writeb addr=0x%" HWADDR_PRIx
- " val=0x%02" PRIx64 "\n", addr, val);
+
+ trace_apm_io_write(addr, val);
if (addr == 0) {
apm->apmc = val;
@@ -65,7 +59,8 @@ static uint64_t apm_ioport_readb(void *opaque, hwaddr addr, unsigned size)
} else {
val = apm->apms;
}
- APM_DPRINTF("apm_ioport_readb addr=0x%" HWADDR_PRIx " val=0x%02x\n", addr, val);
+ trace_apm_io_read(addr, val);
+
return val;
}