Commit ae9e557b authored by Paul E. McKenney's avatar Paul E. McKenney

time: Export tick start/stop functions for rcutorture

It turns out that rcutorture needs to ensure that the scheduling-clock
interrupt is enabled in CONFIG_NO_HZ_FULL kernels before starting on
CPU-bound in-kernel processing.  This commit therefore exports
tick_nohz_dep_set_task(), tick_nohz_dep_clear_task(), and
tick_nohz_full_setup() to GPL kernel modules.
Reported-by: default avatarkbuild test robot <lkp@intel.com>
Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
parent 01b4c399
...@@ -172,6 +172,7 @@ static void tick_sched_handle(struct tick_sched *ts, struct pt_regs *regs) ...@@ -172,6 +172,7 @@ static void tick_sched_handle(struct tick_sched *ts, struct pt_regs *regs)
#ifdef CONFIG_NO_HZ_FULL #ifdef CONFIG_NO_HZ_FULL
cpumask_var_t tick_nohz_full_mask; cpumask_var_t tick_nohz_full_mask;
bool tick_nohz_full_running; bool tick_nohz_full_running;
EXPORT_SYMBOL_GPL(tick_nohz_full_running);
static atomic_t tick_dep_mask; static atomic_t tick_dep_mask;
static bool check_tick_dependency(atomic_t *dep) static bool check_tick_dependency(atomic_t *dep)
...@@ -351,11 +352,13 @@ void tick_nohz_dep_set_task(struct task_struct *tsk, enum tick_dep_bits bit) ...@@ -351,11 +352,13 @@ void tick_nohz_dep_set_task(struct task_struct *tsk, enum tick_dep_bits bit)
*/ */
tick_nohz_dep_set_all(&tsk->tick_dep_mask, bit); tick_nohz_dep_set_all(&tsk->tick_dep_mask, bit);
} }
EXPORT_SYMBOL_GPL(tick_nohz_dep_set_task);
void tick_nohz_dep_clear_task(struct task_struct *tsk, enum tick_dep_bits bit) void tick_nohz_dep_clear_task(struct task_struct *tsk, enum tick_dep_bits bit)
{ {
atomic_andnot(BIT(bit), &tsk->tick_dep_mask); atomic_andnot(BIT(bit), &tsk->tick_dep_mask);
} }
EXPORT_SYMBOL_GPL(tick_nohz_dep_clear_task);
/* /*
* Set a per-taskgroup tick dependency. Posix CPU timers need this in order to elapse * Set a per-taskgroup tick dependency. Posix CPU timers need this in order to elapse
...@@ -404,6 +407,7 @@ void __init tick_nohz_full_setup(cpumask_var_t cpumask) ...@@ -404,6 +407,7 @@ void __init tick_nohz_full_setup(cpumask_var_t cpumask)
cpumask_copy(tick_nohz_full_mask, cpumask); cpumask_copy(tick_nohz_full_mask, cpumask);
tick_nohz_full_running = true; tick_nohz_full_running = true;
} }
EXPORT_SYMBOL_GPL(tick_nohz_full_setup);
static int tick_nohz_cpu_down(unsigned int cpu) static int tick_nohz_cpu_down(unsigned int cpu)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment