From: "tip-bot2 for Peter Zijlstra" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: "Peter Zijlstra (Intel)" <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>,
linux-kernel@vger.kernel.org, x86@kernel.org
Subject: [tip: perf/core] perf/core: Convert perf_mux_hrtimer_restart() to use guard
Date: Mon, 23 Nov 2026 10:23:14 -0000 [thread overview]
Message-ID: <179542939435.92412.5469861104022866543.tip-bot2@tip-bot2> (raw)
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;
}
reply other threads:[~2026-11-23 10:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179542939435.92412.5469861104022866543.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®