soc: qcom: Correct idle task check for stack capture

Correct the idle task check, to be done on 'next'
task, instead of current task, while registering
current task's stack.

Change-Id: I8c4fde434b3eca0543c5748234ebabbd40da8672
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
This commit is contained in:
Neeraj Upadhyay 2020-10-07 17:23:37 +05:30
commit 2b27a3a55f

View file

@ -367,7 +367,7 @@ static void update_md_cpu_stack(u32 cpu, u64 sp)
{
struct md_stack_cpu_data *md_stack_cpu_d = &per_cpu(md_stack_data, cpu);
if (is_idle_task(current) || !md_current_stack_init)
if (!md_current_stack_init)
return;
update_md_stack(md_stack_cpu_d->stack_mdr,
@ -380,6 +380,8 @@ void md_current_stack_notifer(void *ignore, bool preempt,
u32 cpu = task_cpu(next);
u64 sp = (u64)next->stack;
if (is_idle_task(next))
return;
update_md_cpu_stack(cpu, sp);
}