提交 661f1929 编写于 作者: J Jan Kiszka 提交者: Blue Swirl

monitor: Restrict pic/irq_info to supporting targets

This allows to drop various stubs and move the i8359 into hwlib.
Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
上级 81a02f93
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
*/ */
#include "hw.h" #include "hw.h"
#include "pc.h"
#include "mcf.h" #include "mcf.h"
#include "boards.h" #include "boards.h"
#include "loader.h" #include "loader.h"
...@@ -18,15 +17,6 @@ ...@@ -18,15 +17,6 @@
#define AN5206_MBAR_ADDR 0x10000000 #define AN5206_MBAR_ADDR 0x10000000
#define AN5206_RAMBAR_ADDR 0x20000000 #define AN5206_RAMBAR_ADDR 0x20000000
/* Stub functions for hardware that doesn't exist. */
void pic_info(Monitor *mon)
{
}
void irq_info(Monitor *mon)
{
}
/* Board init. */ /* Board init. */
static void an5206_init(ram_addr_t ram_size, static void an5206_init(ram_addr_t ram_size,
......
...@@ -8,19 +8,8 @@ ...@@ -8,19 +8,8 @@
*/ */
#include "hw.h" #include "hw.h"
#include "pc.h"
#include "arm-misc.h" #include "arm-misc.h"
/* Stub functions for hardware that doesn't exist. */
void pic_info(Monitor *mon)
{
}
void irq_info(Monitor *mon)
{
}
/* Input 0 is IRQ and input 1 is FIQ. */ /* Input 0 is IRQ and input 1 is FIQ. */
static void arm_pic_cpu_handler(void *opaque, int irq, int level) static void arm_pic_cpu_handler(void *opaque, int irq, int level)
{ {
......
...@@ -24,16 +24,10 @@ ...@@ -24,16 +24,10 @@
#include "sysbus.h" #include "sysbus.h"
#include "hw.h" #include "hw.h"
#include "pc.h"
#include "etraxfs.h" #include "etraxfs.h"
#define D(x) #define D(x)
void pic_info(Monitor *mon)
{}
void irq_info(Monitor *mon)
{}
static void cris_pic_cpu_handler(void *opaque, int irq, int level) static void cris_pic_cpu_handler(void *opaque, int irq, int level)
{ {
CPUState *env = (CPUState *)opaque; CPUState *env = (CPUState *)opaque;
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
* THE SOFTWARE. * THE SOFTWARE.
*/ */
#include "net.h"
#include "etraxfs_dma.h" #include "etraxfs_dma.h"
qemu_irq *cris_pic_init_cpu(CPUState *env); qemu_irq *cris_pic_init_cpu(CPUState *env);
......
...@@ -39,7 +39,7 @@ struct LM32PicState { ...@@ -39,7 +39,7 @@ struct LM32PicState {
typedef struct LM32PicState LM32PicState; typedef struct LM32PicState LM32PicState;
static LM32PicState *pic; static LM32PicState *pic;
void pic_info(Monitor *mon) void lm32_do_pic_info(Monitor *mon)
{ {
if (pic == NULL) { if (pic == NULL) {
return; return;
...@@ -49,7 +49,7 @@ void pic_info(Monitor *mon) ...@@ -49,7 +49,7 @@ void pic_info(Monitor *mon)
pic->im, pic->ip, pic->irq_state); pic->im, pic->ip, pic->irq_state);
} }
void irq_info(Monitor *mon) void lm32_irq_info(Monitor *mon)
{ {
int i; int i;
uint32_t count; uint32_t count;
......
...@@ -8,4 +8,7 @@ uint32_t lm32_pic_get_im(DeviceState *d); ...@@ -8,4 +8,7 @@ uint32_t lm32_pic_get_im(DeviceState *d);
void lm32_pic_set_ip(DeviceState *d, uint32_t ip); void lm32_pic_set_ip(DeviceState *d, uint32_t ip);
void lm32_pic_set_im(DeviceState *d, uint32_t im); void lm32_pic_set_im(DeviceState *d, uint32_t im);
void lm32_do_pic_info(Monitor *mon);
void lm32_irq_info(Monitor *mon);
#endif /* QEMU_HW_LM32_PIC_H */ #endif /* QEMU_HW_LM32_PIC_H */
...@@ -23,16 +23,10 @@ ...@@ -23,16 +23,10 @@
*/ */
#include "hw.h" #include "hw.h"
#include "pc.h"
#include "microblaze_pic_cpu.h" #include "microblaze_pic_cpu.h"
#define D(x) #define D(x)
void pic_info(Monitor *mon)
{}
void irq_info(Monitor *mon)
{}
static void microblaze_pic_cpu_handler(void *opaque, int irq, int level) static void microblaze_pic_cpu_handler(void *opaque, int irq, int level)
{ {
CPUState *env = (CPUState *)opaque; CPUState *env = (CPUState *)opaque;
......
...@@ -62,17 +62,6 @@ ...@@ -62,17 +62,6 @@
static VirtIOS390Bus *s390_bus; static VirtIOS390Bus *s390_bus;
static CPUState **ipi_states; static CPUState **ipi_states;
void irq_info(Monitor *mon);
void pic_info(Monitor *mon);
void irq_info(Monitor *mon)
{
}
void pic_info(Monitor *mon)
{
}
CPUState *s390_cpu_addr2state(uint16_t cpu_addr) CPUState *s390_cpu_addr2state(uint16_t cpu_addr)
{ {
if (cpu_addr >= smp_cpus) { if (cpu_addr >= smp_cpus) {
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
More information in target-sh4/README.sh4 More information in target-sh4/README.sh4
*/ */
#include "hw.h" #include "hw.h"
#include "pc.h"
#include "sh.h" #include "sh.h"
#include "sysemu.h" #include "sysemu.h"
#include "boards.h" #include "boards.h"
...@@ -37,16 +36,6 @@ ...@@ -37,16 +36,6 @@
#define BIOS_FILENAME "shix_bios.bin" #define BIOS_FILENAME "shix_bios.bin"
#define BIOS_ADDRESS 0xA0000000 #define BIOS_ADDRESS 0xA0000000
void irq_info(Monitor *mon)
{
/* XXXXX */
}
void pic_info(Monitor *mon)
{
/* XXXXX */
}
static void shix_init(ram_addr_t ram_size, static void shix_init(ram_addr_t ram_size,
const char *boot_device, const char *boot_device,
const char *kernel_filename, const char *kernel_cmdline, const char *kernel_filename, const char *kernel_cmdline,
......
...@@ -216,13 +216,13 @@ static void nvram_init(M48t59State *nvram, uint8_t *macaddr, ...@@ -216,13 +216,13 @@ static void nvram_init(M48t59State *nvram, uint8_t *macaddr,
static DeviceState *slavio_intctl; static DeviceState *slavio_intctl;
void pic_info(Monitor *mon) void sun4m_pic_info(Monitor *mon)
{ {
if (slavio_intctl) if (slavio_intctl)
slavio_pic_info(mon, slavio_intctl); slavio_pic_info(mon, slavio_intctl);
} }
void irq_info(Monitor *mon) void sun4m_irq_info(Monitor *mon)
{ {
if (slavio_intctl) if (slavio_intctl)
slavio_irq_info(mon, slavio_intctl); slavio_irq_info(mon, slavio_intctl);
......
...@@ -30,6 +30,10 @@ void slavio_irq_info(Monitor *mon, DeviceState *dev); ...@@ -30,6 +30,10 @@ void slavio_irq_info(Monitor *mon, DeviceState *dev);
void sun4c_pic_info(Monitor *mon, void *opaque); void sun4c_pic_info(Monitor *mon, void *opaque);
void sun4c_irq_info(Monitor *mon, void *opaque); void sun4c_irq_info(Monitor *mon, void *opaque);
/* sun4m.c */
void sun4m_pic_info(Monitor *mon);
void sun4m_irq_info(Monitor *mon);
/* sparc32_dma.c */ /* sparc32_dma.c */
#include "sparc32_dma.h" #include "sparc32_dma.h"
......
...@@ -243,14 +243,6 @@ static unsigned long sun4u_load_kernel(const char *kernel_filename, ...@@ -243,14 +243,6 @@ static unsigned long sun4u_load_kernel(const char *kernel_filename,
return kernel_size; return kernel_size;
} }
void pic_info(Monitor *mon)
{
}
void irq_info(Monitor *mon)
{
}
void cpu_check_irqs(CPUState *env) void cpu_check_irqs(CPUState *env)
{ {
uint32_t pil = env->pil_in | uint32_t pil = env->pil_in |
......
...@@ -26,19 +26,9 @@ ...@@ -26,19 +26,9 @@
*/ */
#include "hw.h" #include "hw.h"
#include "pc.h"
#include "qemu-log.h" #include "qemu-log.h"
#include "qemu-timer.h" #include "qemu-timer.h"
/* Stub functions for hardware that doesn't exist. */
void pic_info(Monitor *mon)
{
}
void irq_info(Monitor *mon)
{
}
void xtensa_advance_ccount(CPUState *env, uint32_t d) void xtensa_advance_ccount(CPUState *env, uint32_t d)
{ {
uint32_t old_ccount = env->sregs[CCOUNT]; uint32_t old_ccount = env->sregs[CCOUNT];
......
...@@ -67,6 +67,12 @@ ...@@ -67,6 +67,12 @@
#include "qmp-commands.h" #include "qmp-commands.h"
#include "hmp.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
//#define DEBUG_COMPLETION //#define DEBUG_COMPLETION
...@@ -2798,20 +2804,35 @@ static const mon_cmd_t info_cmds[] = { ...@@ -2798,20 +2804,35 @@ static const mon_cmd_t info_cmds[] = {
.help = "show the command line history", .help = "show the command line history",
.mhandler.info = do_info_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", .name = "irq",
.args_type = "", .args_type = "",
.params = "", .params = "",
.help = "show the interrupts statistics (if available)", .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, .mhandler.info = irq_info,
#endif
}, },
{ {
.name = "pic", .name = "pic",
.args_type = "", .args_type = "",
.params = "", .params = "",
.help = "show i8259 (PIC) state", .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, .mhandler.info = pic_info,
#endif
}, },
#endif
{ {
.name = "pci", .name = "pci",
.args_type = "", .args_type = "",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册