[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH RFC 3/3] sysbus: Allow passthrough of single IRQ
From: |
Peter Maydell |
Subject: |
[Qemu-devel] [PATCH RFC 3/3] sysbus: Allow passthrough of single IRQ |
Date: |
Wed, 8 Jun 2011 12:33:33 +0100 |
Add a sysbus_pass_one_irq() function to allow one sysbus device
to pass a single IRQ through to another. (It is already possible
to delegate all your IRQs to another device with sysbus_pass_irq().)
Signed-off-by: Peter Maydell <address@hidden>
---
hw/sysbus.c | 9 +++++++++
hw/sysbus.h | 1 +
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/hw/sysbus.c b/hw/sysbus.c
index 793b0c1..8211e8f 100644
--- a/hw/sysbus.c
+++ b/hw/sysbus.c
@@ -134,6 +134,15 @@ void sysbus_pass_irq(SysBusDevice *dev, SysBusDevice
*target)
}
}
+void sysbus_pass_one_irq(SysBusDevice *dev, SysBusDevice *target, int tn)
+{
+ int n;
+
+ assert(dev->num_irq < QDEV_MAX_IRQ);
+ n = dev->num_irq++;
+ dev->irqp[n] = target->irqp[tn];
+}
+
void sysbus_init_mmio(SysBusDevice *dev, target_phys_addr_t size,
ram_addr_t iofunc)
{
diff --git a/hw/sysbus.h b/hw/sysbus.h
index 789e4c5..a6a873c 100644
--- a/hw/sysbus.h
+++ b/hw/sysbus.h
@@ -51,6 +51,7 @@ void sysbus_init_mmio_cb(SysBusDevice *dev,
target_phys_addr_t size,
void sysbus_pass_mmio(SysBusDevice *dev, SysBusDevice *target, int
target_mmio);
void sysbus_init_irq(SysBusDevice *dev, qemu_irq *p);
void sysbus_pass_irq(SysBusDevice *dev, SysBusDevice *target);
+void sysbus_pass_one_irq(SysBusDevice *dev, SysBusDevice *target, int tn);
void sysbus_init_ioports(SysBusDevice *dev, pio_addr_t ioport, pio_addr_t
size);
--
1.7.1
- [Qemu-devel] [PATCH RFC 0/3] basic support for composing sysbus devices, Peter Maydell, 2011/06/08
- [Qemu-devel] [PATCH RFC 3/3] sysbus: Allow passthrough of single IRQ,
Peter Maydell <=
- [Qemu-devel] [PATCH RFC 1/3] sysbus: Add support for resizing and unmapping MMIOs, Peter Maydell, 2011/06/08
- [Qemu-devel] [PATCH RFC 2/3] sysbus: Allow sysbus MMIO passthrough, Peter Maydell, 2011/06/08
- Re: [Qemu-devel] [PATCH RFC 0/3] basic support for composing sysbus devices, Jan Kiszka, 2011/06/08
- Re: [Qemu-devel] [PATCH RFC 0/3] basic support for composing sysbus devices, Markus Armbruster, 2011/06/09
- Re: [Qemu-devel] [PATCH RFC 0/3] basic support for composing sysbus devices, Jan Kiszka, 2011/06/09
- Re: [Qemu-devel] [PATCH RFC 0/3] basic support for composing sysbus devices, Markus Armbruster, 2011/06/10
- Re: [Qemu-devel] [PATCH RFC 0/3] basic support for composing sysbus devices, Anthony Liguori, 2011/06/10
- Re: [Qemu-devel] [PATCH RFC 0/3] basic support for composing sysbus devices, Peter Maydell, 2011/06/10
- Re: [Qemu-devel] [PATCH RFC 0/3] basic support for composing sysbus devices, Jan Kiszka, 2011/06/10
- Re: [Qemu-devel] [PATCH RFC 0/3] basic support for composing sysbus devices, Peter Maydell, 2011/06/10