diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c index 2e1e83ff4c80..7d9fec642662 100644 --- a/kernel/sched/rt.c +++ b/kernel/sched/rt.c @@ -1636,7 +1636,7 @@ static int find_lowest_rq(struct task_struct *task); * task is likely to block preemptions soon because it is a * ksoftirq thread that is handling softirqs. */ -static bool cpu_busy_with_softirqs(int cpu) +bool cpu_busy_with_softirqs(int cpu) { u32 softirqs = per_cpu(active_softirqs, cpu) | __cpu_softirq_pending(cpu); @@ -1644,11 +1644,12 @@ static bool cpu_busy_with_softirqs(int cpu) return softirqs & LONG_SOFTIRQ_MASK; } #else -static bool cpu_busy_with_softirqs(int cpu) +bool cpu_busy_with_softirqs(int cpu) { return false; } #endif /* CONFIG_RT_SOFTIRQ_AWARE_SCHED */ +EXPORT_SYMBOL_GPL(cpu_busy_with_softirqs); static bool rt_task_fits_cpu(struct task_struct *p, int cpu) { @@ -3168,3 +3169,5 @@ void print_rt_stats(struct seq_file *m, int cpu) rcu_read_unlock(); } #endif /* CONFIG_SCHED_DEBUG */ + +extern bool cpu_busy_with_softirqs(int cpu);