csky: Fixup do_page_fault parent irq status

We must succeed parent's context irq status in page fault handler.

Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
This commit is contained in:
Guo Ren 2020-12-28 15:11:26 +00:00
parent 06f3f76441
commit 0f7e8efab2
2 changed files with 5 additions and 1 deletions

View File

@ -42,7 +42,7 @@ ENTRY(csky_pagefault)
SAVE_ALL 0
zero_fp
context_tracking
psrset ee, ie
psrset ee
mov a0, sp
jbsr do_page_fault
jmpi ret_from_exception

View File

@ -143,6 +143,10 @@ asmlinkage void do_page_fault(struct pt_regs *regs)
return;
}
/* Enable interrupts if they were enabled in the parent context. */
if (likely(regs->sr & BIT(6)))
local_irq_enable();
/*
* If we're in an interrupt or have no user
* context, we must not take the fault..