* [tip: perf/core] perf/core: Convert perf_mux_hrtimer_restart() to use guard
@ 2026-11-23 10:23 tip-bot2 for Peter Zijlstra
0 siblings, 0 replies; only message in thread
From: tip-bot2 for Peter Zijlstra @ 2026-11-23 10:23 UTC (permalink / raw)
To: linux-tip-commits; +Cc: Peter Zijlstra (Intel), Ingo Molnar, linux-kernel, x86
The following commit has been merged into the perf/core branch of tip:
Commit-ID: 2981602e99451e209b64803d45c97537e76c6154
Gitweb: https://git.kernel.org/tip/2981602e99451e209b64803d45c97537e76c6154
Author: Peter Zijlstra <peterz@infradead.org>
AuthorDate: Wed, 18 Nov 2026 14:18:03 +01:00
Committer: Ingo Molnar <mingo@kernel.org>
CommitterDate: Mon, 23 Nov 2026 10:56:49 +01:00
perf/core: Convert perf_mux_hrtimer_restart() to use guard
Simplifies the code a bit.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org
---
kernel/events/core.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/kernel/events/core.c b/kernel/events/core.c
index d971c05..38dac15 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -1324,15 +1324,13 @@ static void __perf_mux_hrtimer_init(struct perf_cpu_pmu_context *cpc)
static int perf_mux_hrtimer_restart(struct perf_cpu_pmu_context *cpc)
{
struct hrtimer *timer = &cpc->hrtimer;
- unsigned long flags;
- raw_spin_lock_irqsave(&cpc->hrtimer_lock, flags);
+ guard(raw_spinlock_irqsave)(&cpc->hrtimer_lock);
if (!cpc->hrtimer_active) {
cpc->hrtimer_active = 1;
hrtimer_forward_now(timer, cpc->hrtimer_interval);
hrtimer_start_expires(timer, HRTIMER_MODE_ABS_PINNED_HARD);
}
- raw_spin_unlock_irqrestore(&cpc->hrtimer_lock, flags);
return 0;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-23 10:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-23 10:23 [tip: perf/core] perf/core: Convert perf_mux_hrtimer_restart() to use guard tip-bot2 for Peter Zijlstra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®