xref: /openbmc/linux/arch/x86/kernel/tracepoint.c (revision 6562c9ac)
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3  * Copyright (C) 2013 Seiji Aguchi <seiji.aguchi@hds.com>
4  */
5 #include <linux/jump_label.h>
6 #include <linux/atomic.h>
7 
8 #include <asm/trace/exceptions.h>
9 
10 DEFINE_STATIC_KEY_FALSE(trace_pagefault_key);
11 
12 int trace_pagefault_reg(void)
13 {
14 	static_branch_inc(&trace_pagefault_key);
15 	return 0;
16 }
17 
18 void trace_pagefault_unreg(void)
19 {
20 	static_branch_dec(&trace_pagefault_key);
21 }
22