Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2b27a3a5 authored by Neeraj Upadhyay's avatar Neeraj Upadhyay
Browse files

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: default avatarNeeraj Upadhyay <neeraju@codeaurora.org>
parent 5168327a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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);
}