]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
perf/x86/intel: Replace x86_pmu.drain_pebs calling with static call
authorDapeng Mi <dapeng1.mi@linux.intel.com>
Wed, 29 Oct 2025 10:21:27 +0000 (18:21 +0800)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 7 Nov 2025 14:08:20 +0000 (15:08 +0100)
Use x86_pmu_drain_pebs static call to replace calling x86_pmu.drain_pebs
function pointer.

Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20251029102136.61364-4-dapeng1.mi@linux.intel.com
arch/x86/events/intel/core.c

index 28f5468a6ea36b139fb8f6939283ff1dbe9cc6b2..46a000eb0bb3c7028cdce83b78cdedec9bab78eb 100644 (file)
@@ -3269,7 +3269,7 @@ static int handle_pmi_common(struct pt_regs *regs, u64 status)
                 * The PEBS buffer has to be drained before handling the A-PMI
                 */
                if (is_pebs_counter_event_group(event))
-                       x86_pmu.drain_pebs(regs, &data);
+                       static_call(x86_pmu_drain_pebs)(regs, &data);
 
                last_period = event->hw.last_period;