From 0ac2f767f796643209dc6a9473c9d6ef92b8a16e Mon Sep 17 00:00:00 2001 From: Leo Yan Date: Fri, 2 Jun 2017 23:09:11 +0800 Subject: coresight: Support panic kdump functionality After kernel panic happens, coresight has many useful info can be used for analysis. For example, the trace info from ETB RAM can be used to check the CPU execution flows before crash. So we can save the tracing data from sink devices, and rely on kdump to save DDR content and uses "crash" tool to extract coresight dumping from vmcore file. This patch is to add a simple framework to support panic dump functionality; it registers panic notifier, and provide the general APIs {coresight_kdump_add|coresight_kdump_del} as helper functions so any coresight device can add itself into dump list or delete as needed. This driver provides helper function coresight_kdump_update() to update the dump buffer base address and buffer size. This function can be used by coresight driver, e.g. it can be used to save ETM meta data info at runtime and these info can be prepared pre panic happening. When kernel panic happens, the notifier iterates dump list and calls callback function to dump device specific info. The panic dump is mainly used to dump trace data so we can get to know the execution flow before the panic happens. Signed-off-by: Leo Yan --- drivers/hwtracing/coresight/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/hwtracing/coresight/Makefile') diff --git a/drivers/hwtracing/coresight/Makefile b/drivers/hwtracing/coresight/Makefile index 61db9dd0d571f..946fe19736eaf 100644 --- a/drivers/hwtracing/coresight/Makefile +++ b/drivers/hwtracing/coresight/Makefile @@ -18,3 +18,4 @@ obj-$(CONFIG_CORESIGHT_SOURCE_ETM4X) += coresight-etm4x.o \ obj-$(CONFIG_CORESIGHT_DYNAMIC_REPLICATOR) += coresight-dynamic-replicator.o obj-$(CONFIG_CORESIGHT_STM) += coresight-stm.o obj-$(CONFIG_CORESIGHT_CPU_DEBUG) += coresight-cpu-debug.o +obj-$(CONFIG_CORESIGHT_PANIC_KDUMP) += coresight-panic-kdump.o -- cgit v1.2.3