aboutsummaryrefslogtreecommitdiff
path: root/hw/s390x
diff options
context:
space:
mode:
authorCornelia Huck <cornelia.huck@de.ibm.com>2014-03-11 13:19:43 +0100
committerCornelia Huck <cornelia.huck@de.ibm.com>2014-06-10 09:50:27 +0200
commitde13d2161473d02ae97ec0f8e4503147554892dd (patch)
tree2d43f192b9e974e313eac5399d2f907493a86a8c /hw/s390x
parent66ad0893f07f194b5c8607cb81061b8d7202511c (diff)
s390x: cleanup interrupt injection
Remove the need for a cpu to inject a floating interrupt on kvm. Acked-by: Thomas Huth <thuth@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'hw/s390x')
-rw-r--r--hw/s390x/css.c15
-rw-r--r--hw/s390x/s390-virtio-bus.c6
2 files changed, 6 insertions, 15 deletions
diff --git a/hw/s390x/css.c b/hw/s390x/css.c
index 67b22aeeee..e758890dcd 100644
--- a/hw/s390x/css.c
+++ b/hw/s390x/css.c
@@ -128,13 +128,11 @@ uint16_t css_build_subchannel_id(SubchDev *sch)
static void css_inject_io_interrupt(SubchDev *sch)
{
- S390CPU *cpu = s390_cpu_addr2state(0);
uint8_t isc = (sch->curr_status.pmcw.flags & PMCW_FLAGS_MASK_ISC) >> 11;
trace_css_io_interrupt(sch->cssid, sch->ssid, sch->schid,
sch->curr_status.pmcw.intparm, isc, "");
- s390_io_interrupt(cpu,
- css_build_subchannel_id(sch),
+ s390_io_interrupt(css_build_subchannel_id(sch),
sch->schid,
sch->curr_status.pmcw.intparm,
isc << 27);
@@ -147,7 +145,6 @@ void css_conditional_io_interrupt(SubchDev *sch)
* with alert status.
*/
if (!(sch->curr_status.scsw.ctrl & SCSW_STCTL_STATUS_PEND)) {
- S390CPU *cpu = s390_cpu_addr2state(0);
uint8_t isc = (sch->curr_status.pmcw.flags & PMCW_FLAGS_MASK_ISC) >> 11;
trace_css_io_interrupt(sch->cssid, sch->ssid, sch->schid,
@@ -157,8 +154,7 @@ void css_conditional_io_interrupt(SubchDev *sch)
sch->curr_status.scsw.ctrl |=
SCSW_STCTL_ALERT | SCSW_STCTL_STATUS_PEND;
/* Inject an I/O interrupt. */
- s390_io_interrupt(cpu,
- css_build_subchannel_id(sch),
+ s390_io_interrupt(css_build_subchannel_id(sch),
sch->schid,
sch->curr_status.pmcw.intparm,
isc << 27);
@@ -167,11 +163,10 @@ void css_conditional_io_interrupt(SubchDev *sch)
void css_adapter_interrupt(uint8_t isc)
{
- S390CPU *cpu = s390_cpu_addr2state(0);
uint32_t io_int_word = (isc << 27) | IO_INT_WORD_AI;
trace_css_adapter_interrupt(isc);
- s390_io_interrupt(cpu, 0, 0, 0, io_int_word);
+ s390_io_interrupt(0, 0, 0, io_int_word);
}
static void sch_handle_clear_func(SubchDev *sch)
@@ -1231,11 +1226,9 @@ void css_queue_crw(uint8_t rsc, uint8_t erc, int chain, uint16_t rsid)
QTAILQ_INSERT_TAIL(&channel_subsys->pending_crws, crw_cont, sibling);
if (channel_subsys->do_crw_mchk) {
- S390CPU *cpu = s390_cpu_addr2state(0);
-
channel_subsys->do_crw_mchk = false;
/* Inject crw pending machine check. */
- s390_crw_mchk(cpu);
+ s390_crw_mchk();
}
}
diff --git a/hw/s390x/s390-virtio-bus.c b/hw/s390x/s390-virtio-bus.c
index 45c6b1fbd3..7c8c81b0cc 100644
--- a/hw/s390x/s390-virtio-bus.c
+++ b/hw/s390x/s390-virtio-bus.c
@@ -133,8 +133,7 @@ static int s390_virtio_device_init(VirtIOS390Device *dev, VirtIODevice *vdev)
s390_virtio_device_sync(dev);
s390_virtio_reset_idx(dev);
if (dev->qdev.hotplugged) {
- S390CPU *cpu = s390_cpu_addr2state(0);
- s390_virtio_irq(cpu, VIRTIO_PARAM_DEV_ADD, dev->dev_offs);
+ s390_virtio_irq(VIRTIO_PARAM_DEV_ADD, dev->dev_offs);
}
return 0;
@@ -478,9 +477,8 @@ static void virtio_s390_notify(DeviceState *d, uint16_t vector)
{
VirtIOS390Device *dev = to_virtio_s390_device_fast(d);
uint64_t token = s390_virtio_device_vq_token(dev, vector);
- S390CPU *cpu = s390_cpu_addr2state(0);
- s390_virtio_irq(cpu, 0, token);
+ s390_virtio_irq(0, token);
}
static unsigned virtio_s390_get_features(DeviceState *d)