1 /* 2 * Code for supporting irq vector tracepoints. 3 * 4 * Copyright (C) 2013 Seiji Aguchi <seiji.aguchi@hds.com> 5 * 6 */ 7 #include <linux/jump_label.h> 8 #include <linux/atomic.h> 9 10 #include <asm/hw_irq.h> 11 #include <asm/desc.h> 12 13 DEFINE_STATIC_KEY_FALSE(trace_pagefault_key); 14 15 int trace_pagefault_reg(void) 16 { 17 static_branch_inc(&trace_pagefault_key); 18 return 0; 19 } 20 21 void trace_pagefault_unreg(void) 22 { 23 static_branch_dec(&trace_pagefault_key); 24 } 25 26 #ifdef CONFIG_SMP 27 28 DEFINE_STATIC_KEY_FALSE(trace_resched_ipi_key); 29 30 int trace_resched_ipi_reg(void) 31 { 32 static_branch_inc(&trace_resched_ipi_key); 33 return 0; 34 } 35 36 void trace_resched_ipi_unreg(void) 37 { 38 static_branch_dec(&trace_resched_ipi_key); 39 } 40 41 #endif 42