ANDROID: vendor_hooks: Add new android vendor hooks for ipi stop
When a kernel panic occurred, it is sometimes caused by a other cpu than the panic cpu. When a panic cpu sends smp stop IPI, it can help to solve the problem even more if aonther cpu stores registers and run cache flush. Bug: 165956922 Change-Id: I747f776456330d904015cfe4ae423e4b63f18f85 Signed-off-by: Changki Kim <changki.kim@samsung.com> Signed-off-by: Will McVicker <willmcvicker@google.com> Signed-off-by: Jonglin Lee <jonglin@google.com>
This commit is contained in:
@@ -53,6 +53,8 @@
|
||||
|
||||
#define CREATE_TRACE_POINTS
|
||||
#include <trace/events/ipi.h>
|
||||
#undef CREATE_TRACE_POINTS
|
||||
#include <trace/hooks/debug.h>
|
||||
|
||||
DEFINE_PER_CPU_READ_MOSTLY(int, cpu_number);
|
||||
EXPORT_PER_CPU_SYMBOL(cpu_number);
|
||||
@@ -901,6 +903,7 @@ static void do_handle_IPI(int ipinr)
|
||||
break;
|
||||
|
||||
case IPI_CPU_STOP:
|
||||
trace_android_vh_ipi_stop(get_irq_regs());
|
||||
local_cpu_stop();
|
||||
break;
|
||||
|
||||
|
@@ -19,6 +19,7 @@
|
||||
#include <trace/hooks/mpam.h>
|
||||
#include <trace/hooks/gic.h>
|
||||
#include <trace/hooks/wqlockup.h>
|
||||
#include <trace/hooks/debug.h>
|
||||
|
||||
/*
|
||||
* Export tracepoints that act as a bare tracehook (ie: have no trace event
|
||||
@@ -59,3 +60,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mpam_set);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_find_busiest_group);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_gic_resume);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_wq_lockup_pool);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ipi_stop);
|
||||
|
25
include/trace/hooks/debug.h
Normal file
25
include/trace/hooks/debug.h
Normal file
@@ -0,0 +1,25 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#undef TRACE_SYSTEM
|
||||
#define TRACE_SYSTEM debug
|
||||
|
||||
#define TRACE_INCLUDE_PATH trace/hooks
|
||||
|
||||
#if !defined(_TRACE_HOOK_DEBUG_H) || defined(TRACE_HEADER_MULTI_READ)
|
||||
#define _TRACE_HOOK_DEBUG_H
|
||||
|
||||
#include <linux/tracepoint.h>
|
||||
#include <trace/hooks/vendor_hooks.h>
|
||||
|
||||
#if defined(CONFIG_TRACEPOINTS) && defined(CONFIG_ANDROID_VENDOR_HOOKS)
|
||||
struct pt_regs;
|
||||
|
||||
DECLARE_HOOK(android_vh_ipi_stop,
|
||||
TP_PROTO(struct pt_regs *regs),
|
||||
TP_ARGS(regs))
|
||||
#else
|
||||
#define trace_android_vh_ipi_stop(regs)
|
||||
#endif
|
||||
|
||||
#endif /* _TRACE_HOOK_DEBUG_H */
|
||||
/* This part must be outside protection */
|
||||
#include <trace/define_trace.h>
|
Reference in New Issue
Block a user