@@ -12,5 +12,7 @@ long syscall_enter_from_user_mode(struct pt_regs *regs, long);
void syscall_exit_to_user_mode(struct pt_regs *regs);
void irqentry_enter_from_user_mode(struct pt_regs *regs);
void irqentry_exit_to_user_mode(struct pt_regs *regs);
+void irqentry_enter_from_kernel_mode(struct pt_regs *regs);
+void irqentry_exit_to_kernel_mode(struct pt_regs *regs);
#endif /* __ASM_ENTRY_H__ */
@@ -204,6 +204,9 @@ ENDPROC(__und_invalid)
get_thread_info tsk
uaccess_entry tsk, r0, r1, r2, \uaccess
+ mov r0, sp @ 'regs'
+ bl irqentry_enter_from_kernel_mode
+
.if \trace
#ifdef CONFIG_TRACE_IRQFLAGS
bl trace_hardirqs_off
@@ -210,6 +210,7 @@
.else
@ IRQs off again before pulling preserved data off the stack
disable_irq_notrace
+
#ifdef CONFIG_TRACE_IRQFLAGS
tst \rpsr, #PSR_I_BIT
bleq trace_hardirqs_on
@@ -217,6 +218,10 @@
blne trace_hardirqs_off
#endif
.endif
+
+ mov r0, sp @ 'regs'
+ bl irqentry_exit_to_kernel_mode
+
uaccess_exit tsk, r0, r1
#ifndef CONFIG_THUMB2_KERNEL
@@ -56,3 +56,11 @@ noinstr void irqentry_exit_to_user_mode(struct pt_regs *regs)
/* This context tracking call has inverse naming */
user_enter_callable();
}
+
+noinstr void irqentry_enter_from_kernel_mode(struct pt_regs *regs)
+{
+}
+
+noinstr void irqentry_exit_to_kernel_mode(struct pt_regs *regs)
+{
+}
This adds a few calls to C when exceptions enter/exit from the kernel itself, so these can be used for generic entry. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> --- arch/arm/include/asm/entry.h | 2 ++ arch/arm/kernel/entry-armv.S | 3 +++ arch/arm/kernel/entry-header.S | 5 +++++ arch/arm/kernel/entry.c | 8 ++++++++ 4 files changed, 18 insertions(+)