forked from OnePlusOSS/android_kernel_oneplus_sm8250
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
soc: qcom: scm: Fix scm_call_count when used with 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. Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com> [lazerl0rd: Adjust title to represent this change affects LLVM/Clang too.] Signed-off-by: Diab Neiroukh <lazerl0rd@thezest.dev> Signed-off-by: dreamisbaka <jolinux.g@gmail.com>
- Loading branch information
1 parent
9de2edc
commit 520bd16
Showing
1 changed file
with
38 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters