Thread (17 messages) 17 messages, 6 authors, 2015-01-23
STALE4186d

[PATCH 7/8] msm: scm: Add logging of actual return code from scm call

From: Stephen Boyd <hidden>
Date: 2014-08-05 01:33:34
Also in: linux-arm-msm, lkml
Subsystem: arm port, arm/qualcomm mailing list, arm/qualcomm support, the rest · Maintainers: Russell King, Bjorn Andersson, Konrad Dybcio, Linus Torvalds

From: Olav Haugan <redacted>

When an error occurs during an scm call the error returned is
remapped so we lose the original error code. This means that
when an error occurs we have no idea what actually failed within
the secure environment.

Add a logging statement that will log the actual error code from
scm call allowing us to easily determine what caused the error
to occur.

Signed-off-by: Olav Haugan <redacted>
Signed-off-by: Stephen Boyd <redacted>
---
 arch/arm/mach-qcom/scm.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-qcom/scm.c b/arch/arm/mach-qcom/scm.c
index 7c62c03324f4..cfd4717aec78 100644
--- a/arch/arm/mach-qcom/scm.c
+++ b/arch/arm/mach-qcom/scm.c
@@ -152,6 +152,7 @@ static inline void *scm_get_response_buffer(const struct scm_response *rsp)
 
 static int scm_remap_error(int err)
 {
+	pr_err("scm_call failed with error code %d\n", err);
 	switch (err) {
 	case SCM_ERROR:
 		return -EIO;
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help