16aa3524cSDavid Daney /* 26aa3524cSDavid Daney * This file is subject to the terms and conditions of the GNU General Public 36aa3524cSDavid Daney * License. See the file "COPYING" in the main directory of this archive 46aa3524cSDavid Daney * for more details. 56aa3524cSDavid Daney * 66aa3524cSDavid Daney * Copyright (C) 2008 David Daney 76aa3524cSDavid Daney */ 86aa3524cSDavid Daney #ifndef _ASM_WATCH_H 96aa3524cSDavid Daney #define _ASM_WATCH_H 106aa3524cSDavid Daney 116aa3524cSDavid Daney #include <linux/bitops.h> 126aa3524cSDavid Daney 136aa3524cSDavid Daney #include <asm/mipsregs.h> 146aa3524cSDavid Daney 15*a7e89326SJames Hogan void mips_install_watch_registers(struct task_struct *t); 166aa3524cSDavid Daney void mips_read_watch_registers(void); 176aa3524cSDavid Daney void mips_clear_watch_registers(void); 186aa3524cSDavid Daney void mips_probe_watch_registers(struct cpuinfo_mips *c); 196aa3524cSDavid Daney 206aa3524cSDavid Daney #ifdef CONFIG_HARDWARE_WATCHPOINTS 21*a7e89326SJames Hogan #define __restore_watch(task) do { \ 226aa3524cSDavid Daney if (unlikely(test_bit(TIF_LOAD_WATCH, \ 23*a7e89326SJames Hogan &task_thread_info(task)->flags))) { \ 24*a7e89326SJames Hogan mips_install_watch_registers(task); \ 256aa3524cSDavid Daney } \ 266aa3524cSDavid Daney } while (0) 276aa3524cSDavid Daney 286aa3524cSDavid Daney #else 29*a7e89326SJames Hogan #define __restore_watch(task) do {} while (0) 306aa3524cSDavid Daney #endif 316aa3524cSDavid Daney 326aa3524cSDavid Daney #endif /* _ASM_WATCH_H */ 33