From 95fe1e01264bc124b5a60ca6f26261f2660a686e Mon Sep 17 00:00:00 2001 From: Varun Wadekar Date: Mon, 7 Apr 2014 12:23:46 +0530 Subject: security: tlk: move ote_print_logs to common code 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 Reviewed-on: http://git-master/r/393219 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Bharat Nihalani --- security/tlk_driver/ote_comms.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'security') diff --git a/security/tlk_driver/ote_comms.c b/security/tlk_driver/ote_comms.c index 1f380b772499..da260a5c216f 100644 --- a/security/tlk_driver/ote_comms.c +++ b/security/tlk_driver/ote_comms.c @@ -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(); } /* -- cgit v1.2.3