Skip to content

Commit 2984539

Browse files
author
Frederic Weisbecker
committed
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 <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Paul E. McKenney <[email protected]> Cc: Paul Menzel <[email protected]>
1 parent a1ff03c commit 2984539

File tree

4 files changed

+7
-11
lines changed

4 files changed

+7
-11
lines changed

include/linux/rcutiny.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,8 @@ static inline void rcu_softirq_qs(void)
6464
rcu_tasks_qs(current, (preempt)); \
6565
} while (0)
6666

67-
static inline int rcu_needs_cpu(u64 basemono, u64 *nextevt)
67+
static inline int rcu_needs_cpu(void)
6868
{
69-
*nextevt = KTIME_MAX;
7069
return 0;
7170
}
7271

include/linux/rcutree.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
void rcu_softirq_qs(void);
2121
void rcu_note_context_switch(bool preempt);
22-
int rcu_needs_cpu(u64 basem, u64 *nextevt);
22+
int rcu_needs_cpu(void);
2323
void rcu_cpu_stall_reset(void);
2424

2525
/*

kernel/rcu/tree.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,9 +1086,8 @@ void rcu_irq_enter_irqson(void)
10861086
* Just check whether or not this CPU has non-offloaded RCU callbacks
10871087
* queued.
10881088
*/
1089-
int rcu_needs_cpu(u64 basemono, u64 *nextevt)
1089+
int rcu_needs_cpu(void)
10901090
{
1091-
*nextevt = KTIME_MAX;
10921091
return !rcu_segcblist_empty(&this_cpu_ptr(&rcu_data)->cblist) &&
10931092
!rcu_rdp_is_offloaded(this_cpu_ptr(&rcu_data));
10941093
}

kernel/time/tick-sched.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,7 @@ static inline bool local_timer_softirq_pending(void)
785785

786786
static ktime_t tick_nohz_next_event(struct tick_sched *ts, int cpu)
787787
{
788-
u64 basemono, next_tick, next_tmr, next_rcu, delta, expires;
788+
u64 basemono, next_tick, delta, expires;
789789
unsigned long basejiff;
790790
unsigned int seq;
791791

@@ -808,7 +808,7 @@ static ktime_t tick_nohz_next_event(struct tick_sched *ts, int cpu)
808808
* minimal delta which brings us back to this place
809809
* immediately. Lather, rinse and repeat...
810810
*/
811-
if (rcu_needs_cpu(basemono, &next_rcu) || arch_needs_cpu() ||
811+
if (rcu_needs_cpu() || arch_needs_cpu() ||
812812
irq_work_needs_cpu() || local_timer_softirq_pending()) {
813813
next_tick = basemono + TICK_NSEC;
814814
} else {
@@ -819,10 +819,8 @@ static ktime_t tick_nohz_next_event(struct tick_sched *ts, int cpu)
819819
* disabled this also looks at the next expiring
820820
* hrtimer.
821821
*/
822-
next_tmr = get_next_timer_interrupt(basejiff, basemono);
823-
ts->next_timer = next_tmr;
824-
/* Take the next rcu event into account */
825-
next_tick = next_rcu < next_tmr ? next_rcu : next_tmr;
822+
next_tick = get_next_timer_interrupt(basejiff, basemono);
823+
ts->next_timer = next_tick;
826824
}
827825

828826
/*

0 commit comments

Comments
 (0)