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>
This commit is contained in:
Sebastian Ott 2019-04-23 13:14:28 +02:00 committed by Martin Schwidefsky
parent 5627130380
commit 833b441ec0
2 changed files with 12 additions and 0 deletions

View File

@ -143,4 +143,14 @@ static inline int zpci_set_irq_ctrl(u16 ctl, u8 isc)
return __zpci_set_irq_ctrl(ctl, isc, &iib); 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 #endif

View File

@ -30,6 +30,7 @@
#include <asm/sclp.h> #include <asm/sclp.h>
#include <asm/facility.h> #include <asm/facility.h>
#include <asm/boot_data.h> #include <asm/boot_data.h>
#include <asm/pci_insn.h>
#include "entry.h" #include "entry.h"
/* /*
@ -235,6 +236,7 @@ static __init void detect_machine_facilities(void)
clock_comparator_max = -1ULL >> 1; clock_comparator_max = -1ULL >> 1;
__ctl_set_bit(0, 53); __ctl_set_bit(0, 53);
} }
enable_mio_ctl();
} }
static inline void save_vector_registers(void) static inline void save_vector_registers(void)