ARM: qcom: scm: Add logging of actual return code from scm call
authorOlav Haugan <ohaugan@codeaurora.org>
Tue, 5 Aug 2014 01:31:49 +0000 (18:31 -0700)
committerKumar Gala <galak@codeaurora.org>
Mon, 19 Jan 2015 17:53:32 +0000 (11:53 -0600)
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 <ohaugan@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Kumar Gala <galak@codeaurora.org>
arch/arm/mach-qcom/scm.c

index ec37b037e69c2af65f969e0b553aecc747c636d2..a77349d34e7889226d9ebbc49c80c09bb9a78286 100644 (file)
@@ -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;