Ver Fonte

msm: ipa3: Changes to keep IPA clock voted in panic notifier

Adding changes to avoid unclocked access in panic notifier.
Increasing the IPA clock vote before saving the IPA registers.

Change-Id: Ie055ffa844df45b8a65603190495bc2d1cc3f84a
Signed-off-by: Ashok Vuyyuru <[email protected]>
Ashok Vuyyuru há 3 anos atrás
pai
commit
581d69866d
1 ficheiros alterados com 7 adições e 1 exclusões
  1. 7 1
      drivers/platform/msm/ipa/ipa_v3/ipa.c

+ 7 - 1
drivers/platform/msm/ipa/ipa_v3/ipa.c

@@ -6616,6 +6616,7 @@ static int ipa3_panic_notifier(struct notifier_block *this,
 	unsigned long event, void *ptr)
 {
 	int res;
+	struct ipa_active_client_logging_info log_info;
 
 	ipa3_freeze_clock_vote_and_notify_modem();
 
@@ -6624,7 +6625,12 @@ static int ipa3_panic_notifier(struct notifier_block *this,
 	if (res)
 		IPAERR("uC panic handler failed %d\n", res);
 
-	if (atomic_read(&ipa3_ctx->ipa_clk_vote)) {
+	/* Make sure IPA clock voted when collecting the reg dump */
+	IPA_ACTIVE_CLIENTS_PREP_SPECIAL(log_info, "PANIC_VOTE");
+	res = ipa3_inc_client_enable_clks_no_block(&log_info);
+	if (res) {
+		IPAERR("IPA clk off not saving the IPA registers\n");
+	} else {
 		ipahal_print_all_regs(false);
 		ipa_save_registers();
 		ipa_wigig_save_regs();