diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2021-01-30 23:08:39 +1000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2021-02-09 00:02:12 +1100 |
commit | e6f8a6c86ce7b2108c03c1cc014fdae278573df1 (patch) | |
tree | 919bb1ecde29bc1dadd7bf8578f81242e20cb8dc /arch/powerpc/mm/fault.c | |
parent | 3a96570ffceb15c6ed9cc6f990f172dcdc8ac279 (diff) | |
download | lwn-e6f8a6c86ce7b2108c03c1cc014fdae278573df1.tar.gz lwn-e6f8a6c86ce7b2108c03c1cc014fdae278573df1.zip |
powerpc: add interrupt_cond_local_irq_enable helper
Simple helper for synchronous interrupt handlers (i.e., process-context)
to enable interrupts if it was taken in an interrupts-enabled context.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210130130852.2952424-30-npiggin@gmail.com
Diffstat (limited to 'arch/powerpc/mm/fault.c')
-rw-r--r-- | arch/powerpc/mm/fault.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c index f8eb42aaafab..8552ab6c008b 100644 --- a/arch/powerpc/mm/fault.c +++ b/arch/powerpc/mm/fault.c @@ -434,9 +434,7 @@ static int __do_page_fault(struct pt_regs *regs, unsigned long address, return bad_area_nosemaphore(regs, address); } - /* We restore the interrupt state now */ - if (!arch_irq_disabled_regs(regs)) - local_irq_enable(); + interrupt_cond_local_irq_enable(regs); perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address); |