]> git.proxmox.com Git - qemu.git/commitdiff
Sparc64: split DPRINTF into CPUIRQ and EBUS versions
authorBlue Swirl <blauwirbel@gmail.com>
Wed, 30 Dec 2009 12:27:17 +0000 (12:27 +0000)
committerBlue Swirl <blauwirbel@gmail.com>
Wed, 30 Dec 2009 12:27:17 +0000 (12:27 +0000)
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
hw/sun4u.c

index fb6e6a78e1f197af124a178ccf857115e68209c5..9d46f088153e84dd22d5578c8f08f1748a0e945d 100644 (file)
 #include "elf.h"
 
 //#define DEBUG_IRQ
+//#define DEBUG_EBUS
 
 #ifdef DEBUG_IRQ
-#define DPRINTF(fmt, ...)                                       \
+#define CPUIRQ_DPRINTF(fmt, ...)                                \
     do { printf("CPUIRQ: " fmt , ## __VA_ARGS__); } while (0)
 #else
-#define DPRINTF(fmt, ...)
+#define CPUIRQ_DPRINTF(fmt, ...)
+#endif
+
+#ifdef DEBUG_EBUS
+#define EBUS_DPRINTF(fmt, ...)                                  \
+    do { printf("EBUS: " fmt , ## __VA_ARGS__); } while (0)
+#else
+#define EBUS_DPRINTF(fmt, ...)
 #endif
 
 #define KERNEL_LOAD_ADDR     0x00404000
@@ -238,14 +246,14 @@ void cpu_check_irqs(CPUState *env)
 
                 env->interrupt_index = TT_EXTINT | i;
                 if (old_interrupt != env->interrupt_index) {
-                    DPRINTF("Set CPU IRQ %d\n", i);
+                    CPUIRQ_DPRINTF("Set CPU IRQ %d\n", i);
                     cpu_interrupt(env, CPU_INTERRUPT_HARD);
                 }
                 break;
             }
         }
     } else if (!pil && (env->interrupt_index & ~15) == TT_EXTINT) {
-        DPRINTF("Reset CPU IRQ %d\n", env->interrupt_index & 15);
+        CPUIRQ_DPRINTF("Reset CPU IRQ %d\n", env->interrupt_index & 15);
         env->interrupt_index = 0;
         cpu_reset_interrupt(env, CPU_INTERRUPT_HARD);
     }
@@ -256,12 +264,12 @@ static void cpu_set_irq(void *opaque, int irq, int level)
     CPUState *env = opaque;
 
     if (level) {
-        DPRINTF("Raise CPU IRQ %d\n", irq);
+        CPUIRQ_DPRINTF("Raise CPU IRQ %d\n", irq);
         env->halted = 0;
         env->pil_in |= 1 << irq;
         cpu_check_irqs(env);
     } else {
-        DPRINTF("Lower CPU IRQ %d\n", irq);
+        CPUIRQ_DPRINTF("Lower CPU IRQ %d\n", irq);
         env->pil_in &= ~(1 << irq);
         cpu_check_irqs(env);
     }
@@ -347,8 +355,8 @@ void cpu_tick_set_limit(void *opaque, uint64_t limit)
 static void ebus_mmio_mapfunc(PCIDevice *pci_dev, int region_num,
                               pcibus_t addr, pcibus_t size, int type)
 {
-    DPRINTF("Mapping region %d registers at %" FMT_PCIBUS "\n", region_num,
-            addr);
+    EBUS_DPRINTF("Mapping region %d registers at %" FMT_PCIBUS "\n",
+                 region_num, addr);
     switch (region_num) {
     case 0:
         isa_mmio_init(addr, 0x1000000);