BACKPORT: UPSTREAM: perf: Fix function pointer case
With the advent of CFI it is no longer acceptible to cast function pointers. The robot complains thusly: kernel-events-core.c:warning:cast-from-int-(-)(struct-perf_cpu_pmu_context-)-to-remote_function_f-(aka-int-(-)(void-)-)-converts-to-incompatible-function-type Bug: 287899364 Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> (cherry picked from commit 1af6239d1d3e61d33fd2f0ba53d3d1a67cc50574) [cixi: Resolved minor conflict in kernel/events/core.c] Change-Id: I37a21ece84d2566af544e5caf86d6db5bc048971 Signed-off-by: Cixi Geng <cixi.geng1@unisoc.com>
This commit is contained in:
committed by
Matthias Männich
parent
a2f1e57122
commit
d1cef5e9ad
@@ -1223,6 +1223,11 @@ static int perf_mux_hrtimer_restart(struct perf_cpu_context *cpuctx)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int perf_mux_hrtimer_restart_ipi(void *arg)
|
||||
{
|
||||
return perf_mux_hrtimer_restart(arg);
|
||||
}
|
||||
|
||||
void perf_pmu_disable(struct pmu *pmu)
|
||||
{
|
||||
int *count = this_cpu_ptr(pmu->pmu_disable_count);
|
||||
@@ -11044,8 +11049,7 @@ perf_event_mux_interval_ms_store(struct device *dev,
|
||||
cpuctx = per_cpu_ptr(pmu->pmu_cpu_context, cpu);
|
||||
cpuctx->hrtimer_interval = ns_to_ktime(NSEC_PER_MSEC * timer);
|
||||
|
||||
cpu_function_call(cpu,
|
||||
(remote_function_f)perf_mux_hrtimer_restart, cpuctx);
|
||||
cpu_function_call(cpu, perf_mux_hrtimer_restart_ipi, cpuctx);
|
||||
}
|
||||
cpus_read_unlock();
|
||||
mutex_unlock(&mux_interval_mutex);
|
||||
|
||||
Reference in New Issue
Block a user