Skip to content

Commit feed66e

Browse files
committed
rcu: Eliminate unused APIs intended for adaptive ticks
The rcu_user_enter_after_irq() and rcu_user_exit_after_irq() functions were intended for use by adaptive ticks, but changes in implementation have rendered them unnecessary. This commit therefore removes them. Reported-by: Frederic Weisbecker <fweisbec@gmail.com> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
1 parent f7f7bac commit feed66e

2 files changed

Lines changed: 0 additions & 47 deletions

File tree

‎include/linux/rcupdate.h‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,13 +229,9 @@ extern void rcu_irq_exit(void);
229229
#ifdef CONFIG_RCU_USER_QS
230230
extern void rcu_user_enter(void);
231231
extern void rcu_user_exit(void);
232-
extern void rcu_user_enter_after_irq(void);
233-
extern void rcu_user_exit_after_irq(void);
234232
#else
235233
static inline void rcu_user_enter(void) { }
236234
static inline void rcu_user_exit(void) { }
237-
static inline void rcu_user_enter_after_irq(void) { }
238-
static inline void rcu_user_exit_after_irq(void) { }
239235
static inline void rcu_user_hooks_switch(struct task_struct *prev,
240236
struct task_struct *next) { }
241237
#endif /* CONFIG_RCU_USER_QS */

‎kernel/rcutree.c‎

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -444,27 +444,6 @@ void rcu_user_enter(void)
444444
{
445445
rcu_eqs_enter(1);
446446
}
447-
448-
/**
449-
* rcu_user_enter_after_irq - inform RCU that we are going to resume userspace
450-
* after the current irq returns.
451-
*
452-
* This is similar to rcu_user_enter() but in the context of a non-nesting
453-
* irq. After this call, RCU enters into idle mode when the interrupt
454-
* returns.
455-
*/
456-
void rcu_user_enter_after_irq(void)
457-
{
458-
unsigned long flags;
459-
struct rcu_dynticks *rdtp;
460-
461-
local_irq_save(flags);
462-
rdtp = &__get_cpu_var(rcu_dynticks);
463-
/* Ensure this irq is interrupting a non-idle RCU state. */
464-
WARN_ON_ONCE(!(rdtp->dynticks_nesting & DYNTICK_TASK_MASK));
465-
rdtp->dynticks_nesting = 1;
466-
local_irq_restore(flags);
467-
}
468447
#endif /* CONFIG_RCU_USER_QS */
469448

470449
/**
@@ -581,28 +560,6 @@ void rcu_user_exit(void)
581560
{
582561
rcu_eqs_exit(1);
583562
}
584-
585-
/**
586-
* rcu_user_exit_after_irq - inform RCU that we won't resume to userspace
587-
* idle mode after the current non-nesting irq returns.
588-
*
589-
* This is similar to rcu_user_exit() but in the context of an irq.
590-
* This is called when the irq has interrupted a userspace RCU idle mode
591-
* context. When the current non-nesting interrupt returns after this call,
592-
* the CPU won't restore the RCU idle mode.
593-
*/
594-
void rcu_user_exit_after_irq(void)
595-
{
596-
unsigned long flags;
597-
struct rcu_dynticks *rdtp;
598-
599-
local_irq_save(flags);
600-
rdtp = &__get_cpu_var(rcu_dynticks);
601-
/* Ensure we are interrupting an RCU idle mode. */
602-
WARN_ON_ONCE(rdtp->dynticks_nesting & DYNTICK_TASK_NEST_MASK);
603-
rdtp->dynticks_nesting += DYNTICK_TASK_EXIT_IDLE;
604-
local_irq_restore(flags);
605-
}
606563
#endif /* CONFIG_RCU_USER_QS */
607564

608565
/**

0 commit comments

Comments
 (0)