diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2015-10-16 15:16:11 +0200 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2015-10-23 12:38:28 +1100 |
commit | 659f7f65561e78d720986d61f3112c54a97b2b96 (patch) | |
tree | 50f01e5e3ce61d9efbb063d82aeec44387b163c9 /hw | |
parent | 29f8dd66e89d59f66105af9065c10e21f85cc653 (diff) | |
download | qemu-659f7f65561e78d720986d61f3112c54a97b2b96.zip qemu-659f7f65561e78d720986d61f3112c54a97b2b96.tar.gz qemu-659f7f65561e78d720986d61f3112c54a97b2b96.tar.bz2 |
prep: do not use CPU_LOG_IOPORT, convert to tracepoints
These messages are disabled by default; a perfect usecase for tracepoints.
Convert them over.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/ppc/prep.c | 30 |
1 files changed, 3 insertions, 27 deletions
diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c index d95222b..5ad28f7 100644 --- a/hw/ppc/prep.c +++ b/hw/ppc/prep.c @@ -42,11 +42,9 @@ #include "sysemu/arch_init.h" #include "sysemu/qtest.h" #include "exec/address-spaces.h" +#include "trace.h" #include "elf.h" -//#define HARD_DEBUG_PPC_IO -//#define DEBUG_PPC_IO - /* SMP is not enabled, for now */ #define MAX_CPUS 1 @@ -57,26 +55,6 @@ #define KERNEL_LOAD_ADDR 0x01000000 #define INITRD_LOAD_ADDR 0x01800000 -#if defined (HARD_DEBUG_PPC_IO) && !defined (DEBUG_PPC_IO) -#define DEBUG_PPC_IO -#endif - -#if defined (HARD_DEBUG_PPC_IO) -#define PPC_IO_DPRINTF(fmt, ...) \ -do { \ - if (qemu_loglevel_mask(CPU_LOG_IOPORT)) { \ - qemu_log("%s: " fmt, __func__ , ## __VA_ARGS__); \ - } else { \ - printf("%s : " fmt, __func__ , ## __VA_ARGS__); \ - } \ -} while (0) -#elif defined (DEBUG_PPC_IO) -#define PPC_IO_DPRINTF(fmt, ...) \ -qemu_log_mask(CPU_LOG_IOPORT, fmt, ## __VA_ARGS__) -#else -#define PPC_IO_DPRINTF(fmt, ...) do { } while (0) -#endif - /* Constants for devices init */ static const int ide_iobase[2] = { 0x1f0, 0x170 }; static const int ide_iobase2[2] = { 0x3f6, 0x376 }; @@ -199,8 +177,7 @@ static void PREP_io_800_writeb (void *opaque, uint32_t addr, uint32_t val) { sysctrl_t *sysctrl = opaque; - PPC_IO_DPRINTF("0x%08" PRIx32 " => 0x%02" PRIx32 "\n", - addr - PPC_IO_BASE, val); + trace_prep_io_800_writeb(addr - PPC_IO_BASE, val); switch (addr) { case 0x0092: /* Special port 92 */ @@ -327,8 +304,7 @@ static uint32_t PREP_io_800_readb (void *opaque, uint32_t addr) printf("ERROR: unaffected IO port: %04" PRIx32 " read\n", addr); break; } - PPC_IO_DPRINTF("0x%08" PRIx32 " <= 0x%02" PRIx32 "\n", - addr - PPC_IO_BASE, retval); + trace_prep_io_800_readb(addr - PPC_IO_BASE, retval); return retval; } |