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

Commit bac48650 authored by Yan He's avatar Yan He
Browse files

msm: sps: output BAM register dump to IPC log only



Outputting BAM register dump to kernel log could consume
significant resource when the amount of registers is big. The
change here is to output BAM register dump to IPC log only as long
as IPC logging is enabled in the build.

Change-Id: Ibbd31bb2e97785008117c56da250beddbd75d958
Signed-off-by: default avatarYan He <yanhe@codeaurora.org>
parent e95bedaa
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -3005,8 +3005,8 @@ static int __init sps_init(void)
							"sps_ipc_log3", 0);
	if (!sps->ipc_log3)
		pr_err("Failed to create IPC log3\n");
	sps->ipc_log4 = ipc_log_context_create(SPS_IPC_LOGPAGES,
							"sps_ipc_log4", 0);
	sps->ipc_log4 = ipc_log_context_create(SPS_IPC_LOGPAGES *
				SPS_IPC_REG_DUMP_FACTOR, "sps_ipc_log4", 0);
	if (!sps->ipc_log4)
		pr_err("Failed to create IPC log4\n");

+5 −1
Original line number Diff line number Diff line
@@ -51,6 +51,7 @@

#define MAX_MSG_LEN 80
#define SPS_IPC_LOGPAGES 10
#define SPS_IPC_REG_DUMP_FACTOR 3

/* Connection mapping control struct */
struct sps_rm {
@@ -137,7 +138,10 @@ extern u8 print_limit_option;
	} while (0)
#define SPS_DUMP(msg, args...) do {					\
		SPS_IPC(4, sps, msg, args); \
		if (sps) { \
			if (sps->ipc_log4 == NULL) \
				pr_info(msg, ##args);	\
		} \
	} while (0)
#define SPS_DEBUGFS(msg, args...) do {					\
		char buf[MAX_MSG_LEN];		\