]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/linux/interrupt.h
arch, ftrace: for KASAN put hard/soft IRQ entries into separate sections
[karo-tx-linux.git] / include / linux / interrupt.h
index 358076eda364ec929d5a5181c4c37663e4d78c40..9fcabeb07787b75cef51e3c9118754b29ff41e03 100644 (file)
@@ -683,4 +683,24 @@ extern int early_irq_init(void);
 extern int arch_probe_nr_irqs(void);
 extern int arch_early_irq_init(void);
 
+#if defined(CONFIG_FUNCTION_GRAPH_TRACER) || defined(CONFIG_KASAN)
+/*
+ * We want to know which function is an entrypoint of a hardirq or a softirq.
+ */
+#define __irq_entry             __attribute__((__section__(".irqentry.text")))
+#define __softirq_entry  \
+       __attribute__((__section__(".softirqentry.text")))
+
+/* Limits of hardirq entrypoints */
+extern char __irqentry_text_start[];
+extern char __irqentry_text_end[];
+/* Limits of softirq entrypoints */
+extern char __softirqentry_text_start[];
+extern char __softirqentry_text_end[];
+
+#else
+#define __irq_entry
+#define __softirq_entry
+#endif
+
 #endif