* [PULL 10/11] target/arm/helper: make it clear the EC field is also in hex
[not found] <20170309111714.20394-1-alex.bennee@linaro.org>
@ 2017-03-09 11:17 ` Alex Bennée
2017-03-09 11:17 ` [PULL 11/11] hw/intc/arm_gic: modernise the DPRINTF Alex Bennée
1 sibling, 0 replies; 2+ messages in thread
From: Alex Bennée @ 2017-03-09 11:17 UTC (permalink / raw)
To: peter.maydell; +Cc: qemu-devel, Alex Bennée, open list:ARM
..just like the rest of the displayed ESR register. Otherwise people
might scratch their heads if a not obviously hex number is displayed
for the EC field.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: KONRAD Frederic <fred.konrad@greensocs.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
target/arm/helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/arm/helper.c b/target/arm/helper.c
index 3f4211b572..76b608f0ba 100644
--- a/target/arm/helper.c
+++ b/target/arm/helper.c
@@ -6857,7 +6857,7 @@ void arm_cpu_do_interrupt(CPUState *cs)
new_el);
if (qemu_loglevel_mask(CPU_LOG_INT)
&& !excp_is_internal(cs->exception_index)) {
- qemu_log_mask(CPU_LOG_INT, "...with ESR %x/0x%" PRIx32 "\n",
+ qemu_log_mask(CPU_LOG_INT, "...with ESR 0x%x/0x%" PRIx32 "\n",
env->exception.syndrome >> ARM_EL_EC_SHIFT,
env->exception.syndrome);
}
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PULL 11/11] hw/intc/arm_gic: modernise the DPRINTF
[not found] <20170309111714.20394-1-alex.bennee@linaro.org>
2017-03-09 11:17 ` [PULL 10/11] target/arm/helper: make it clear the EC field is also in hex Alex Bennée
@ 2017-03-09 11:17 ` Alex Bennée
1 sibling, 0 replies; 2+ messages in thread
From: Alex Bennée @ 2017-03-09 11:17 UTC (permalink / raw)
To: peter.maydell; +Cc: qemu-devel, Alex Bennée, open list:ARM cores
While I was debugging the icount issues I realised a bunch of the
messages look quite similar. I've fixed this by including __func__ in
the debug print. At the same time I move the a modern if (GATE) style
printf which ensures the compiler can check for format string errors
even if the code gets optimised away in the non-DEBUG_GIC case.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/intc/arm_gic.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/hw/intc/arm_gic.c b/hw/intc/arm_gic.c
index 8e5a9d8a3e..b305d9032a 100644
--- a/hw/intc/arm_gic.c
+++ b/hw/intc/arm_gic.c
@@ -26,15 +26,20 @@
#include "qemu/log.h"
#include "trace.h"
-//#define DEBUG_GIC
+/* #define DEBUG_GIC */
#ifdef DEBUG_GIC
-#define DPRINTF(fmt, ...) \
-do { fprintf(stderr, "arm_gic: " fmt , ## __VA_ARGS__); } while (0)
+#define DEBUG_GIC_GATE 1
#else
-#define DPRINTF(fmt, ...) do {} while(0)
+#define DEBUG_GIC_GATE 0
#endif
+#define DPRINTF(fmt, ...) do { \
+ if (DEBUG_GIC_GATE) { \
+ fprintf(stderr, "%s: " fmt, __func__, ## __VA_ARGS__); \
+ } \
+ } while (0)
+
static const uint8_t gic_id_11mpcore[] = {
0x00, 0x00, 0x00, 0x00, 0x90, 0x13, 0x04, 0x00, 0x0d, 0xf0, 0x05, 0xb1
};
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-09 11:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20170309111714.20394-1-alex.bennee@linaro.org>
2017-03-09 11:17 ` [PULL 10/11] target/arm/helper: make it clear the EC field is also in hex Alex Bennée
2017-03-09 11:17 ` [PULL 11/11] hw/intc/arm_gic: modernise the DPRINTF Alex Bennée
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).