aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/include/asm/cop2.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2010-08-05 08:25:59 -0400
committerRalf Baechle <ralf@linux-mips.org>2010-08-05 08:25:59 -0400
commit4483b159168d3db41458925512523e44d0d49cd4 (patch)
tree9f03be0279218b7eebf6e339d3c81940df74ea87 /arch/mips/include/asm/cop2.h
parentea7a8463be6b5dd824bdf42b8f2af1d34f157877 (diff)
MIPS: Provide more elevant interface cu2_notifier for CP2 extensions.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: David Daney <ddaney@caviumnetworks.com> Patchwork: https://patchwork.linux-mips.org/patch/1504/
Diffstat (limited to 'arch/mips/include/asm/cop2.h')
-rw-r--r--arch/mips/include/asm/cop2.h12
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
12enum cu2_ops { 14enum cu2_ops {
13 CU2_EXCEPTION, 15 CU2_EXCEPTION,
14 CU2_LWC2_OP, 16 CU2_LWC2_OP,
@@ -20,4 +22,14 @@ enum cu2_ops {
20extern int register_cu2_notifier(struct notifier_block *nb); 22extern int register_cu2_notifier(struct notifier_block *nb);
21extern int cu2_notifier_call_chain(unsigned long val, void *v); 23extern 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 */