]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/blobdiff - drivers/s390/crypto/ap_queue.c
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[mirror_ubuntu-disco-kernel.git] / drivers / s390 / crypto / ap_queue.c
index 0f1a5d02acb0e151092504754900a3d889514e17..6c8bd8ad618505a8f5b09e0446f128f1a33ff742 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright IBM Corp. 2016
  * Author(s): Martin Schwidefsky <schwidefsky@de.ibm.com>
 #include "ap_bus.h"
 #include "ap_asm.h"
 
+/**
+ * ap_queue_irq_ctrl(): Control interruption on a AP queue.
+ * @qirqctrl: struct ap_qirq_ctrl (64 bit value)
+ * @ind: The notification indicator byte
+ *
+ * Returns AP queue status.
+ *
+ * Control interruption on the given AP queue.
+ * Just a simple wrapper function for the low level PQAP(AQIC)
+ * instruction available for other kernel modules.
+ */
+struct ap_queue_status ap_queue_irq_ctrl(ap_qid_t qid,
+                                        struct ap_qirq_ctrl qirqctrl,
+                                        void *ind)
+{
+       return ap_aqic(qid, qirqctrl, ind);
+}
+EXPORT_SYMBOL(ap_queue_irq_ctrl);
+
 /**
  * ap_queue_enable_interruption(): Enable interruption on an AP queue.
  * @qid: The AP queue number
 static int ap_queue_enable_interruption(struct ap_queue *aq, void *ind)
 {
        struct ap_queue_status status;
+       struct ap_qirq_ctrl qirqctrl = { 0 };
 
-       status = ap_aqic(aq->qid, ind);
+       qirqctrl.ir = 1;
+       qirqctrl.isc = AP_ISC;
+       status = ap_aqic(aq->qid, qirqctrl, ind);
        switch (status.response_code) {
        case AP_RESPONSE_NORMAL:
        case AP_RESPONSE_OTHERWISE_CHANGED:
@@ -362,7 +385,7 @@ static enum ap_wait ap_sm_setirq_wait(struct ap_queue *aq)
                /* Get the status with TAPQ */
                status = ap_tapq(aq->qid, NULL);
 
-       if (status.int_enabled == 1) {
+       if (status.irq_enabled == 1) {
                /* Irqs are now enabled */
                aq->interrupt = AP_INTR_ENABLED;
                aq->state = (aq->queue_count > 0) ?