blob: fcfc077afe2dcf86915a1e493bf8ff9048cb5235 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001// SPDX-License-Identifier: GPL-2.0
Seiji Aguchicf910e82013-06-20 11:46:53 -04002/*
3 * Code for supporting irq vector tracepoints.
4 *
5 * Copyright (C) 2013 Seiji Aguchi <seiji.aguchi@hds.com>
6 *
7 */
Thomas Gleixner2feb1b32017-08-28 08:47:21 +02008#include <linux/jump_label.h>
9#include <linux/atomic.h>
10
Seiji Aguchicf910e82013-06-20 11:46:53 -040011#include <asm/hw_irq.h>
12#include <asm/desc.h>
Yi Wang89f579c2018-11-22 10:04:09 +080013#include <asm/trace/exceptions.h>
Borislav Petkovad3bc252018-12-05 00:34:56 +010014#include <asm/trace/irq_vectors.h>
Seiji Aguchicf910e82013-06-20 11:46:53 -040015
Thomas Gleixner80954742017-08-28 08:47:33 +020016DEFINE_STATIC_KEY_FALSE(trace_pagefault_key);
Seiji Aguchicf910e82013-06-20 11:46:53 -040017
Thomas Gleixner80954742017-08-28 08:47:33 +020018int trace_pagefault_reg(void)
Seiji Aguchicf910e82013-06-20 11:46:53 -040019{
Thomas Gleixner80954742017-08-28 08:47:33 +020020 static_branch_inc(&trace_pagefault_key);
Steven Rostedt (Red Hat)8cf868a2016-11-28 13:03:21 -050021 return 0;
Seiji Aguchicf910e82013-06-20 11:46:53 -040022}
23
Thomas Gleixner80954742017-08-28 08:47:33 +020024void trace_pagefault_unreg(void)
Seiji Aguchicf910e82013-06-20 11:46:53 -040025{
Thomas Gleixner80954742017-08-28 08:47:33 +020026 static_branch_dec(&trace_pagefault_key);
Seiji Aguchicf910e82013-06-20 11:46:53 -040027}