From 0debba581a928e1c834633cd5882cddda51dc1c5 Mon Sep 17 00:00:00 2001 From: s00442234 Date: Fri, 6 May 2022 10:50:24 +0800 Subject: [PATCH] add platform trace event Signed-off-by: s00442234 --- .../hi3516dv300_patch/hi3516dv300.patch | 50 ++++++++++++++++--- 1 file changed, 43 insertions(+), 7 deletions(-) diff --git a/linux-5.10/hi3516dv300_patch/hi3516dv300.patch b/linux-5.10/hi3516dv300_patch/hi3516dv300.patch index 075d7e9..a6e265c 100755 --- a/linux-5.10/hi3516dv300_patch/hi3516dv300.patch +++ b/linux-5.10/hi3516dv300_patch/hi3516dv300.patch @@ -11456,7 +11456,7 @@ index 000000000..a73be20b1 + diff --git a/arch/arm/mach-hibvt/system_adapter.c b/arch/arm/mach-hibvt/system_adapter.c new file mode 100644 -index 000000000..58fe574b3 +index 000000000..393b1296b --- /dev/null +++ b/arch/arm/mach-hibvt/system_adapter.c @@ -0,0 +1,340 @@ @@ -11802,7 +11802,7 @@ index 000000000..58fe574b3 +MODULE_AUTHOR("OHOS hi3516dv300"); diff --git a/arch/arm/mach-hibvt/system_adapter_by_memory.c b/arch/arm/mach-hibvt/system_adapter_by_memory.c new file mode 100644 -index 000000000..92a680a9e +index 000000000..880573c84 --- /dev/null +++ b/arch/arm/mach-hibvt/system_adapter_by_memory.c @@ -0,0 +1,339 @@ @@ -12370,10 +12370,10 @@ index ecc494918..46d604b46 100644 +obj-$(CONFIG_ARCH_HISI_BVT) += hisilicon/ +obj-$(CONFIG_HI_VDMA_V100) += hi_vdmav100/ diff --git a/drivers/android/binder.c b/drivers/android/binder.c -index 3604f0df6..2108d6686 100644 +index c058fe7dc..f3c932258 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c -@@ -2966,7 +2966,7 @@ static void binder_transaction(struct binder_proc *proc, +@@ -2969,7 +2969,7 @@ static void binder_transaction(struct binder_proc *proc, return_error = BR_FAILED_REPLY; return_error_param = -EINVAL; return_error_line = __LINE__; @@ -55693,7 +55693,7 @@ index 000000000..7425e0eb9 + return 0; +} diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c -index 8bec0cbf8..db79eab52 100644 +index a98079990..7eabc9ddc 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c @@ -705,8 +705,7 @@ static int bos_desc(struct usb_composite_dev *cdev) @@ -59286,6 +59286,42 @@ index d6a41841b..de3232ee5 100644 /* debugfs stuff */ extern struct dentry *usb_debug_root; +diff --git a/include/trace/events/platform_trace_event.h b/include/trace/events/platform_trace_event.h +new file mode 100644 +index 000000000..23a87130e +--- /dev/null ++++ b/include/trace/events/platform_trace_event.h +@@ -0,0 +1,30 @@ ++/* SPDX-License-Identifier: GPL-2.0-or-later */ ++#undef TRACE_SYSTEM ++#define TRACE_SYSTEM platform_trace_event ++ ++#if !defined(_TRACE_PLATFORM_TRACE_EVENT_H) || defined(TRACE_HEADER_MULTI_READ) ++#define _TRACE_PLATFORM_TRACE_EVENT_H ++ ++#include ++ ++TRACE_EVENT(platfrom_trace_record_messages, ++ TP_PROTO( ++ const char *buf ++ ), ++ ++ TP_ARGS(buf), ++ ++ TP_STRUCT__entry( ++ __string(msg, buf) ++ ), ++ ++ TP_fast_assign( ++ __assign_str(msg, buf) ++ ), ++ ++ TP_printk("platform trace info msg='%s'", __get_str(msg)) ++); ++#endif /* _TRACE_PLATFORM_TRACE_EVENT_H */ ++ ++/* This part must be outside protection */ ++#include diff --git a/include/uapi/linux/i2c-dev.h b/include/uapi/linux/i2c-dev.h index 85f8047af..3f50287f3 100644 --- a/include/uapi/linux/i2c-dev.h @@ -59506,7 +59542,7 @@ index 63cdf49f7..4263c0bb3 100644 * These use large bootmem allocations and must precede * kmem_cache_init() diff --git a/kernel/cpu.c b/kernel/cpu.c -index 67c22941b..dfbd3887e 100644 +index d33629370..e2d5ef5d7 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -331,6 +331,19 @@ void lockdep_assert_cpus_held(void) @@ -59969,4 +60005,4 @@ index 6fad54c7e..9d1302bb8 100755 + ################################################################################ # Tests on route add and replace - + -- Gitee