mirror of
https://github.com/torvalds/linux.git
synced 2024-12-15 23:51:46 +00:00
s390/cpu_mf: move struct cpu_cf_events and per-CPU variable to header file
Make the struct cpu_cf_events and the respective per-CPU variable available to in-kernel users. Access to this per-CPU variable shall be done between the calls to __kernel_cpumcf_begin() and __kernel_cpumcf_end(). Signed-off-by: Hendrik Brueckner <brueckner@linux.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
parent
f1c0b83173
commit
f944bcdf5b
@ -49,6 +49,15 @@ static inline void ctr_set_stop(u64 *state, int ctr_set)
|
|||||||
*state &= ~(cpumf_ctr_ctl[ctr_set] << CPUMF_LCCTL_ACTCTL_SHIFT);
|
*state &= ~(cpumf_ctr_ctl[ctr_set] << CPUMF_LCCTL_ACTCTL_SHIFT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct cpu_cf_events {
|
||||||
|
struct cpumf_ctr_info info;
|
||||||
|
atomic_t ctr_set[CPUMF_CTR_SET_MAX];
|
||||||
|
u64 state, tx_state;
|
||||||
|
unsigned int flags;
|
||||||
|
unsigned int txn_flags;
|
||||||
|
};
|
||||||
|
DECLARE_PER_CPU(struct cpu_cf_events, cpu_cf_events);
|
||||||
|
|
||||||
int __kernel_cpumcf_begin(void);
|
int __kernel_cpumcf_begin(void);
|
||||||
void __kernel_cpumcf_end(void);
|
void __kernel_cpumcf_end(void);
|
||||||
|
|
||||||
|
@ -18,15 +18,8 @@
|
|||||||
#include <asm/irq.h>
|
#include <asm/irq.h>
|
||||||
#include <asm/cpu_mcf.h>
|
#include <asm/cpu_mcf.h>
|
||||||
|
|
||||||
/* Local CPUMF event structure */
|
/* Per-CPU event structure for the counter facility */
|
||||||
struct cpu_cf_events {
|
DEFINE_PER_CPU(struct cpu_cf_events, cpu_cf_events) = {
|
||||||
struct cpumf_ctr_info info;
|
|
||||||
atomic_t ctr_set[CPUMF_CTR_SET_MAX];
|
|
||||||
u64 state, tx_state;
|
|
||||||
unsigned int flags;
|
|
||||||
unsigned int txn_flags;
|
|
||||||
};
|
|
||||||
static DEFINE_PER_CPU(struct cpu_cf_events, cpu_cf_events) = {
|
|
||||||
.ctr_set = {
|
.ctr_set = {
|
||||||
[CPUMF_CTR_SET_BASIC] = ATOMIC_INIT(0),
|
[CPUMF_CTR_SET_BASIC] = ATOMIC_INIT(0),
|
||||||
[CPUMF_CTR_SET_USER] = ATOMIC_INIT(0),
|
[CPUMF_CTR_SET_USER] = ATOMIC_INIT(0),
|
||||||
|
Loading…
Reference in New Issue
Block a user