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>
This commit is contained in:
Harald Freudenberger 2021-10-19 17:51:08 +02:00 committed by Vasily Gorbik
parent 453380318e
commit d098272565

View File

@ -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);
}