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

Skip to content
Commit 77f96c7a authored by Sultan Alsawaf's avatar Sultan Alsawaf Committed by Pranav Vashi
Browse files

soc: qcom: scm: Fix scm_call_count when used with GCC and LSE atomics



LSE atomic increments and decrements clobber the x0 and x1 registers,
and since these registers are used in volatile inline assembly for SCM
calls, GCC does not preserve their values across the atomic_inc() and
atomic_dec() calls. This results in x0 and x1 containing garbage values
before and after the SCM call, breaking it entirely.

Wrapping the atomic_inc() and atomic_dec() outside the SCM call
functions fixes the issue.

Change-Id: Ia2a192efb2be3c2458ddbe49eaef0edcad4378aa
Signed-off-by: default avatarSultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: default avatarxNombre <kartapolska@gmail.com>
Signed-off-by: default avatarPranav Vashi <neobuddy89@gmail.com>
parent ec54f2dc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment