Commit 973e2e64 authored by Christophe Leroy's avatar Christophe Leroy Committed by Michael Ellerman

powerpc/interrupt: Remove struct interrupt_state

Since commit ceff77ef ("powerpc/64e/interrupt: Use new interrupt
context tracking scheme") struct interrupt_state has been empty and
unused.

Remove it.
Signed-off-by: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/1d862ce3eab3da6ca7ac47d4a78a18f154462511.1645806970.git.christophe.leroy@csgroup.eu
parent 607451ce
...@@ -123,9 +123,6 @@ static inline void nap_adjust_return(struct pt_regs *regs) ...@@ -123,9 +123,6 @@ static inline void nap_adjust_return(struct pt_regs *regs)
#endif #endif
} }
struct interrupt_state {
};
static inline void booke_restore_dbcr0(void) static inline void booke_restore_dbcr0(void)
{ {
#ifdef CONFIG_PPC_ADV_DEBUG_REGS #ifdef CONFIG_PPC_ADV_DEBUG_REGS
...@@ -138,7 +135,7 @@ static inline void booke_restore_dbcr0(void) ...@@ -138,7 +135,7 @@ static inline void booke_restore_dbcr0(void)
#endif #endif
} }
static inline void interrupt_enter_prepare(struct pt_regs *regs, struct interrupt_state *state) static inline void interrupt_enter_prepare(struct pt_regs *regs)
{ {
#ifdef CONFIG_PPC32 #ifdef CONFIG_PPC32
if (!arch_irq_disabled_regs(regs)) if (!arch_irq_disabled_regs(regs))
...@@ -228,17 +225,17 @@ static inline void interrupt_enter_prepare(struct pt_regs *regs, struct interrup ...@@ -228,17 +225,17 @@ static inline void interrupt_enter_prepare(struct pt_regs *regs, struct interrup
* However interrupt_nmi_exit_prepare does return directly to regs, because * However interrupt_nmi_exit_prepare does return directly to regs, because
* NMIs do not do "exit work" or replay soft-masked interrupts. * NMIs do not do "exit work" or replay soft-masked interrupts.
*/ */
static inline void interrupt_exit_prepare(struct pt_regs *regs, struct interrupt_state *state) static inline void interrupt_exit_prepare(struct pt_regs *regs)
{ {
} }
static inline void interrupt_async_enter_prepare(struct pt_regs *regs, struct interrupt_state *state) static inline void interrupt_async_enter_prepare(struct pt_regs *regs)
{ {
#ifdef CONFIG_PPC64 #ifdef CONFIG_PPC64
/* Ensure interrupt_enter_prepare does not enable MSR[EE] */ /* Ensure interrupt_enter_prepare does not enable MSR[EE] */
local_paca->irq_happened |= PACA_IRQ_HARD_DIS; local_paca->irq_happened |= PACA_IRQ_HARD_DIS;
#endif #endif
interrupt_enter_prepare(regs, state); interrupt_enter_prepare(regs);
#ifdef CONFIG_PPC_BOOK3S_64 #ifdef CONFIG_PPC_BOOK3S_64
/* /*
* RI=1 is set by interrupt_enter_prepare, so this thread flags access * RI=1 is set by interrupt_enter_prepare, so this thread flags access
...@@ -251,7 +248,7 @@ static inline void interrupt_async_enter_prepare(struct pt_regs *regs, struct in ...@@ -251,7 +248,7 @@ static inline void interrupt_async_enter_prepare(struct pt_regs *regs, struct in
irq_enter(); irq_enter();
} }
static inline void interrupt_async_exit_prepare(struct pt_regs *regs, struct interrupt_state *state) static inline void interrupt_async_exit_prepare(struct pt_regs *regs)
{ {
/* /*
* Adjust at exit so the main handler sees the true NIA. This must * Adjust at exit so the main handler sees the true NIA. This must
...@@ -262,7 +259,7 @@ static inline void interrupt_async_exit_prepare(struct pt_regs *regs, struct int ...@@ -262,7 +259,7 @@ static inline void interrupt_async_exit_prepare(struct pt_regs *regs, struct int
nap_adjust_return(regs); nap_adjust_return(regs);
irq_exit(); irq_exit();
interrupt_exit_prepare(regs, state); interrupt_exit_prepare(regs);
} }
struct interrupt_nmi_state { struct interrupt_nmi_state {
...@@ -447,13 +444,11 @@ static __always_inline void ____##func(struct pt_regs *regs); \ ...@@ -447,13 +444,11 @@ static __always_inline void ____##func(struct pt_regs *regs); \
\ \
interrupt_handler void func(struct pt_regs *regs) \ interrupt_handler void func(struct pt_regs *regs) \
{ \ { \
struct interrupt_state state; \ interrupt_enter_prepare(regs); \
\
interrupt_enter_prepare(regs, &state); \
\ \
____##func (regs); \ ____##func (regs); \
\ \
interrupt_exit_prepare(regs, &state); \ interrupt_exit_prepare(regs); \
} \ } \
NOKPROBE_SYMBOL(func); \ NOKPROBE_SYMBOL(func); \
\ \
...@@ -482,14 +477,13 @@ static __always_inline long ____##func(struct pt_regs *regs); \ ...@@ -482,14 +477,13 @@ static __always_inline long ____##func(struct pt_regs *regs); \
\ \
interrupt_handler long func(struct pt_regs *regs) \ interrupt_handler long func(struct pt_regs *regs) \
{ \ { \
struct interrupt_state state; \
long ret; \ long ret; \
\ \
interrupt_enter_prepare(regs, &state); \ interrupt_enter_prepare(regs); \
\ \
ret = ____##func (regs); \ ret = ____##func (regs); \
\ \
interrupt_exit_prepare(regs, &state); \ interrupt_exit_prepare(regs); \
\ \
return ret; \ return ret; \
} \ } \
...@@ -518,13 +512,11 @@ static __always_inline void ____##func(struct pt_regs *regs); \ ...@@ -518,13 +512,11 @@ static __always_inline void ____##func(struct pt_regs *regs); \
\ \
interrupt_handler void func(struct pt_regs *regs) \ interrupt_handler void func(struct pt_regs *regs) \
{ \ { \
struct interrupt_state state; \ interrupt_async_enter_prepare(regs); \
\
interrupt_async_enter_prepare(regs, &state); \
\ \
____##func (regs); \ ____##func (regs); \
\ \
interrupt_async_exit_prepare(regs, &state); \ interrupt_async_exit_prepare(regs); \
} \ } \
NOKPROBE_SYMBOL(func); \ NOKPROBE_SYMBOL(func); \
\ \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment