~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/sh/include/asm/hw_breakpoint.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #ifndef __ASM_SH_HW_BREAKPOINT_H
  3 #define __ASM_SH_HW_BREAKPOINT_H
  4 
  5 #include <uapi/asm/hw_breakpoint.h>
  6 
  7 #define __ARCH_HW_BREAKPOINT_H
  8 
  9 #include <linux/kdebug.h>
 10 #include <linux/types.h>
 11 
 12 struct arch_hw_breakpoint {
 13         unsigned long   address;
 14         u16             len;
 15         u16             type;
 16 };
 17 
 18 enum {
 19         SH_BREAKPOINT_READ      = (1 << 1),
 20         SH_BREAKPOINT_WRITE     = (1 << 2),
 21         SH_BREAKPOINT_RW        = SH_BREAKPOINT_READ | SH_BREAKPOINT_WRITE,
 22 
 23         SH_BREAKPOINT_LEN_1     = (1 << 12),
 24         SH_BREAKPOINT_LEN_2     = (1 << 13),
 25         SH_BREAKPOINT_LEN_4     = SH_BREAKPOINT_LEN_1 | SH_BREAKPOINT_LEN_2,
 26         SH_BREAKPOINT_LEN_8     = (1 << 14),
 27 };
 28 
 29 struct sh_ubc {
 30         const char      *name;
 31         unsigned int    num_events;
 32         unsigned int    trap_nr;
 33         void            (*enable)(struct arch_hw_breakpoint *, int);
 34         void            (*disable)(struct arch_hw_breakpoint *, int);
 35         void            (*enable_all)(unsigned long);
 36         void            (*disable_all)(void);
 37         unsigned long   (*active_mask)(void);
 38         unsigned long   (*triggered_mask)(void);
 39         void            (*clear_triggered_mask)(unsigned long);
 40         struct clk      *clk;   /* optional interface clock / MSTP bit */
 41 };
 42 
 43 struct perf_event_attr;
 44 struct perf_event;
 45 struct task_struct;
 46 struct pmu;
 47 
 48 /* Maximum number of UBC channels */
 49 #define HBP_NUM         2
 50 
 51 #define hw_breakpoint_slots(type) (HBP_NUM)
 52 
 53 /* arch/sh/kernel/hw_breakpoint.c */
 54 extern int arch_check_bp_in_kernelspace(struct arch_hw_breakpoint *hw);
 55 extern int arch_bp_generic_fields(int sh_len, int sh_type, int *gen_len,
 56                                   int *gen_type);
 57 extern int hw_breakpoint_arch_parse(struct perf_event *bp,
 58                                     const struct perf_event_attr *attr,
 59                                     struct arch_hw_breakpoint *hw);
 60 extern int hw_breakpoint_exceptions_notify(struct notifier_block *unused,
 61                                            unsigned long val, void *data);
 62 
 63 int arch_install_hw_breakpoint(struct perf_event *bp);
 64 void arch_uninstall_hw_breakpoint(struct perf_event *bp);
 65 void hw_breakpoint_pmu_read(struct perf_event *bp);
 66 
 67 extern void arch_fill_perf_breakpoint(struct perf_event *bp);
 68 extern int register_sh_ubc(struct sh_ubc *);
 69 
 70 extern struct pmu perf_ops_bp;
 71 
 72 #endif /* __ASM_SH_HW_BREAKPOINT_H */
 73 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php