From 2bfc9e417ab815b65cbdf5497de685fcee50c501 Mon Sep 17 00:00:00 2001 From: Mete Durlu Date: Thu, 18 Jun 2026 14:00:16 +0200 Subject: [PATCH] tick: Remove arch_needs_cpu Remove unused arch_needs_cpu() hook. No architectures use it after s390 removed its use case. Suggested-by: Heiko Carstens Signed-off-by: Mete Durlu Reviewed-by: Heiko Carstens Reviewed-by: Thomas Gleixner Acked-by: Rafael J. Wysocki (Intel) Signed-off-by: Alexander Gordeev Signed-off-by: Vasily Gorbik --- include/linux/tick.h | 3 --- kernel/time/tick-sched.c | 7 +++---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/include/linux/tick.h b/include/linux/tick.h index 1cf4651f09ad..a43b7bd8ba3f 100644 --- a/include/linux/tick.h +++ b/include/linux/tick.h @@ -44,9 +44,6 @@ static inline void tick_unfreeze(void) { } #ifdef CONFIG_TICK_ONESHOT extern void tick_irq_enter(void); -# ifndef arch_needs_cpu -# define arch_needs_cpu() (0) -# endif # else static inline void tick_irq_enter(void) { } #endif diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index 98a9cae915c0..6c3fea386713 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -828,8 +828,7 @@ static ktime_t tick_nohz_next_event(struct tick_sched *ts, int cpu) ts->timer_expires_base = basemono; /* - * Keep the periodic tick, when RCU, architecture or irq_work - * requests it. + * Keep the periodic tick, when RCU or irq_work requests it. * Aside of that, check whether the local timer softirq is * pending. If so, its a bad idea to call get_next_timer_interrupt(), * because there is an already expired timer, so it will request @@ -837,8 +836,8 @@ static ktime_t tick_nohz_next_event(struct tick_sched *ts, int cpu) * minimal delta, which brings us back to this place * immediately. Lather, rinse and repeat... */ - if (rcu_needs_cpu() || arch_needs_cpu() || - irq_work_needs_cpu() || local_timer_softirq_pending()) { + if (rcu_needs_cpu() || irq_work_needs_cpu() || + local_timer_softirq_pending()) { next_tick = basemono + TICK_NSEC; } else { /*