Commit 9d792ef1 authored by Halil Pasic's avatar Halil Pasic Committed by Vasily Gorbik

s390/airq: use DMA memory for summary indicators

Protected virtualization guests have to use shared pages for airq
notifier bit vectors and summary bytes or bits, thus these need to be
allocated as DMA coherent memory.  Commit b50623e5 ("s390/airq: use
DMA memory for adapter interrupts")  took care of the notifier bit
vectors, but omitted to take care of the summary bytes/bits.

In practice this omission is not a big deal, because the summary ain't
necessarily allocated here, but can be supplied by the driver. Currently
all the I/O we have for SE guests is virtio-ccw, and  virtio-ccw uses a
self-allocated array of summary indicators.

Let us cover all our bases nevertheless!
Signed-off-by: default avatarHalil Pasic <pasic@linux.ibm.com>
Reviewed-by: default avatarHarald Freudenberger <freude@linux.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
parent 1024063e
......@@ -44,7 +44,7 @@ int register_adapter_interrupt(struct airq_struct *airq)
if (!airq->handler || airq->isc > MAX_ISC)
return -EINVAL;
if (!airq->lsi_ptr) {
airq->lsi_ptr = kzalloc(1, GFP_KERNEL);
airq->lsi_ptr = cio_dma_zalloc(1);
if (!airq->lsi_ptr)
return -ENOMEM;
airq->flags |= AIRQ_PTR_ALLOCATED;
......@@ -79,7 +79,7 @@ void unregister_adapter_interrupt(struct airq_struct *airq)
synchronize_rcu();
isc_unregister(airq->isc);
if (airq->flags & AIRQ_PTR_ALLOCATED) {
kfree(airq->lsi_ptr);
cio_dma_free(airq->lsi_ptr, 1);
airq->lsi_ptr = NULL;
airq->flags &= ~AIRQ_PTR_ALLOCATED;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment