From: Jan Kiszka <jan.kiszka@web.de>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 21/22] monitor: Restrict pic/irq_info to supporting targets
Date: Wed, 28 Sep 2011 23:26:58 +0200 [thread overview]
Message-ID: <4E839122.7010803@web.de> (raw)
In-Reply-To: <CAAu8pHt01Nw1gg1FB88q9-ASzcTp3kMViO8ONM_4WsoADERYUA@mail.gmail.com>
On 2011-09-28 20:19, Blue Swirl wrote:
> On Wed, Sep 28, 2011 at 11:01 AM, Jan Kiszka<jan.kiszka@siemens.com> wrote:
>> Signed-off-by: Jan Kiszka<jan.kiszka@siemens.com>
>> ---
>> hw/an5206.c | 10 ----------
>> hw/arm_pic.c | 11 -----------
>> hw/cris_pic_cpu.c | 6 ------
>> hw/etraxfs.h | 1 +
>> hw/lm32_pic.c | 4 ++--
>> hw/lm32_pic.h | 3 +++
>> hw/microblaze_pic_cpu.c | 6 ------
>> hw/s390-virtio.c | 11 -----------
>> hw/shix.c | 11 -----------
>> hw/slavio_intctl.c | 14 ++++++++++----
>> hw/sun4m.c | 16 ++--------------
>> hw/sun4m.h | 6 ++++--
>> hw/sun4u.c | 8 --------
>> hw/xtensa_pic.c | 10 ----------
>> monitor.c | 21 +++++++++++++++++++++
>> 15 files changed, 43 insertions(+), 95 deletions(-)
>>
>> diff --git a/hw/an5206.c b/hw/an5206.c
>> index 481ae60..3fe1f00 100644
>> --- a/hw/an5206.c
>> +++ b/hw/an5206.c
>> @@ -7,7 +7,6 @@
>> */
>>
>> #include "hw.h"
>> -#include "pc.h"
>> #include "mcf.h"
>> #include "boards.h"
>> #include "loader.h"
>> @@ -18,15 +17,6 @@
>> #define AN5206_MBAR_ADDR 0x10000000
>> #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. */
>>
>> static void an5206_init(ram_addr_t ram_size,
>> diff --git a/hw/arm_pic.c b/hw/arm_pic.c
>> index 985148a..4e63845 100644
>> --- a/hw/arm_pic.c
>> +++ b/hw/arm_pic.c
>> @@ -8,19 +8,8 @@
>> */
>>
>> #include "hw.h"
>> -#include "pc.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. */
>> static void arm_pic_cpu_handler(void *opaque, int irq, int level)
>> {
>> diff --git a/hw/cris_pic_cpu.c b/hw/cris_pic_cpu.c
>> index 7f1e4ab..06ae484 100644
>> --- a/hw/cris_pic_cpu.c
>> +++ b/hw/cris_pic_cpu.c
>> @@ -24,16 +24,10 @@
>>
>> #include "sysbus.h"
>> #include "hw.h"
>> -#include "pc.h"
>> #include "etraxfs.h"
>>
>> #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)
>> {
>> CPUState *env = (CPUState *)opaque;
>> diff --git a/hw/etraxfs.h b/hw/etraxfs.h
>> index 1554b0b..24e8fd8 100644
>> --- a/hw/etraxfs.h
>> +++ b/hw/etraxfs.h
>> @@ -22,6 +22,7 @@
>> * THE SOFTWARE.
>> */
>>
>> +#include "net.h"
>> #include "etraxfs_dma.h"
>>
>> qemu_irq *cris_pic_init_cpu(CPUState *env);
>> diff --git a/hw/lm32_pic.c b/hw/lm32_pic.c
>> index 02941a7..8dd0050 100644
>> --- a/hw/lm32_pic.c
>> +++ b/hw/lm32_pic.c
>> @@ -39,7 +39,7 @@ struct LM32PicState {
>> typedef struct LM32PicState LM32PicState;
>>
>> static LM32PicState *pic;
>> -void pic_info(Monitor *mon)
>> +void lm32_do_pic_info(Monitor *mon)
>> {
>> if (pic == NULL) {
>> return;
>> @@ -49,7 +49,7 @@ void pic_info(Monitor *mon)
>> pic->im, pic->ip, pic->irq_state);
>> }
>>
>> -void irq_info(Monitor *mon)
>> +void lm32_irq_info(Monitor *mon)
>> {
>> int i;
>> uint32_t count;
>> diff --git a/hw/lm32_pic.h b/hw/lm32_pic.h
>> index e6479b8..14456f3 100644
>> --- a/hw/lm32_pic.h
>> +++ b/hw/lm32_pic.h
>> @@ -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_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 */
>> diff --git a/hw/microblaze_pic_cpu.c b/hw/microblaze_pic_cpu.c
>> index 9ad48b4..8b5623c 100644
>> --- a/hw/microblaze_pic_cpu.c
>> +++ b/hw/microblaze_pic_cpu.c
>> @@ -23,16 +23,10 @@
>> */
>>
>> #include "hw.h"
>> -#include "pc.h"
>> #include "microblaze_pic_cpu.h"
>>
>> #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)
>> {
>> CPUState *env = (CPUState *)opaque;
>> diff --git a/hw/s390-virtio.c b/hw/s390-virtio.c
>> index acbf026..778cffe 100644
>> --- a/hw/s390-virtio.c
>> +++ b/hw/s390-virtio.c
>> @@ -62,17 +62,6 @@
>> static VirtIOS390Bus *s390_bus;
>> 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)
>> {
>> if (cpu_addr>= smp_cpus) {
>> diff --git a/hw/shix.c b/hw/shix.c
>> index 638bf16..dbf4764 100644
>> --- a/hw/shix.c
>> +++ b/hw/shix.c
>> @@ -28,7 +28,6 @@
>> More information in target-sh4/README.sh4
>> */
>> #include "hw.h"
>> -#include "pc.h"
>> #include "sh.h"
>> #include "sysemu.h"
>> #include "boards.h"
>> @@ -37,16 +36,6 @@
>> #define BIOS_FILENAME "shix_bios.bin"
>> #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,
>> const char *boot_device,
>> const char *kernel_filename, const char *kernel_cmdline,
>> diff --git a/hw/slavio_intctl.c b/hw/slavio_intctl.c
>> index 329c251..2d1dc12 100644
>> --- a/hw/slavio_intctl.c
>> +++ b/hw/slavio_intctl.c
>> @@ -204,13 +204,16 @@ static CPUWriteMemoryFunc * const slavio_intctlm_mem_write[3] = {
>> slavio_intctlm_mem_writel,
>> };
>>
>> -void slavio_pic_info(Monitor *mon, DeviceState *dev)
>> +void slavio_pic_info(Monitor *mon)
>> {
>> SysBusDevice *sd;
>> SLAVIO_INTCTLState *s;
>> int i;
>>
>> - sd = sysbus_from_qdev(dev);
>> + if (!slavio_intctl) {
>> + return;
>> + }
>> + sd = sysbus_from_qdev(slavio_intctl);
>> s = FROM_SYSBUS(SLAVIO_INTCTLState, sd);
>> for (i = 0; i< MAX_CPUS; i++) {
>> monitor_printf(mon, "per-cpu %d: pending 0x%08x\n", i,
>> @@ -220,7 +223,7 @@ void slavio_pic_info(Monitor *mon, DeviceState *dev)
>> s->intregm_pending, s->intregm_disabled);
>> }
>>
>> -void slavio_irq_info(Monitor *mon, DeviceState *dev)
>> +void slavio_irq_info(Monitor *mon)
>> {
>> #ifndef DEBUG_IRQ_COUNT
>> monitor_printf(mon, "irq statistic code not compiled.\n");
>> @@ -230,7 +233,10 @@ void slavio_irq_info(Monitor *mon, DeviceState *dev)
>> int i;
>> int64_t count;
>>
>> - sd = sysbus_from_qdev(dev);
>> + if (!slavio_intctl) {
>> + return;
>> + }
>> + sd = sysbus_from_qdev(slavio_intctl);
>> s = FROM_SYSBUS(SLAVIO_INTCTLState, sd);
>> monitor_printf(mon, "IRQ statistics:\n");
>> for (i = 0; i< 32; i++) {
>> diff --git a/hw/sun4m.c b/hw/sun4m.c
>> index dcaed38..589b505 100644
>> --- a/hw/sun4m.c
>> +++ b/hw/sun4m.c
>> @@ -135,6 +135,8 @@ struct sun4c_hwdef {
>> uint8_t nvram_machine_id;
>> };
>>
>> +DeviceState *slavio_intctl;
>
> Instead of adding new global variables, could you add a registration
> mechanism instead to pass the DeviceState used by the handler?
Actually, I don't want to over-design this rather useless legacy monitor
command, rather completely remove it once device_show is merged. This
patch is just an intermediate step to enable moving i8259 to hwlib.
Jan
next prev parent reply other threads:[~2011-09-28 21:27 UTC|newest]
Thread overview: 90+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-28 11:00 [Qemu-devel] [PATCH 00/22] Rework i8259 and PC interrupt models Jan Kiszka
2011-09-28 11:00 ` [Qemu-devel] [PATCH 01/22] pc: Drop useless test from isa_irq_handler Jan Kiszka
2011-09-28 11:00 ` [Qemu-devel] [PATCH 02/22] pc: Generalize ISA IRQs to GSIs Jan Kiszka
2011-09-28 11:00 ` [Qemu-devel] [PATCH 03/22] pc: Convert GSIState::i8259_irq into array Jan Kiszka
2011-09-28 11:00 ` [Qemu-devel] [PATCH 04/22] pc: Fix and clean up PIC-to-APIC IRQ path Jan Kiszka
2011-09-28 11:00 ` [Qemu-devel] [PATCH 05/22] i8259: Remove premature inline function attributes Jan Kiszka
2011-09-28 11:00 ` [Qemu-devel] [PATCH 06/22] i8259: Drop obsolete prototypes Jan Kiszka
2011-09-28 11:00 ` [Qemu-devel] [PATCH 07/22] i8259: Move pic_set_irq1 after pic_update_irq Jan Kiszka
2011-09-28 11:00 ` [Qemu-devel] [PATCH 08/22] i8239: Introduce per-PIC output interrupt Jan Kiszka
2011-09-28 11:00 ` [Qemu-devel] [PATCH 09/22] i8259: Do not update IRQ output after spurious pic_poll_read Jan Kiszka
2011-09-28 11:00 ` [Qemu-devel] [PATCH 10/22] i8259: Reorder intack in pic_read_irq Jan Kiszka
2011-09-28 11:00 ` [Qemu-devel] [PATCH 11/22] i8259: Update IRQ state after reset Jan Kiszka
2011-09-28 18:01 ` Blue Swirl
2011-09-28 18:09 ` Peter Maydell
2011-09-28 18:42 ` Blue Swirl
2011-09-28 21:38 ` Peter Maydell
2011-09-29 19:35 ` Blue Swirl
2011-09-28 21:18 ` Jan Kiszka
2011-09-29 19:45 ` Blue Swirl
2011-09-30 6:47 ` Jan Kiszka
2011-09-30 9:14 ` Peter Maydell
2011-09-30 20:52 ` Blue Swirl
2011-09-30 20:47 ` Blue Swirl
2011-10-01 6:47 ` Jan Kiszka
2011-10-01 7:31 ` Blue Swirl
2011-10-02 16:27 ` Jan Kiszka
2011-10-02 19:01 ` Blue Swirl
2011-10-02 16:56 ` Avi Kivity
2011-10-02 19:13 ` Blue Swirl
2011-10-02 19:20 ` Avi Kivity
2011-10-02 19:39 ` Blue Swirl
2011-10-02 19:44 ` Avi Kivity
2011-10-02 19:49 ` Blue Swirl
2011-10-02 19:52 ` Avi Kivity
2011-10-02 19:59 ` Blue Swirl
2011-10-02 20:03 ` Avi Kivity
2011-10-02 20:11 ` Blue Swirl
2011-10-02 20:17 ` Avi Kivity
2011-10-02 20:26 ` Blue Swirl
2011-10-02 20:31 ` Avi Kivity
2011-10-02 20:36 ` Blue Swirl
2011-10-02 20:41 ` Avi Kivity
2011-10-02 20:55 ` Blue Swirl
2011-10-03 7:21 ` Paolo Bonzini
2011-10-04 12:12 ` Avi Kivity
2011-10-01 11:20 ` Peter Maydell
2011-10-02 16:39 ` Avi Kivity
2011-10-02 17:46 ` Jan Kiszka
2011-10-02 19:07 ` Avi Kivity
2011-10-02 19:15 ` Blue Swirl
2011-10-02 19:47 ` Jan Kiszka
2011-10-02 19:50 ` Avi Kivity
2011-10-02 19:06 ` Blue Swirl
2011-10-02 19:08 ` Avi Kivity
2011-10-02 19:26 ` Blue Swirl
2011-10-02 19:35 ` Avi Kivity
2011-10-02 19:40 ` Blue Swirl
2011-10-02 19:47 ` Avi Kivity
2011-10-02 19:52 ` Blue Swirl
2011-10-02 19:58 ` Avi Kivity
2011-10-02 20:05 ` Blue Swirl
2011-10-02 20:14 ` Avi Kivity
2011-10-02 20:18 ` Blue Swirl
2011-10-02 20:21 ` Avi Kivity
2011-10-02 20:30 ` Blue Swirl
2011-10-02 20:39 ` Avi Kivity
2011-10-02 20:53 ` Blue Swirl
2011-09-28 11:00 ` [Qemu-devel] [PATCH 12/22] i8259: Switch to per-PIC IRQ update Jan Kiszka
2011-09-28 11:00 ` [Qemu-devel] [PATCH 13/22] i8259: Fix poll command Jan Kiszka
2011-09-28 11:01 ` [Qemu-devel] [PATCH 14/22] i8259: Clean up pic_ioport_read Jan Kiszka
2011-09-28 11:01 ` [Qemu-devel] [PATCH 15/22] i8259: PREP: Replace pic_intack_read with pic_read_irq Jan Kiszka
2011-09-28 11:15 ` Alexander Graf
2011-09-28 11:01 ` [Qemu-devel] [PATCH 16/22] i8259: Replace PicState::pics_state with master flag Jan Kiszka
2011-09-28 11:01 ` [Qemu-devel] [PATCH 17/22] i8259: Eliminate PicState2 Jan Kiszka
2011-09-28 16:23 ` Richard Henderson
2011-09-28 16:29 ` Richard Henderson
2011-09-28 11:01 ` [Qemu-devel] [PATCH 18/22] qdev: Add HEX8 property Jan Kiszka
2011-09-28 11:01 ` [Qemu-devel] [PATCH 19/22] i8259: Convert to qdev Jan Kiszka
2011-09-28 11:01 ` [Qemu-devel] [PATCH 20/22] i8259: Fix coding style Jan Kiszka
2011-09-28 11:01 ` [Qemu-devel] [PATCH 21/22] monitor: Restrict pic/irq_info to supporting targets Jan Kiszka
2011-09-28 18:19 ` Blue Swirl
2011-09-28 21:26 ` Jan Kiszka [this message]
2011-09-29 19:29 ` Blue Swirl
2011-09-30 6:50 ` [Qemu-devel] [PATCH v2 " Jan Kiszka
2011-09-30 20:32 ` Blue Swirl
2011-09-28 11:01 ` [Qemu-devel] [PATCH 22/22] i8259: Move to hw library Jan Kiszka
2011-09-28 18:21 ` Blue Swirl
2011-09-28 21:50 ` [Qemu-devel] [PATCH v2 " Jan Kiszka
2011-09-28 16:39 ` [Qemu-devel] [PATCH 00/22] Rework i8259 and PC interrupt models Richard Henderson
2011-09-28 21:53 ` Jan Kiszka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E839122.7010803@web.de \
--to=jan.kiszka@web.de \
--cc=aliguori@us.ibm.com \
--cc=blauwirbel@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.