diff options
Diffstat (limited to 'arch/mips/include/asm/cop2.h')
-rw-r--r-- | arch/mips/include/asm/cop2.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/mips/include/asm/cop2.h b/arch/mips/include/asm/cop2.h index 6b04c98b7fad..2cb2f0c2c4f8 100644 --- a/arch/mips/include/asm/cop2.h +++ b/arch/mips/include/asm/cop2.h | |||
@@ -9,6 +9,8 @@ | |||
9 | #ifndef __ASM_COP2_H | 9 | #ifndef __ASM_COP2_H |
10 | #define __ASM_COP2_H | 10 | #define __ASM_COP2_H |
11 | 11 | ||
12 | #include <linux/notifier.h> | ||
13 | |||
12 | enum cu2_ops { | 14 | enum cu2_ops { |
13 | CU2_EXCEPTION, | 15 | CU2_EXCEPTION, |
14 | CU2_LWC2_OP, | 16 | CU2_LWC2_OP, |
@@ -20,4 +22,14 @@ enum cu2_ops { | |||
20 | extern int register_cu2_notifier(struct notifier_block *nb); | 22 | extern int register_cu2_notifier(struct notifier_block *nb); |
21 | extern int cu2_notifier_call_chain(unsigned long val, void *v); | 23 | extern int cu2_notifier_call_chain(unsigned long val, void *v); |
22 | 24 | ||
25 | #define cu2_notifier(fn, pri) \ | ||
26 | ({ \ | ||
27 | static struct notifier_block fn##_nb __cpuinitdata = { \ | ||
28 | .notifier_call = fn, \ | ||
29 | .priority = pri \ | ||
30 | }; \ | ||
31 | \ | ||
32 | register_cu2_notifier(&fn##_nb); \ | ||
33 | }) | ||
34 | |||
23 | #endif /* __ASM_COP2_H */ | 35 | #endif /* __ASM_COP2_H */ |