From nobody Tue Jun 23 01:16:22 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 448AEC433F5 for ; Mon, 14 Mar 2022 09:28:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238012AbiCNJ3i (ORCPT ); Mon, 14 Mar 2022 05:29:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237971AbiCNJ32 (ORCPT ); Mon, 14 Mar 2022 05:29:28 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1C5917E34; Mon, 14 Mar 2022 02:28:18 -0700 (PDT) Date: Mon, 14 Mar 2022 09:28:16 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1647250097; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yYl7CB7j63UBU3Jg//CDwUXS2tRDp63txHBjUgu6exo=; b=DSfVSSVjIN+YZtuWJOMJE7q1yCN3flH61fhcspNcd5vg1J6M7cvOjUzpKbEUCSJ7hsDJY4 Q/Wyy+4IaaB6gmdfdBceuM+GfwpbBsiM9yZoHZgQusc8yuJUU/6CscqqVoIqewxEQyCcmY kPFm/sAMt6mf0e90Mi9D9y6/xyuH18c3NJ55VAm7BkeFfxK4m13r0TdX25qSepAfd4P3jB /2m9/2nj6pBk6cNI13BVgqU2hdl4KNv0ZkvpUILuLD9aqEOU7CSZlVQMd4AQM0jZs1BRVb RtO8cRJvtw4K0K1MM3hFZYivMNYTjKWpTkE4vF8tcqNcvlnSf4tJZYwTiUSE2Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1647250097; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yYl7CB7j63UBU3Jg//CDwUXS2tRDp63txHBjUgu6exo=; b=c+MT3EBVru7I+TzJCKzvl9sM3NioOj6xNC4ILy1OzOn4gAmf7J3uBIcUrSqLFcfEmaNBcB auHymPaQs1tkNzDg== From: "tip-bot2 for Frederic Weisbecker" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/core] tick/rcu: Remove obsolete rcu_needs_cpu() parameters Cc: Frederic Weisbecker , Thomas Gleixner , Peter Zijlstra , "Paul E. McKenney" , Paul Menzel , x86@kernel.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Message-ID: <164725009622.16921.3910394351313618828.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the timers/core branch of tip: Commit-ID: 2984539959dbaf4e65e19bf90c2419304a81a985 Gitweb: https://git.kernel.org/tip/2984539959dbaf4e65e19bf90c2419304= a81a985 Author: Frederic Weisbecker AuthorDate: Tue, 08 Feb 2022 17:16:33 +01:00 Committer: Frederic Weisbecker CommitterDate: Mon, 07 Mar 2022 23:01:26 +01:00 tick/rcu: Remove obsolete rcu_needs_cpu() parameters With the removal of CONFIG_RCU_FAST_NO_HZ, the parameters in rcu_needs_cpu() are not necessary anymore. Simply remove them. Signed-off-by: Frederic Weisbecker Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Paul E. McKenney Cc: Paul Menzel --- include/linux/rcutiny.h | 3 +-- include/linux/rcutree.h | 2 +- kernel/rcu/tree.c | 3 +-- kernel/time/tick-sched.c | 10 ++++------ 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h index 858f4d4..5fed476 100644 --- a/include/linux/rcutiny.h +++ b/include/linux/rcutiny.h @@ -64,9 +64,8 @@ static inline void rcu_softirq_qs(void) rcu_tasks_qs(current, (preempt)); \ } while (0) =20 -static inline int rcu_needs_cpu(u64 basemono, u64 *nextevt) +static inline int rcu_needs_cpu(void) { - *nextevt =3D KTIME_MAX; return 0; } =20 diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h index 53209d6..6cc9129 100644 --- a/include/linux/rcutree.h +++ b/include/linux/rcutree.h @@ -19,7 +19,7 @@ =20 void rcu_softirq_qs(void); void rcu_note_context_switch(bool preempt); -int rcu_needs_cpu(u64 basem, u64 *nextevt); +int rcu_needs_cpu(void); void rcu_cpu_stall_reset(void); =20 /* diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index a4c25a6..80faf22 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -1086,9 +1086,8 @@ void rcu_irq_enter_irqson(void) * Just check whether or not this CPU has non-offloaded RCU callbacks * queued. */ -int rcu_needs_cpu(u64 basemono, u64 *nextevt) +int rcu_needs_cpu(void) { - *nextevt =3D KTIME_MAX; return !rcu_segcblist_empty(&this_cpu_ptr(&rcu_data)->cblist) && !rcu_rdp_is_offloaded(this_cpu_ptr(&rcu_data)); } diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index c89f50a..566ad5b 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -785,7 +785,7 @@ static inline bool local_timer_softirq_pending(void) =20 static ktime_t tick_nohz_next_event(struct tick_sched *ts, int cpu) { - u64 basemono, next_tick, next_tmr, next_rcu, delta, expires; + u64 basemono, next_tick, delta, expires; unsigned long basejiff; unsigned int seq; =20 @@ -808,7 +808,7 @@ 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(basemono, &next_rcu) || arch_needs_cpu() || + if (rcu_needs_cpu() || arch_needs_cpu() || irq_work_needs_cpu() || local_timer_softirq_pending()) { next_tick =3D basemono + TICK_NSEC; } else { @@ -819,10 +819,8 @@ static ktime_t tick_nohz_next_event(struct tick_sched = *ts, int cpu) * disabled this also looks at the next expiring * hrtimer. */ - next_tmr =3D get_next_timer_interrupt(basejiff, basemono); - ts->next_timer =3D next_tmr; - /* Take the next rcu event into account */ - next_tick =3D next_rcu < next_tmr ? next_rcu : next_tmr; + next_tick =3D get_next_timer_interrupt(basejiff, basemono); + ts->next_timer =3D next_tick; } =20 /*