summary refs log tree commit diff stats
path: root/hw/arm/spitz.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2020-07-03 16:59:45 +0100
committerPeter Maydell <peter.maydell@linaro.org>2020-07-03 16:59:45 +0100
commita0a8cf78e0e1bdb8923ea1466518ea24be323292 (patch)
treeb6af369e1b8314cb96ad8c1e4ebaebe5ef60686d /hw/arm/spitz.c
parenteb2dc887a4c71d9e4efd0861fcf7094d0df9df99 (diff)
downloadfocaccia-qemu-a0a8cf78e0e1bdb8923ea1466518ea24be323292.tar.gz
focaccia-qemu-a0a8cf78e0e1bdb8923ea1466518ea24be323292.zip
hw/gpio/zaurus.c: Use LOG_GUEST_ERROR for bad guest register accesses
Instead of logging guest accesses to invalid register offsets in this
device using zaurus_printf() (which just prints to stderr), use the
usual qemu_log_mask(LOG_GUEST_ERROR,...).

Since this was the only use of the zaurus_printf() macro outside
spitz.c, we can move the definition of that macro from sharpsl.h
to spitz.c.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20200628142429.17111-14-peter.maydell@linaro.org
Diffstat (limited to 'hw/arm/spitz.c')
-rw-r--r--hw/arm/spitz.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/arm/spitz.c b/hw/arm/spitz.c
index bab9968cce..6eb4686915 100644
--- a/hw/arm/spitz.c
+++ b/hw/arm/spitz.c
@@ -62,6 +62,9 @@ typedef struct {
 #define SPITZ_MACHINE_CLASS(klass) \
     OBJECT_CLASS_CHECK(SpitzMachineClass, klass, TYPE_SPITZ_MACHINE)
 
+#define zaurus_printf(format, ...)                              \
+    fprintf(stderr, "%s: " format, __func__, ##__VA_ARGS__)
+
 #undef REG_FMT
 #define REG_FMT                         "0x%02lx"