summaryrefslogtreecommitdiff
path: root/drivers/s390/crypto/ap_bus.c
diff options
context:
space:
mode:
authorHarald Freudenberger <freude@linux.ibm.com>2021-10-19 17:51:08 +0200
committerVasily Gorbik <gor@linux.ibm.com>2021-10-26 15:21:29 +0200
commitd0982725655721800878f3eb1cfd944ec3dc2107 (patch)
treea81287d8c51bc5c7012746e839d083fe9c18e797 /drivers/s390/crypto/ap_bus.c
parent453380318edd523bc08bf4892d354b49cb85bb0b (diff)
s390/ap: new module option ap.useirq
This patch introduces a new AP module option to be able to control if the ap bus code is using interrupts or not. By default if the interrupt support is available it is used. This option makes it possible to disable interrupt use even when interrupt support is available. It should be obvious that this option can't magically enable interrupt support when the hardware or hypervisor layer does not support AP interrupts. On the kernel command line use ap.useirq=0 or ap.useirq=1 to disable or enable (that's the default) interrupt use. Signed-off-by: Harald Freudenberger <freude@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'drivers/s390/crypto/ap_bus.c')
-rw-r--r--drivers/s390/crypto/ap_bus.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c
index 38d71e076048..806d184482a9 100644
--- a/drivers/s390/crypto/ap_bus.c
+++ b/drivers/s390/crypto/ap_bus.c
@@ -61,6 +61,10 @@ static char *aqm_str;
module_param_named(aqmask, aqm_str, charp, 0440);
MODULE_PARM_DESC(aqmask, "AP bus domain mask.");
+static int ap_useirq = 1;
+module_param_named(useirq, ap_useirq, int, 0440);
+MODULE_PARM_DESC(useirq, "Use interrupt if available, default is 1 (on).");
+
atomic_t ap_max_msg_size = ATOMIC_INIT(AP_DEFAULT_MAX_MSG_SIZE);
EXPORT_SYMBOL(ap_max_msg_size);
@@ -1899,7 +1903,7 @@ static int __init ap_module_init(void)
}
/* enable interrupts if available */
- if (ap_interrupts_available()) {
+ if (ap_interrupts_available() && ap_useirq) {
rc = register_adapter_interrupt(&ap_airq);
ap_irq_flag = (rc == 0);
}