s390/cpum_cf: prepare for in-kernel counter measurements

Prepare the counter facility support to be used by other in-kernel
users.  The first step introduces the __kernel_cpumcf_begin() and
__kernel_cpumcf_end() functions to reserve the counter facility
for doing measurements and to release after the measurements are
done.

Signed-off-by: Hendrik Brueckner <brueckner@linux.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
Hendrik Brueckner
2018-08-06 17:43:07 +02:00
committed by Martin Schwidefsky
parent 30e145f811
commit 3d33345aa3
2 changed files with 29 additions and 6 deletions

View File

@@ -49,4 +49,7 @@ static inline void ctr_set_stop(u64 *state, int ctr_set)
*state &= ~(cpumf_ctr_ctl[ctr_set] << CPUMF_LCCTL_ACTCTL_SHIFT);
}
int __kernel_cpumcf_begin(void);
void __kernel_cpumcf_end(void);
#endif /* _ASM_S390_CPU_MCF_H */