security: tlk: move ote_print_logs to common code
Varun Wadekar [Mon, 7 Apr 2014 06:53:46 +0000 (11:53 +0530)]
Move ote_print_logs() calls to tlk_generic_smc and tlk_extended_smc
so that it gets called after every secure firmware call.

Change-Id: I1603a55440ebaf10cc727a442686e1ced8b18729
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/393219
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

security/tlk_driver/ote_comms.c

index 1f380b7..da260a5 100644 (file)
@@ -249,6 +249,9 @@ uint32_t tlk_generic_smc(uint32_t arg0, uintptr_t arg1, uintptr_t arg2)
 
        restore_cpumask();
 
+       /* Print TLK logs if any */
+       ote_print_logs();
+
        return retval;
 }
 
@@ -264,6 +267,9 @@ uint32_t tlk_extended_smc(uintptr_t *regs)
 
        restore_cpumask();
 
+       /* Print TLK logs if any */
+       ote_print_logs();
+
        return retval;
 }
 
@@ -287,12 +293,6 @@ static void do_smc(struct te_request *request, struct tlk_device *dev)
        }
 
        tlk_generic_smc(request->type, smc_args, smc_params);
-
-       /*
-        * Check to see if there are any logs in written by TLK.
-        * If there are, print them out.
-        */
-       ote_print_logs();
 }
 
 /*
@@ -311,12 +311,6 @@ static void do_smc_compat(struct te_request_compat *request,
        }
 
        tlk_generic_smc(request->type, smc_args, smc_params);
-
-       /*
-        * Check to see if there are any logs in written by TLK.
-        * If there are, print them out.
-        */
-       ote_print_logs();
 }
 
 /*