From 661f1929d0b9ce9af530f1806cfc6136c630d405 Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Sun, 16 Oct 2011 11:53:13 +0200 Subject: monitor: Restrict pic/irq_info to supporting targets This allows to drop various stubs and move the i8359 into hwlib. Signed-off-by: Jan Kiszka Signed-off-by: Blue Swirl --- monitor.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'monitor.c') diff --git a/monitor.c b/monitor.c index 1a2895633e..ffda0feb84 100644 --- a/monitor.c +++ b/monitor.c @@ -67,6 +67,12 @@ #include "qmp-commands.h" #include "hmp.h" +/* for pic/irq_info */ +#if defined(TARGET_SPARC) +#include "hw/sun4m.h" +#endif +#include "hw/lm32_pic.h" + //#define DEBUG //#define DEBUG_COMPLETION @@ -2798,20 +2804,35 @@ static const mon_cmd_t info_cmds[] = { .help = "show the command line history", .mhandler.info = do_info_history, }, +#if defined(TARGET_I386) || defined(TARGET_PPC) || defined(TARGET_MIPS) || \ + defined(TARGET_LM32) || (defined(TARGET_SPARC) && !defined(TARGET_SPARC64)) { .name = "irq", .args_type = "", .params = "", .help = "show the interrupts statistics (if available)", +#ifdef TARGET_SPARC + .mhandler.info = sun4m_irq_info, +#elif defined(TARGET_LM32) + .mhandler.info = lm32_irq_info, +#else .mhandler.info = irq_info, +#endif }, { .name = "pic", .args_type = "", .params = "", .help = "show i8259 (PIC) state", +#ifdef TARGET_SPARC + .mhandler.info = sun4m_pic_info, +#elif defined(TARGET_LM32) + .mhandler.info = lm32_do_pic_info, +#else .mhandler.info = pic_info, +#endif }, +#endif { .name = "pci", .args_type = "", -- cgit v1.2.3