cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

tracepoint.c (407B)


      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}