aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-arm/traps.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-arm/traps.h')
-rw-r--r--include/asm-arm/traps.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/asm-arm/traps.h b/include/asm-arm/traps.h
index d4f34dc83eb0..f1541afcf85c 100644
--- a/include/asm-arm/traps.h
+++ b/include/asm-arm/traps.h
@@ -15,4 +15,13 @@ struct undef_hook {
void register_undef_hook(struct undef_hook *hook);
void unregister_undef_hook(struct undef_hook *hook);
+static inline int in_exception_text(unsigned long ptr)
+{
+ extern char __exception_text_start[];
+ extern char __exception_text_end[];
+
+ return ptr >= (unsigned long)&__exception_text_start &&
+ ptr < (unsigned long)&__exception_text_end;
+}
+
#endif