Home Home > GIT Browse > SLE15-SP1
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Tesarik <ptesarik@suse.cz>2019-07-19 17:10:24 +0200
committerPetr Tesarik <ptesarik@suse.cz>2019-07-19 22:44:47 +0200
commit40f940a7bcb59fd35dc31db0f43451ae6cfb722e (patch)
tree2512d9748af2753036b691fa1bb0c0f9e7796a11
parent174a6a5fb4766b1d39f22a49aa8a61619f66f410 (diff)
s390/cpu_mf: move struct cpu_cf_events and per-CPU variable
to header file (jsc#SLE-6904 FATE#327581). suse-commit: 1b78d8f9c6e778d06920f501dcc4d10d1e2cb8b5
-rw-r--r--arch/s390/include/asm/cpu_mcf.h9
-rw-r--r--arch/s390/kernel/perf_cpum_cf.c11
2 files changed, 11 insertions, 9 deletions
diff --git a/arch/s390/include/asm/cpu_mcf.h b/arch/s390/include/asm/cpu_mcf.h
index 63fa74115cba..82e0b80f2c81 100644
--- a/arch/s390/include/asm/cpu_mcf.h
+++ b/arch/s390/include/asm/cpu_mcf.h
@@ -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);
}
+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);
void __kernel_cpumcf_end(void);
diff --git a/arch/s390/kernel/perf_cpum_cf.c b/arch/s390/kernel/perf_cpum_cf.c
index 479aa9f40bcf..4fe18bf75a97 100644
--- a/arch/s390/kernel/perf_cpum_cf.c
+++ b/arch/s390/kernel/perf_cpum_cf.c
@@ -21,15 +21,8 @@
#include <asm/irq.h>
#include <asm/cpu_mcf.h>
-/* Local CPUMF event structure */
-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;
-};
-static DEFINE_PER_CPU(struct cpu_cf_events, cpu_cf_events) = {
+/* Per-CPU event structure for the counter facility */
+DEFINE_PER_CPU(struct cpu_cf_events, cpu_cf_events) = {
.ctr_set = {
[CPUMF_CTR_SET_BASIC] = ATOMIC_INIT(0),
[CPUMF_CTR_SET_USER] = ATOMIC_INIT(0),