From: Sebastian Ott <sebott@linux.ibm.com>
Date: Thu, 18 Apr 2019 21:39:06 +0200
Subject: s390/pci: add parameter to disable usage of MIO instructions
Git-commit: 56271303808fb86375ec33183d56c21fdeb836ea
Patch-mainline: v5.2-rc1
References: jsc#SLE-5802 FATE#327055 bsc#1134738 LTC#173387
Allow users to disable usage of MIO instructions by specifying pci=nomio
at the kernel command line.
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/pci/pci.c | 7 ++++++-
2 files changed, 7 insertions(+), 1 deletion(-)
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -3200,6 +3200,7 @@
conflict with unreported devices), so this
taints the kernel.
force_floating [S390] Force usage of floating interrupts.
+ nomio [S390] Do not use MIO instructions.
pcie_aspm= [PCIE] Forcibly enable or disable PCIe Active State Power
Management.
--- a/arch/s390/pci/pci.c
+++ b/arch/s390/pci/pci.c
@@ -824,6 +824,7 @@ static void zpci_mem_exit(void)
}
static unsigned int s390_pci_probe __initdata = 1;
+static unsigned int s390_pci_no_mio __initdata;
unsigned int s390_pci_force_floating __initdata;
static unsigned int s390_pci_initialized;
@@ -833,6 +834,10 @@ char * __init pcibios_setup(char *str)
s390_pci_probe = 0;
return NULL;
}
+ if (!strcmp(str, "nomio")) {
+ s390_pci_no_mio = 1;
+ return NULL;
+ }
if (!strcmp(str, "force_floating")) {
s390_pci_force_floating = 1;
return NULL;
@@ -855,7 +860,7 @@ static int __init pci_base_init(void)
if (!test_facility(69) || !test_facility(71))
return 0;
- if (test_facility(153))
+ if (test_facility(153) && !s390_pci_no_mio)
static_branch_enable(&have_mio);
rc = zpci_debug_init();