mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
ANDROID: Export cpu_busy_with_softirqs()
This function used to be called task_may_not_preempt() in older versions and used by modules that have their extension to RT. Export it to allow users to continue to use it. Bug: 332629555 Signed-off-by: Qais Yousef <qyousef@google.com> Change-Id: I04affb8e9e6258f9fb36ebab4d7956a265e9e299
This commit is contained in:
@@ -1636,7 +1636,7 @@ static int find_lowest_rq(struct task_struct *task);
|
|||||||
* task is likely to block preemptions soon because it is a
|
* task is likely to block preemptions soon because it is a
|
||||||
* ksoftirq thread that is handling softirqs.
|
* 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) |
|
u32 softirqs = per_cpu(active_softirqs, cpu) |
|
||||||
__cpu_softirq_pending(cpu);
|
__cpu_softirq_pending(cpu);
|
||||||
@@ -1644,11 +1644,12 @@ static bool cpu_busy_with_softirqs(int cpu)
|
|||||||
return softirqs & LONG_SOFTIRQ_MASK;
|
return softirqs & LONG_SOFTIRQ_MASK;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static bool cpu_busy_with_softirqs(int cpu)
|
bool cpu_busy_with_softirqs(int cpu)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_RT_SOFTIRQ_AWARE_SCHED */
|
#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)
|
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();
|
rcu_read_unlock();
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_SCHED_DEBUG */
|
#endif /* CONFIG_SCHED_DEBUG */
|
||||||
|
|
||||||
|
extern bool cpu_busy_with_softirqs(int cpu);
|
||||||
|
|||||||
Reference in New Issue
Block a user