Path: blob/master/arch/xtensa/include/asm/hw_breakpoint.h
26442 views
/*1* Xtensa hardware breakpoints/watchpoints handling functions2*3* This file is subject to the terms and conditions of the GNU General Public4* License. See the file "COPYING" in the main directory of this archive5* for more details.6*7* Copyright (C) 2016 Cadence Design Systems Inc.8*/910#ifndef __ASM_XTENSA_HW_BREAKPOINT_H11#define __ASM_XTENSA_HW_BREAKPOINT_H1213#ifdef CONFIG_HAVE_HW_BREAKPOINT1415#include <linux/kdebug.h>16#include <linux/types.h>17#include <uapi/linux/hw_breakpoint.h>1819/* Breakpoint */20#define XTENSA_BREAKPOINT_EXECUTE 02122/* Watchpoints */23#define XTENSA_BREAKPOINT_LOAD 124#define XTENSA_BREAKPOINT_STORE 22526struct arch_hw_breakpoint {27unsigned long address;28u16 len;29u16 type;30};3132struct perf_event_attr;33struct perf_event;34struct pt_regs;35struct task_struct;3637int hw_breakpoint_slots(int type);38int arch_check_bp_in_kernelspace(struct arch_hw_breakpoint *hw);39int hw_breakpoint_arch_parse(struct perf_event *bp,40const struct perf_event_attr *attr,41struct arch_hw_breakpoint *hw);42int hw_breakpoint_exceptions_notify(struct notifier_block *unused,43unsigned long val, void *data);4445int arch_install_hw_breakpoint(struct perf_event *bp);46void arch_uninstall_hw_breakpoint(struct perf_event *bp);47void hw_breakpoint_pmu_read(struct perf_event *bp);48int check_hw_breakpoint(struct pt_regs *regs);49void clear_ptrace_hw_breakpoint(struct task_struct *tsk);50void restore_dbreak(void);5152#else5354struct task_struct;5556static inline void clear_ptrace_hw_breakpoint(struct task_struct *tsk)57{58}5960#endif /* CONFIG_HAVE_HW_BREAKPOINT */61#endif /* __ASM_XTENSA_HW_BREAKPOINT_H */626364