summaryrefslogtreecommitdiff
path: root/arch/s390/include
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.ibm.com>2019-04-23 14:14:28 +0300
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2019-04-29 11:47:01 +0300
commit833b441ec0f6f3c57cc2106ef628bb19d8fb0ee2 (patch)
treef4571f3acf790048456f3025eb05f1b3ac4cce3d /arch/s390/include
parent56271303808fb86375ec33183d56c21fdeb836ea (diff)
downloadlinux-833b441ec0f6f3c57cc2106ef628bb19d8fb0ee2.tar.xz
s390: enable processes for mio instructions
Allow for userspace to use PCI MIO instructions. Signed-off-by: Sebastian Ott <sebott@linux.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/include')
-rw-r--r--arch/s390/include/asm/pci_insn.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/s390/include/asm/pci_insn.h b/arch/s390/include/asm/pci_insn.h
index 61cf9531f68f..ff81ed19c506 100644
--- a/arch/s390/include/asm/pci_insn.h
+++ b/arch/s390/include/asm/pci_insn.h
@@ -143,4 +143,14 @@ static inline int zpci_set_irq_ctrl(u16 ctl, u8 isc)
return __zpci_set_irq_ctrl(ctl, isc, &iib);
}
+#ifdef CONFIG_PCI
+static inline void enable_mio_ctl(void)
+{
+ if (static_branch_likely(&have_mio))
+ __ctl_set_bit(2, 5);
+}
+#else /* CONFIG_PCI */
+static inline void enable_mio_ctl(void) {}
+#endif /* CONFIG_PCI */
+
#endif