Commit a1620a1c authored by Kan Liang's avatar Kan Liang Committed by Yunying Sun
Browse files

perf/x86: Remove temporary pmu assignment in event_init

mainline inclusion
from mainline-v5.13-rc1
commit b9856729
category: feature
feature: SRF core PMU support
bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I8RWG5
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b98567298bad891774054113690b30bd90d5738d



Intel-SIG: commit b9856729 perf/x86: Remove temporary pmu assignment in event_init
Backport as a dependency for Sierra Forrest core PMU support.

-------------------------------------

The temporary pmu assignment in event_init is unnecessary.

The assignment was introduced by commit 8113070d ("perf_events:
Add fast-path to the rescheduling code"). At that time, event->pmu is
not assigned yet when initializing an event. The assignment is required.
However, from commit 7e5b2a01 ("perf: provide PMU when initing
events"), the event->pmu is provided before event_init is invoked.
The temporary pmu assignment in event_init should be removed.

Signed-off-by: default avatarKan Liang <kan.liang@linux.intel.com>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: default avatarAndi Kleen <ak@linux.intel.com>
Link: https://lkml.kernel.org/r/1618237865-33448-15-git-send-email-kan.liang@linux.intel.com


Signed-off-by: default avatarYunying Sun <yunying.sun@intel.com>
parent a665e70b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment