1 // SPDX-License-Identifier: GPL-2.0 2 /* 3 * Copyright (C) 2022 Changbin Du <changbin.du@gmail.com> 4 */ 5 6 #include <linux/irqflags.h> 7 #include <linux/kprobes.h> 8 #include "trace_irq.h" 9 10 /* 11 * trace_hardirqs_on/off require the caller to setup frame pointer properly. 12 * Otherwise, CALLER_ADDR1 might trigger an pagging exception in kernel. 13 * Here we add one extra level so they can be safely called by low 14 * level entry code which $fp is used for other purpose. 15 */ 16 __trace_hardirqs_on(void)17void __trace_hardirqs_on(void) 18 { 19 trace_hardirqs_on(); 20 } 21 NOKPROBE_SYMBOL(__trace_hardirqs_on); 22 __trace_hardirqs_off(void)23void __trace_hardirqs_off(void) 24 { 25 trace_hardirqs_off(); 26 } 27 NOKPROBE_SYMBOL(__trace_hardirqs_off); 28