summaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/airq.c
diff options
context:
space:
mode:
authorHalil Pasic <pasic@linux.ibm.com>2021-12-14 15:54:16 +0100
committerVasily Gorbik <gor@linux.ibm.com>2022-03-08 00:33:00 +0100
commit9d792ef17f18734bca823910b89254dec37b50c5 (patch)
tree1c6686c7baf4f8ef0b0f8386b7aa9c5dbf4c60ba /drivers/s390/cio/airq.c
parent1024063effc3ba86d1fec0f2ee0a9259a1065ed5 (diff)
downloadlinux-9d792ef17f18734bca823910b89254dec37b50c5.tar.bz2
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 b50623e5db80 ("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: Halil Pasic <pasic@linux.ibm.com> Reviewed-by: Harald Freudenberger <freude@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'drivers/s390/cio/airq.c')
-rw-r--r--drivers/s390/cio/airq.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/s390/cio/airq.c b/drivers/s390/cio/airq.c
index e56535c99888..c0ed364bf446 100644
--- a/drivers/s390/cio/airq.c
+++ b/drivers/s390/cio/airq.c
@@ -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;
}