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