[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d7b5db35-0906-4ac2-d51e-905790020eaf@arm.com>
Date: Fri, 1 Feb 2019 08:46:23 +0000
From: Julien Thierry <julien.thierry@....com>
To: Valentin Schneider <valentin.schneider@....com>,
linux-kernel@...r.kernel.org
Cc: Will Deacon <will.deacon@....com>,
Catalin Marinas <catalin.marinas@....com>,
Mark Rutland <mark.rutland@....com>,
Marc Zyngier <marc.zyngier@....com>,
Julien Grall <julien.grall@....com>,
Thomas Gleixner <tglx@...utronix.de>,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [RFC PATCH 1/3] arm64: entry: Remove unneeded need_resched() loop
Hi Valentin,
On 31/01/2019 18:23, Valentin Schneider wrote:
> Since the enabling and disabling of IRQs within preempt_schedule_irq()
> is contained in a need_resched() loop, we don't need the outer arch
> code loop.
>
> Reported-by: Julien Thierry <julien.thierry@....com>
> Reported-by: Will Deacon <will.deacon@....com>
> Signed-off-by: Valentin Schneider <valentin.schneider@....com>
> Cc: Catalin Marinas <catalin.marinas@....com>
> Cc: Will Deacon <will.deacon@....com>
> Cc: Mark Rutland <mark.rutland@....com>
> Cc: Marc Zyngier <marc.zyngier@....com>
> Cc: Julien Grall <julien.grall@....com>
> Cc: Julien Thierry <julien.thierry@....com>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Cc: linux-arm-kernel@...ts.infradead.org
Reviewed-by: Julien Thierry <julien.thierry@....com>
> ---
> arch/arm64/kernel/entry.S | 11 +----------
> 1 file changed, 1 insertion(+), 10 deletions(-)
>
> diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S
> index 0ec0c46b2c0c..4d0c81f29a60 100644
> --- a/arch/arm64/kernel/entry.S
> +++ b/arch/arm64/kernel/entry.S
> @@ -611,7 +611,7 @@ el1_irq:
> #ifdef CONFIG_PREEMPT
> ldr x24, [tsk, #TSK_TI_PREEMPT] // get preempt count
> cbnz x24, 1f // preempt count != 0
> - bl el1_preempt
> + bl preempt_schedule_irq // irq en/disable is done inside
> 1:
> #endif
> #ifdef CONFIG_TRACE_IRQFLAGS
> @@ -620,15 +620,6 @@ el1_irq:
> kernel_exit 1
> ENDPROC(el1_irq)
>
> -#ifdef CONFIG_PREEMPT
> -el1_preempt:
> - mov x24, lr
> -1: bl preempt_schedule_irq // irq en/disable is done inside
> - ldr x0, [tsk, #TSK_TI_FLAGS] // get new tasks TI_FLAGS
> - tbnz x0, #TIF_NEED_RESCHED, 1b // needs rescheduling?
> - ret x24
> -#endif
> -
> /*
> * EL0 mode handlers.
> */
>
--
Julien Thierry
Powered by blists - more mailing lists