From: Sebastian Ott <sebott@linux.ibm.com>
Date: Tue, 26 Feb 2019 16:07:32 +0100
Subject: s390/pci: add parameter to force floating irqs
Git-commit: fbfe07d440f2c55070a0358f66560bb4f9fb92e7
Patch-mainline: v5.2-rc1
References: jsc#SLE-5789 FATE#327042 bsc#1134730 LTC#173388
Provide a kernel parameter to force the usage of floating interrupts.
Signed-off-by: Sebastian Ott <sebott@linux.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Acked-by: Petr Tesarik <ptesarik@suse.com>
---
Documentation/admin-guide/kernel-parameters.txt | 1 +
arch/s390/include/asm/pci.h | 1 +
arch/s390/pci/pci.c | 5 +++++
arch/s390/pci/pci_irq.c | 3 +++
4 files changed, 10 insertions(+)
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -3199,6 +3199,7 @@
Adding the window is slightly risky (it may
conflict with unreported devices), so this
taints the kernel.
+ force_floating [S390] Force usage of floating interrupts.
pcie_aspm= [PCIE] Forcibly enable or disable PCIe Active State Power
Management.
--- a/arch/s390/include/asm/pci.h
+++ b/arch/s390/include/asm/pci.h
@@ -157,6 +157,7 @@ static inline bool zdev_enabled(struct z
}
extern const struct attribute_group *zpci_attr_groups[];
+extern unsigned int s390_pci_force_floating __initdata;
/* -----------------------------------------------------------------------------
Prototypes
--- a/arch/s390/pci/pci.c
+++ b/arch/s390/pci/pci.c
@@ -714,6 +714,7 @@ static void zpci_mem_exit(void)
}
static unsigned int s390_pci_probe __initdata = 1;
+unsigned int s390_pci_force_floating __initdata;
static unsigned int s390_pci_initialized;
char * __init pcibios_setup(char *str)
@@ -722,6 +723,10 @@ char * __init pcibios_setup(char *str)
s390_pci_probe = 0;
return NULL;
}
+ if (!strcmp(str, "force_floating")) {
+ s390_pci_force_floating = 1;
+ return NULL;
+ }
return str;
}
--- a/arch/s390/pci/pci_irq.c
+++ b/arch/s390/pci/pci_irq.c
@@ -433,6 +433,9 @@ int __init zpci_irq_init(void)
int rc;
irq_delivery = sclp.has_dirq ? DIRECTED : FLOATING;
+ if (s390_pci_force_floating)
+ irq_delivery = FLOATING;
+
if (irq_delivery == DIRECTED)
zpci_airq.handler = zpci_directed_irq_handler;