1*4882a593Smuzhiyun /* 2*4882a593Smuzhiyun * This file is subject to the terms and conditions of the GNU General Public 3*4882a593Smuzhiyun * License. See the file "COPYING" in the main directory of this archive 4*4882a593Smuzhiyun * for more details. 5*4882a593Smuzhiyun * 6*4882a593Smuzhiyun * Copyright (C) 2008 David Daney 7*4882a593Smuzhiyun */ 8*4882a593Smuzhiyun #ifndef _ASM_WATCH_H 9*4882a593Smuzhiyun #define _ASM_WATCH_H 10*4882a593Smuzhiyun 11*4882a593Smuzhiyun #include <linux/bitops.h> 12*4882a593Smuzhiyun 13*4882a593Smuzhiyun #include <asm/mipsregs.h> 14*4882a593Smuzhiyun 15*4882a593Smuzhiyun void mips_install_watch_registers(struct task_struct *t); 16*4882a593Smuzhiyun void mips_read_watch_registers(void); 17*4882a593Smuzhiyun void mips_clear_watch_registers(void); 18*4882a593Smuzhiyun void mips_probe_watch_registers(struct cpuinfo_mips *c); 19*4882a593Smuzhiyun 20*4882a593Smuzhiyun #ifdef CONFIG_HARDWARE_WATCHPOINTS 21*4882a593Smuzhiyun #define __restore_watch(task) do { \ 22*4882a593Smuzhiyun if (unlikely(test_bit(TIF_LOAD_WATCH, \ 23*4882a593Smuzhiyun &task_thread_info(task)->flags))) { \ 24*4882a593Smuzhiyun mips_install_watch_registers(task); \ 25*4882a593Smuzhiyun } \ 26*4882a593Smuzhiyun } while (0) 27*4882a593Smuzhiyun 28*4882a593Smuzhiyun #else 29*4882a593Smuzhiyun #define __restore_watch(task) do {} while (0) 30*4882a593Smuzhiyun #endif 31*4882a593Smuzhiyun 32*4882a593Smuzhiyun #endif /* _ASM_WATCH_H */ 33