diff options
Diffstat (limited to 'arch/s390/include')
-rw-r--r-- | arch/s390/include/asm/cpu_mcf.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/s390/include/asm/cpu_mcf.h b/arch/s390/include/asm/cpu_mcf.h index 2cd4f09ee268..12a4224560bc 100644 --- a/arch/s390/include/asm/cpu_mcf.h +++ b/arch/s390/include/asm/cpu_mcf.h @@ -63,4 +63,18 @@ int __kernel_cpumcf_begin(void); unsigned long kernel_cpumcf_alert(int clear); void __kernel_cpumcf_end(void); +static inline int kernel_cpumcf_begin(void) +{ + if (!cpum_cf_avail()) + return -ENODEV; + + preempt_disable(); + return __kernel_cpumcf_begin(); +} +static inline void kernel_cpumcf_end(void) +{ + __kernel_cpumcf_end(); + preempt_enable(); +} + #endif /* _ASM_S390_CPU_MCF_H */ |