diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2011-04-01 15:15:27 +1100 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2011-04-01 18:34:56 +0200 |
commit | 0201e2da65b1828937c478fa1ac52e58522a32c1 (patch) | |
tree | cd4510282d6f3e008c65f24613ced28c2e55d9ae /hw/spapr.c | |
parent | 00dc738d8a08fce0f0d327e081bb2bd7b6fba888 (diff) | |
download | qemu-0201e2da65b1828937c478fa1ac52e58522a32c1.zip qemu-0201e2da65b1828937c478fa1ac52e58522a32c1.tar.gz qemu-0201e2da65b1828937c478fa1ac52e58522a32c1.tar.bz2 |
Add (virtual) interrupt to PAPR virtual tty device
Now that we have implemented the PAPR "xics" virtualized interrupt
controller, we can add interrupts in PAPR VIO devices. This patch adds
interrupt support to the PAPR virtual tty/console device.
Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw/spapr.c')
-rw-r--r-- | hw/spapr.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -262,6 +262,7 @@ static void ppc_spapr_init(ram_addr_t ram_size, long pteg_shift = 17; int fdt_size; char *filename; + int irq = 16; spapr = qemu_malloc(sizeof(*spapr)); cpu_ppc_hypercall = emulate_spapr_hypercall; @@ -325,9 +326,10 @@ static void ppc_spapr_init(ram_addr_t ram_size, /* Set up VIO bus */ spapr->vio_bus = spapr_vio_bus_init(); - for (i = 0; i < MAX_SERIAL_PORTS; i++) { + for (i = 0; i < MAX_SERIAL_PORTS; i++, irq++) { if (serial_hds[i]) { - spapr_vty_create(spapr->vio_bus, i, serial_hds[i]); + spapr_vty_create(spapr->vio_bus, i, serial_hds[i], + xics_find_qirq(spapr->icp, irq), irq); } } |