From 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Mon, 13 May 2024 10:30:14 +0000
Subject: [PATCH] modify sin led gpio

---
 kernel/include/linux/trace_events.h |   79 ++++-----------------------------------
 1 files changed, 9 insertions(+), 70 deletions(-)

diff --git a/kernel/include/linux/trace_events.h b/kernel/include/linux/trace_events.h
index 3b3c9de..113b42a 100644
--- a/kernel/include/linux/trace_events.h
+++ b/kernel/include/linux/trace_events.h
@@ -67,8 +67,6 @@
 	unsigned char		flags;
 	unsigned char		preempt_count;
 	int			pid;
-	unsigned char		migrate_disable;
-	unsigned char		preempt_lazy_count;
 };
 
 #define TRACE_EVENT_TYPE_MAX						\
@@ -150,78 +148,17 @@
 
 enum print_line_t trace_handle_return(struct trace_seq *s);
 
-static inline void tracing_generic_entry_update(struct trace_entry *entry,
-						unsigned short type,
-						unsigned int trace_ctx)
-{
-	entry->preempt_count		= trace_ctx & 0xff;
-	entry->migrate_disable		= (trace_ctx >> 8) & 0xff;
-	entry->preempt_lazy_count	= (trace_ctx >> 16) & 0xff;
-	entry->pid			= current->pid;
-	entry->type			= type;
-	entry->flags			= trace_ctx >> 24;
-}
-
-unsigned int tracing_gen_ctx_irq_test(unsigned int irqs_status);
-
-enum trace_flag_type {
-	TRACE_FLAG_IRQS_OFF		= 0x01,
-	TRACE_FLAG_IRQS_NOSUPPORT	= 0x02,
-	TRACE_FLAG_NEED_RESCHED		= 0x04,
-	TRACE_FLAG_HARDIRQ		= 0x08,
-	TRACE_FLAG_SOFTIRQ		= 0x10,
-	TRACE_FLAG_PREEMPT_RESCHED	= 0x20,
-	TRACE_FLAG_NMI			= 0x40,
-	TRACE_FLAG_NEED_RESCHED_LAZY	= 0x80,
-};
-
-#ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT
-static inline unsigned int tracing_gen_ctx_flags(unsigned long irqflags)
-{
-	unsigned int irq_status = irqs_disabled_flags(irqflags) ?
-		TRACE_FLAG_IRQS_OFF : 0;
-	return tracing_gen_ctx_irq_test(irq_status);
-}
-static inline unsigned int tracing_gen_ctx(void)
-{
-	unsigned long irqflags;
-
-	local_save_flags(irqflags);
-	return tracing_gen_ctx_flags(irqflags);
-}
-#else
-
-static inline unsigned int tracing_gen_ctx_flags(unsigned long irqflags)
-{
-	return tracing_gen_ctx_irq_test(TRACE_FLAG_IRQS_NOSUPPORT);
-}
-static inline unsigned int tracing_gen_ctx(void)
-{
-	return tracing_gen_ctx_irq_test(TRACE_FLAG_IRQS_NOSUPPORT);
-}
-#endif
-
-static inline unsigned int tracing_gen_ctx_dec(void)
-{
-	unsigned int trace_ctx;
-
-	trace_ctx = tracing_gen_ctx();
-	/*
-	 * Subtract one from the preeption counter if preemption is enabled,
-	 * see trace_event_buffer_reserve()for details.
-	 */
-	if (IS_ENABLED(CONFIG_PREEMPTION))
-		trace_ctx--;
-	return trace_ctx;
-}
-
+void tracing_generic_entry_update(struct trace_entry *entry,
+				  unsigned short type,
+				  unsigned long flags,
+				  int pc);
 struct trace_event_file;
 
 struct ring_buffer_event *
 trace_event_buffer_lock_reserve(struct trace_buffer **current_buffer,
 				struct trace_event_file *trace_file,
 				int type, unsigned long len,
-				unsigned int trace_ctx);
+				unsigned long flags, int pc);
 
 #define TRACE_RECORD_CMDLINE	BIT(0)
 #define TRACE_RECORD_TGID	BIT(1)
@@ -295,7 +232,8 @@
 	struct ring_buffer_event	*event;
 	struct trace_event_file		*trace_file;
 	void				*entry;
-	unsigned int			trace_ctx;
+	unsigned long			flags;
+	int				pc;
 	struct pt_regs			*regs;
 };
 
@@ -803,7 +741,8 @@
 extern void perf_uprobe_destroy(struct perf_event *event);
 extern int bpf_get_uprobe_info(const struct perf_event *event,
 			       u32 *fd_type, const char **filename,
-			       u64 *probe_offset, bool perf_type_tracepoint);
+			       u64 *probe_offset, u64 *probe_addr,
+			       bool perf_type_tracepoint);
 #endif
 extern int  ftrace_profile_set_filter(struct perf_event *event, int event_id,
 				     char *filter_str);

--
Gitblit v1.6.2