[PATCH] arm64: mm: remove the redundant code

Catalin Marinas catalin.marinas at arm.com
Mon Apr 18 06:08:20 PDT 2016


On Mon, Apr 18, 2016 at 09:49:56AM +0800, Huang Shijie wrote:
> We already re-enable interrupts where necessary in the entry code, so
> there is no need to do it again in do_page fault. This patch removes
> the redundant code.
> 
> Signed-off-by: Huang Shijie <shijie.huang at arm.com>
> ---
>  arch/arm64/mm/fault.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c
> index 95df28b..bdc193c 100644
> --- a/arch/arm64/mm/fault.c
> +++ b/arch/arm64/mm/fault.c
> @@ -212,10 +212,6 @@ static int __kprobes do_page_fault(unsigned long addr, unsigned int esr,
>  	tsk = current;
>  	mm  = tsk->mm;
>  
> -	/* Enable interrupts if they were enabled in the parent context. */
> -	if (interrupts_enabled(regs))
> -		local_irq_enable();

We indeed don't have to re-enable interrupts here as they have been
enabled by the calling code in entry.S. But have you run this with
CONFIG_TRACE_IRQFLAGS enabled? I don't think there is any issue, just a
sanity check.

-- 
Catalin



More information about the linux-arm-kernel mailing list