[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 02/14] dbdma: always define DBDMA_DPRINTF and enable de
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 02/14] dbdma: always define DBDMA_DPRINTF and enable debug with DEBUG_DBDMA |
Date: |
Mon, 18 Jul 2016 14:38:38 +1000 |
From: Mark Cave-Ayland <address@hidden>
Enabling DBDMA_DPRINTF unconditionally ensures that any errors in debug
statements are picked up immediately.
Signed-off-by: Mark Cave-Ayland <address@hidden>
Acked-by: Benjamin Herrenschmidt <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/misc/macio/mac_dbdma.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/hw/misc/macio/mac_dbdma.c b/hw/misc/macio/mac_dbdma.c
index f116f9c..b6639f4 100644
--- a/hw/misc/macio/mac_dbdma.c
+++ b/hw/misc/macio/mac_dbdma.c
@@ -45,14 +45,13 @@
#include "sysemu/dma.h"
/* debug DBDMA */
-//#define DEBUG_DBDMA
+#define DEBUG_DBDMA 0
-#ifdef DEBUG_DBDMA
-#define DBDMA_DPRINTF(fmt, ...) \
- do { printf("DBDMA: " fmt , ## __VA_ARGS__); } while (0)
-#else
-#define DBDMA_DPRINTF(fmt, ...)
-#endif
+#define DBDMA_DPRINTF(fmt, ...) do { \
+ if (DEBUG_DBDMA) { \
+ printf("DBDMA: " fmt , ## __VA_ARGS__); \
+ } \
+} while (0);
/*
*/
@@ -62,7 +61,7 @@ static DBDMAState *dbdma_from_ch(DBDMA_channel *ch)
return container_of(ch, DBDMAState, channels[ch->channel]);
}
-#ifdef DEBUG_DBDMA
+#if DEBUG_DBDMA
static void dump_dbdma_cmd(dbdma_cmd *cmd)
{
printf("dbdma_cmd %p\n", cmd);
--
2.7.4
- [Qemu-ppc] [PULL 00/14] ppc-for-2.7 queue 20160718, David Gibson, 2016/07/18
- [Qemu-ppc] [PULL 02/14] dbdma: always define DBDMA_DPRINTF and enable debug with DEBUG_DBDMA,
David Gibson <=
- [Qemu-ppc] [PULL 01/14] spapr: fix core unplug crash, David Gibson, 2016/07/18
- [Qemu-ppc] [PULL 14/14] ppc: Yet another fix for the huge page support detection mechanism, David Gibson, 2016/07/18
- [Qemu-ppc] [PULL 03/14] dbdma: add per-channel debugging enabled via DEBUG_DBDMA_CHANMASK, David Gibson, 2016/07/18
- [Qemu-ppc] [PULL 05/14] dbdma: fix load_word/store_word value endianness, David Gibson, 2016/07/18
- [Qemu-ppc] [PULL 10/14] spapr: Ensure CPU cores are added contiguously and removed in LIFO order, David Gibson, 2016/07/18
- [Qemu-ppc] [PULL 07/14] dbdma: reset io->processing flag for unassigned DBDMA channel rw accesses, David Gibson, 2016/07/18
- [Qemu-ppc] [PULL 13/14] target-ppc: fix left shift overflow in hpte_page_shift, David Gibson, 2016/07/18
- [Qemu-ppc] [PULL 06/14] dbdma: set FLUSH bit upon reception of flush command for unassigned DBDMA channels, David Gibson, 2016/07/18
- [Qemu-ppc] [PULL 08/14] ppc: Fix support for odd MSR combinations, David Gibson, 2016/07/18
- [Qemu-ppc] [PULL 04/14] dbdma: fix endian of DBDMA_CMDPTR_LO during branch, David Gibson, 2016/07/18