Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
Seiji Aguchi | cf910e8 | 2013-06-20 11:46:53 -0400 | [diff] [blame] | 2 | /* |
3 | * Code for supporting irq vector tracepoints. | ||||
4 | * | ||||
5 | * Copyright (C) 2013 Seiji Aguchi <seiji.aguchi@hds.com> | ||||
6 | * | ||||
7 | */ | ||||
Thomas Gleixner | 2feb1b3 | 2017-08-28 08:47:21 +0200 | [diff] [blame] | 8 | #include <linux/jump_label.h> |
9 | #include <linux/atomic.h> | ||||
10 | |||||
Seiji Aguchi | cf910e8 | 2013-06-20 11:46:53 -0400 | [diff] [blame] | 11 | #include <asm/hw_irq.h> |
12 | #include <asm/desc.h> | ||||
Yi Wang | 89f579c | 2018-11-22 10:04:09 +0800 | [diff] [blame] | 13 | #include <asm/trace/exceptions.h> |
Borislav Petkov | ad3bc25 | 2018-12-05 00:34:56 +0100 | [diff] [blame] | 14 | #include <asm/trace/irq_vectors.h> |
Seiji Aguchi | cf910e8 | 2013-06-20 11:46:53 -0400 | [diff] [blame] | 15 | |
Thomas Gleixner | 8095474 | 2017-08-28 08:47:33 +0200 | [diff] [blame] | 16 | DEFINE_STATIC_KEY_FALSE(trace_pagefault_key); |
Seiji Aguchi | cf910e8 | 2013-06-20 11:46:53 -0400 | [diff] [blame] | 17 | |
Thomas Gleixner | 8095474 | 2017-08-28 08:47:33 +0200 | [diff] [blame] | 18 | int trace_pagefault_reg(void) |
Seiji Aguchi | cf910e8 | 2013-06-20 11:46:53 -0400 | [diff] [blame] | 19 | { |
Thomas Gleixner | 8095474 | 2017-08-28 08:47:33 +0200 | [diff] [blame] | 20 | static_branch_inc(&trace_pagefault_key); |
Steven Rostedt (Red Hat) | 8cf868a | 2016-11-28 13:03:21 -0500 | [diff] [blame] | 21 | return 0; |
Seiji Aguchi | cf910e8 | 2013-06-20 11:46:53 -0400 | [diff] [blame] | 22 | } |
23 | |||||
Thomas Gleixner | 8095474 | 2017-08-28 08:47:33 +0200 | [diff] [blame] | 24 | void trace_pagefault_unreg(void) |
Seiji Aguchi | cf910e8 | 2013-06-20 11:46:53 -0400 | [diff] [blame] | 25 | { |
Thomas Gleixner | 8095474 | 2017-08-28 08:47:33 +0200 | [diff] [blame] | 26 | static_branch_dec(&trace_pagefault_key); |
Seiji Aguchi | cf910e8 | 2013-06-20 11:46:53 -0400 | [diff] [blame] | 27 | } |