Provide functions which handle the low level entry and exit similiar to
enter/exit from user mode.
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>...
---
arch/x86/entry/common.c | 89 ++++++++++++++++++++++++++++++++++++++++
arch/x86/include/asm/idtentry.h | 3 +
2 files changed, 92 insertions(+)
--- a/arch/x86/entry/common.c
+++ b/arch/x86/entry/common.c
+/**
+ * idtentry_exit - Common code to handle return from exceptions
+ * @regs: Pointer to pt_regs (exception entry regs)
+ *
+ * Depending on the return target (kernel/user) this runs the necessary
+ * preemption and work checks if possible and reguired and returns to