diff options
author | Thomas Richter <tmricht@linux.ibm.com> | 2023-01-24 12:20:53 +0100 |
---|---|---|
committer | Heiko Carstens <hca@linux.ibm.com> | 2023-01-25 20:51:10 +0100 |
commit | ea53e6995f45e857fd34e4fbfbd436b5457da5f7 (patch) | |
tree | 1cebf8b72d865c90dcfec1fb9a6d5a6cc7c517dd /arch/s390/kernel | |
parent | 7a8f09ac1850b17ca0cc9e1e4d6621a64661347e (diff) | |
download | lwn-ea53e6995f45e857fd34e4fbfbd436b5457da5f7.tar.gz lwn-ea53e6995f45e857fd34e4fbfbd436b5457da5f7.zip |
s390/cpum_cf: remove in-kernel counting facility interface
Commit 17bebcc68eee ("s390/cpum_cf: Add minimal in-kernel interface for
counter measurements") introduced a small in-kernel interface for CPU
Measurement counter facility.
There are no users of this interface, therefore remove it.
The following functions are removed:
kernel_cpumcf_alert(),
kernel_cpumcf_begin(),
kernel_cpumcf_end(),
kernel_cpumcf_avail()
there is no need for them anymore.
With the removal of function kernel_cpumcf_alert(), also remove
member alert in struct cpu_cf_events. Its purpose was to counter
measurement alert interrupts for the in-kernel interface.
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r-- | arch/s390/kernel/perf_cpum_cf.c | 2 | ||||
-rw-r--r-- | arch/s390/kernel/perf_cpum_cf_common.c | 24 |
2 files changed, 1 insertions, 25 deletions
diff --git a/arch/s390/kernel/perf_cpum_cf.c b/arch/s390/kernel/perf_cpum_cf.c index 7299f7f0b325..5eaa81dd56c3 100644 --- a/arch/s390/kernel/perf_cpum_cf.c +++ b/arch/s390/kernel/perf_cpum_cf.c @@ -832,7 +832,7 @@ static int __init cpumf_pmu_init(void) { int rc; - if (!kernel_cpumcf_avail()) + if (!cpum_cf_avail()) return -ENODEV; /* Setup s390dbf facility */ diff --git a/arch/s390/kernel/perf_cpum_cf_common.c b/arch/s390/kernel/perf_cpum_cf_common.c index 4824e3461b5b..99523dc3fc8b 100644 --- a/arch/s390/kernel/perf_cpum_cf_common.c +++ b/arch/s390/kernel/perf_cpum_cf_common.c @@ -27,7 +27,6 @@ DEFINE_PER_CPU(struct cpu_cf_events, cpu_cf_events) = { [CPUMF_CTR_SET_EXT] = ATOMIC_INIT(0), [CPUMF_CTR_SET_MT_DIAG] = ATOMIC_INIT(0), }, - .alert = ATOMIC64_INIT(0), .state = 0, .dev_state = 0, .flags = 0, @@ -67,9 +66,6 @@ static void cpumf_measurement_alert(struct ext_code ext_code, if (alert & CPU_MF_INT_CF_MTDA) pr_warn("CPU[%i] MT counter data was lost\n", smp_processor_id()); - - /* store alert for special handling by in-kernel users */ - atomic64_or(alert, &cpuhw->alert); } #define PMC_INIT 0 @@ -94,12 +90,6 @@ static void cpum_cf_setup_cpu(void *flags) lcctl(0); } -bool kernel_cpumcf_avail(void) -{ - return cpum_cf_initalized; -} -EXPORT_SYMBOL(kernel_cpumcf_avail); - /* Initialize the CPU-measurement counter facility */ int __kernel_cpumcf_begin(void) { @@ -112,20 +102,6 @@ int __kernel_cpumcf_begin(void) } EXPORT_SYMBOL(__kernel_cpumcf_begin); -/* Obtain the CPU-measurement alerts for the counter facility */ -unsigned long kernel_cpumcf_alert(int clear) -{ - struct cpu_cf_events *cpuhw = this_cpu_ptr(&cpu_cf_events); - unsigned long alert; - - alert = atomic64_read(&cpuhw->alert); - if (clear) - atomic64_set(&cpuhw->alert, 0); - - return alert; -} -EXPORT_SYMBOL(kernel_cpumcf_alert); - /* Release the CPU-measurement counter facility */ void __kernel_cpumcf_end(void) { |