Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 27a9992e authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: ipa4: Dump IPA registers during panic handling"

parents 88a2cdc6 818c2911
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -374,7 +374,7 @@ static int ipa3_active_clients_panic_notifier(struct notifier_block *this,
{
	ipa3_active_clients_log_print_table(active_clients_table_buf,
			IPA3_ACTIVE_CLIENTS_TABLE_BUF_SIZE);
	IPAERR("%s", active_clients_table_buf);
	IPAERR("%s\n", active_clients_table_buf);

	return NOTIFY_DONE;
}
@@ -4273,6 +4273,9 @@ static int ipa3_panic_notifier(struct notifier_block *this,
	if (res)
		IPAERR("uC panic handler failed %d\n", res);

	if (atomic_read(&ipa3_ctx->ipa3_active_clients.cnt) != 0)
		ipahal_print_all_regs();

	return NOTIFY_DONE;
}

+14 −0
Original line number Diff line number Diff line
@@ -1889,6 +1889,16 @@ static ssize_t ipa3_pm_ex_read_stats(struct file *file, char __user *ubuf,
	return simple_read_from_buffer(ubuf, count, ppos, dbg_buff, cnt);
}

static ssize_t ipa3_read_ipahal_regs(struct file *file, char __user *ubuf,
		size_t count, loff_t *ppos)
{
	IPA_ACTIVE_CLIENTS_INC_SIMPLE();
	ipahal_print_all_regs();
	IPA_ACTIVE_CLIENTS_DEC_SIMPLE();

	return 0;
}

static void ipa_dump_status(struct ipahal_pkt_status *status)
{
	IPA_DUMP_STATUS_FIELD(status_opcode);
@@ -2155,6 +2165,10 @@ static const struct ipa3_debugfs_file debugfs_files[] = {
		"enable_low_prio_print", IPA_WRITE_ONLY_MODE, NULL, {
			.write = ipa3_enable_ipc_low,
		}
	}, {
		"ipa_dump_regs", IPA_READ_ONLY_MODE, NULL, {
			.read = ipa3_read_ipahal_regs,
		}
	}
};

+1 −0
Original line number Diff line number Diff line
@@ -2133,6 +2133,7 @@ int __ipa3_release_hdr(u32 hdr_hdl);
int __ipa3_release_hdr_proc_ctx(u32 proc_ctx_hdl);
int _ipa_read_ep_reg_v3_0(char *buf, int max_len, int pipe);
int _ipa_read_ep_reg_v4_0(char *buf, int max_len, int pipe);
int _ipa_read_ipahal_regs(void);
void _ipa_enable_clks_v3_0(void);
void _ipa_disable_clks_v3_0(void);
struct device *ipa3_get_dma_dev(void);
+9 −0
Original line number Diff line number Diff line
@@ -46,6 +46,15 @@
			IPAHAL_DRV_NAME " %s:%d " fmt, ## args); \
	} while (0)

#define IPAHAL_DBG_REG(fmt, args...) \
	do { \
		pr_err(fmt, ## args); \
		IPA_IPC_LOGGING(ipa_get_ipc_logbuf(), \
			" %s:%d " fmt, ## args); \
		IPA_IPC_LOGGING(ipa_get_ipc_logbuf_low(), \
			" %s:%d " fmt, ## args); \
	} while (0)

#define IPAHAL_ERR_RL(fmt, args...) \
		do { \
			pr_err_ratelimited_ipa(IPAHAL_DRV_NAME " %s:%d " fmt, \
+330 −118

File changed.

Preview size limit exceeded, changes collapsed.

Loading