diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2009-08-23 12:23:30 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2009-08-23 12:23:30 +0000 |
commit | d453c2c32ed2bf6cfccb6c2463416c4a613eb708 (patch) | |
tree | 3102ce55f276212e2bd1b47a320537ff66d4d464 /hw/slavio_intctl.c | |
parent | 7432ff5d6b70b58d6d3d9417cf87d2fe9ba2ce6c (diff) | |
download | qemu-d453c2c32ed2bf6cfccb6c2463416c4a613eb708.tar.gz qemu-d453c2c32ed2bf6cfccb6c2463416c4a613eb708.tar.bz2 qemu-d453c2c32ed2bf6cfccb6c2463416c4a613eb708.zip |
Sparc32: fix monitor commands 'info pic' and 'info irq'
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/slavio_intctl.c')
-rw-r--r-- | hw/slavio_intctl.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/hw/slavio_intctl.c b/hw/slavio_intctl.c index dbea1f93a0..c9bad26073 100644 --- a/hw/slavio_intctl.c +++ b/hw/slavio_intctl.c @@ -220,11 +220,14 @@ static CPUWriteMemoryFunc *slavio_intctlm_mem_write[3] = { slavio_intctlm_mem_writel, }; -void slavio_pic_info(Monitor *mon, void *opaque) +void slavio_pic_info(Monitor *mon, DeviceState *dev) { - SLAVIO_INTCTLState *s = opaque; + SysBusDevice *sd; + SLAVIO_INTCTLState *s; int i; + sd = sysbus_from_qdev(dev); + s = FROM_SYSBUS(SLAVIO_INTCTLState, sd); for (i = 0; i < MAX_CPUS; i++) { monitor_printf(mon, "per-cpu %d: pending 0x%08x\n", i, s->slaves[i].intreg_pending); @@ -233,15 +236,18 @@ void slavio_pic_info(Monitor *mon, void *opaque) s->intregm_pending, s->intregm_disabled); } -void slavio_irq_info(Monitor *mon, void *opaque) +void slavio_irq_info(Monitor *mon, DeviceState *dev) { #ifndef DEBUG_IRQ_COUNT monitor_printf(mon, "irq statistic code not compiled.\n"); #else - SLAVIO_INTCTLState *s = opaque; + SysBusDevice *sd; + SLAVIO_INTCTLState *s; int i; int64_t count; + sd = sysbus_from_qdev(dev); + s = FROM_SYSBUS(SLAVIO_INTCTLState, sd); monitor_printf(mon, "IRQ statistics:\n"); for (i = 0; i < 32; i++) { count = s->irq_count[i]; |