Ralf Baechle | 69f3a7d | 2009-11-24 01:24:58 +0000 | [diff] [blame] | 1 | /* |
| 2 | * This file is subject to the terms and conditions of the GNU General Public |
| 3 | * License. See the file "COPYING" in the main directory of this archive |
| 4 | * for more details. |
| 5 | * |
| 6 | * Copyright (C) 2009 Wind River Systems, |
| 7 | * written by Ralf Baechle <ralf@linux-mips.org> |
| 8 | */ |
| 9 | #ifndef __ASM_COP2_H |
| 10 | #define __ASM_COP2_H |
| 11 | |
Ralf Baechle | 4483b15 | 2010-08-05 13:25:59 +0100 | [diff] [blame] | 12 | #include <linux/notifier.h> |
| 13 | |
Ralf Baechle | 69f3a7d | 2009-11-24 01:24:58 +0000 | [diff] [blame] | 14 | enum cu2_ops { |
| 15 | CU2_EXCEPTION, |
| 16 | CU2_LWC2_OP, |
| 17 | CU2_LDC2_OP, |
| 18 | CU2_SWC2_OP, |
| 19 | CU2_SDC2_OP, |
| 20 | }; |
| 21 | |
| 22 | extern int register_cu2_notifier(struct notifier_block *nb); |
| 23 | extern int cu2_notifier_call_chain(unsigned long val, void *v); |
| 24 | |
Ralf Baechle | 4483b15 | 2010-08-05 13:25:59 +0100 | [diff] [blame] | 25 | #define cu2_notifier(fn, pri) \ |
| 26 | ({ \ |
David Daney | 4c7106c | 2010-09-23 11:23:29 -0700 | [diff] [blame] | 27 | static struct notifier_block fn##_nb = { \ |
Ralf Baechle | 4483b15 | 2010-08-05 13:25:59 +0100 | [diff] [blame] | 28 | .notifier_call = fn, \ |
| 29 | .priority = pri \ |
| 30 | }; \ |
| 31 | \ |
| 32 | register_cu2_notifier(&fn##_nb); \ |
| 33 | }) |
| 34 | |
Ralf Baechle | 69f3a7d | 2009-11-24 01:24:58 +0000 | [diff] [blame] | 35 | #endif /* __ASM_COP2_H */ |