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

Commit 2e712df6 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mach-msm: common_log: add common log support"

parents c784d655 9a43c683
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -255,6 +255,15 @@ config MSM_MEMORY_DUMP_V2
	  of deadlocks or cpu hangs these dump regions are captured to
	  give a snapshot of the system at the time of the crash.

config MSM_COMMON_LOG
	bool "MSM Common Log Support"
	depends on MSM_MEMORY_DUMP
	help
	 Use this to export symbols of some log address and variables
	 that need to parse crash dump files to a memory dump table. This
	 table can be used by post analysis tools to extract information
	 from memory when device crashes.

config MSM_WATCHDOG_V2
	bool "MSM Watchdog Support"
	help
+1 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ obj-$(CONFIG_MSM_SCM) += scm.o scm-boot.o
obj-$(CONFIG_MSM_SMD) += smd.o smd_debug.o smd_private.o smd_init_dt.o smsm_debug.o
obj-$(CONFIG_MSM_SMEM) += smem.o smem_debug.o
obj-$(CONFIG_MSM_SMEM_LOGGING) += smem_log.o
obj-$(CONFIG_MSM_COMMON_LOG) += common_log.o
obj-$(CONFIG_MSM_SMP2P) += smp2p.o smp2p_debug.o
obj-$(CONFIG_MSM_SMP2P_TEST) += smp2p_loopback.o smp2p_test.o smp2p_spinlock_test.o
obj-$(CONFIG_MSM_WATCHDOG_V2) += watchdog_v2.o
+44 −0
Original line number Diff line number Diff line
/* Copyright (c) 2014, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 */

#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/kallsyms.h>
#include <soc/qcom/memory_dump.h>

static void __init common_log_register(void)
{
	struct msm_client_dump dump;
	char **log_bufp;
	uint32_t *log_buf_lenp;

	log_bufp = (char **)kallsyms_lookup_name("log_buf");
	log_buf_lenp = (uint32_t *)kallsyms_lookup_name("log_buf_len");
	if (!log_bufp || !log_buf_lenp) {
		pr_err("%s: Symbol log_buf not found!\n", __func__);
		return;
	}
	dump.id = MSM_LOG_BUF;
	dump.start_addr = virt_to_phys(*log_bufp);
	dump.end_addr = virt_to_phys(*log_bufp + *log_buf_lenp);
	if (msm_dump_tbl_register(&dump))
		pr_err("%s: Could not register log_buf.\n", __func__);
}

static int __init msm_common_log_init(void)
{
	common_log_register();
	return 0;
}
late_initcall(msm_common_log_init);
+1 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ enum dump_client_type {
	MSM_ETM3_REG,
	MSM_TMC0_REG, /* TMC_ETR */
	MSM_TMC1_REG, /* TMC_ETF */
	MSM_LOG_BUF,
	MAX_NUM_CLIENTS,
};