From: Magnus Lindholm <linmag7@gmail.com>
To: davem@davemloft.net, andreas@gaisler.com
Cc: sam@ravnborg.org, sparclinux@vger.kernel.org,
linux-kernel@vger.kernel.org, linmag7@gmail.com,
stable@vger.kernel.org
Subject: [PATCH 04/18] sparc32,leon: avoid nested IRQ accounting in the timer handler
Date: Thu, 26 Nov 2026 10:30:09 +0100 [thread overview]
Message-ID: <20261126093106.1345825-5-linmag7@gmail.com> (raw)
In-Reply-To: <20261126093106.1345825-1-linmag7@gmail.com>
handler_irq() enters hardirq context before genirq dispatches the LEON
per-CPU timer. Entering it a second time around the clockevent makes
account_process_tick() charge idle, system and softirq ticks to hardirq
time. As a result, htop shows idle CPUs as busy.
Remove the inner irq_enter()/irq_exit() pair. Commit 2cf9530420e4
("sparc32,leon: per-cpu ticker use genirq per-cpu handler") removed
it when LEON switched to genirq. The clockevent conversion restored
it. The sun4m and sun4d tickers enter through dedicated traps and
still need their own pair.
Fixes: 62f082830d63 ("sparc32: generic clockevent support")
Cc: stable@vger.kernel.org
Signed-off-by: Magnus Lindholm <linmag7@gmail.com>
---
arch/sparc/kernel/leon_kernel.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/sparc/kernel/leon_kernel.c b/arch/sparc/kernel/leon_kernel.c
index a43cf794bb1e..e560f0237165 100644
--- a/arch/sparc/kernel/leon_kernel.c
+++ b/arch/sparc/kernel/leon_kernel.c
@@ -289,10 +289,8 @@ static irqreturn_t leon_percpu_timer_ce_interrupt(int irq, void *unused)
ce = &per_cpu(sparc32_clockevent, cpu);
- irq_enter();
if (ce->event_handler)
ce->event_handler(ce);
- irq_exit();
return IRQ_HANDLED;
}
--
2.43.0
next parent reply other threads:[~2026-11-26 9:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20261126093106.1345825-1-linmag7@gmail.com>
2026-11-26 9:30 ` Magnus Lindholm [this message]
2026-11-26 9:30 ` [PATCH 05/18] sparc32: preserve both LEON PROM character-output conventions Magnus Lindholm
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=20261126093106.1345825-5-linmag7@gmail.com \
--to=linmag7@gmail.com \
--cc=andreas@gaisler.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=sam@ravnborg.org \
--cc=sparclinux@vger.kernel.org \
--cc=stable@vger.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