From 6bd9415d98f3c44a820c398ed5cbccecce07f331 Mon Sep 17 00:00:00 2001 From: Srinivasarao Pathipati Date: Fri, 27 Jan 2023 11:34:03 +0530 Subject: [PATCH] ANDROID: cpu: correct dl_cpu_busy() calls The patch 0039189a3b15 ("sched/deadline: Merge dl_task_can_attach() and dl_cpu_busy()") which is picked from upstream modifies declaration of function dl_cpu_busy(). But it won't update function usage from android specific code that introduced with patch 683010f555d8 ("ANDROID: cpu/hotplug: add pause/resume_cpus interface"). Bug: 266874695 Fixes: 0039189a3b15 ("sched/deadline: Merge dl_task_can_attach() and dl_cpu_busy()" Change-Id: I40c12f912b7fe854b1e2e13f75c727c3c9a2435c Signed-off-by: Srinivasarao Pathipati --- kernel/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/cpu.c b/kernel/cpu.c index fc15c01d61b8..9bd53e65246b 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -1159,7 +1159,7 @@ int remove_cpu(unsigned int cpu) } EXPORT_SYMBOL_GPL(remove_cpu); -extern bool dl_cpu_busy(unsigned int cpu); +extern int dl_cpu_busy(int cpu, struct task_struct *p); int __pause_drain_rq(struct cpumask *cpus) { @@ -1234,7 +1234,7 @@ int pause_cpus(struct cpumask *cpus) cpumask_and(cpus, cpus, cpu_active_mask); for_each_cpu(cpu, cpus) { - if (!cpu_online(cpu) || dl_cpu_busy(cpu) || + if (!cpu_online(cpu) || dl_cpu_busy(cpu, NULL) || get_cpu_device(cpu)->offline_disabled == true) { err = -EBUSY; goto err_cpu_maps_update;