aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/include/asm/interrupt.h
diff options
context:
space:
mode:
authorNicholas Piggin <[email protected]>2021-01-30 23:08:42 +1000
committerMichael Ellerman <[email protected]>2021-02-09 00:10:46 +1100
commit540d4d34bef4ec58aba12b159030492616d6f54e (patch)
tree27d877d754c926b45a0b8f9297c27ef39852a9b1 /arch/powerpc/include/asm/interrupt.h
parenta008f8f9fd67ffb13d906ef4ea6235a3d62dfdb6 (diff)
powerpc/64: context tracking move to interrupt wrappers
This moves exception_enter/exit calls to wrapper functions for synchronous interrupts. More interrupt handlers are covered by this than previously. Signed-off-by: Nicholas Piggin <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'arch/powerpc/include/asm/interrupt.h')
-rw-r--r--arch/powerpc/include/asm/interrupt.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/interrupt.h b/arch/powerpc/include/asm/interrupt.h
index 488bdd5bd922..e65ce3e2b071 100644
--- a/arch/powerpc/include/asm/interrupt.h
+++ b/arch/powerpc/include/asm/interrupt.h
@@ -7,10 +7,16 @@
#include <asm/ftrace.h>
struct interrupt_state {
+#ifdef CONFIG_PPC64
+ enum ctx_state ctx_state;
+#endif
};
static inline void interrupt_enter_prepare(struct pt_regs *regs, struct interrupt_state *state)
{
+#ifdef CONFIG_PPC64
+ state->ctx_state = exception_enter();
+#endif
}
/*
@@ -29,6 +35,9 @@ static inline void interrupt_enter_prepare(struct pt_regs *regs, struct interrup
*/
static inline void interrupt_exit_prepare(struct pt_regs *regs, struct interrupt_state *state)
{
+#ifdef CONFIG_PPC64
+ exception_exit(state->ctx_state);
+#endif
}
static inline void interrupt_async_enter_prepare(struct pt_regs *regs, struct interrupt_state *state)