sched: walt: add nested spinlock api
Use nested spin lock api to avoid deadlock warning Change-Id: Ia2aed8f025bb209876ff87ba5a9e32b2b80718d8 Signed-off-by: Ashay Jaiswal <quic_ashayj@quicinc.com>
This commit is contained in:
parent
af6c9318b1
commit
6966d0f7fe
@ -4220,10 +4220,15 @@ static int walt_init_stop_handler(void *data)
|
||||
struct task_struct *g, *p;
|
||||
u64 window_start_ns, nr_windows;
|
||||
struct walt_rq *wrq;
|
||||
int level = 0;
|
||||
|
||||
read_lock(&tasklist_lock);
|
||||
for_each_possible_cpu(cpu) {
|
||||
raw_spin_lock(&cpu_rq(cpu)->lock);
|
||||
if (level == 0)
|
||||
raw_spin_lock(&cpu_rq(cpu)->lock);
|
||||
else
|
||||
raw_spin_lock_nested(&cpu_rq(cpu)->lock, level);
|
||||
level++;
|
||||
}
|
||||
|
||||
do_each_thread(g, p) {
|
||||
|
Loading…
Reference in New Issue
Block a user