Re: [PATCH v3 6/7] arm64: entry: centralize premeption decision

From: Mark Rutland
Date: Thu Feb 10 2022 - 04:19:37 EST


On Wed, Feb 09, 2022 at 06:10:52PM +0000, Catalin Marinas wrote:
> On Wed, Feb 09, 2022 at 03:35:34PM +0000, Mark Rutland wrote:
> > For historical reasons, the decision of whether or not to preempt is
> > spread across arm64_preempt_schedule_irq() and __el1_irq(), and it would
> > be clearer if this were all in one place.
> >
> > Also, arm64_preempt_schedule_irq() calls lockdep_assert_irqs_disabled(),
> > but this is redundant, as we have a subsequent identical assertion in
> > __exit_to_kernel_mode(), and preempt_schedule_irq() will
> > BUG_ON(!irqs_disabled()) anyway.
> >
> > This patch removes the redundant assertion and centralizes the
> > preemption decision making within arm64_preempt_schedule_irq().
> >
> > Other than the slight change to assertion behaviour, there should be no
> > functional change as a result of this patch.
> >
> > Signed-off-by: Mark Rutland <mark.rutland@xxxxxxx>
> > Cc: Catalin Marinas <catalin.marinas@xxxxxxx>
> > Cc: James Morse <james.morse@xxxxxxx>
> > Cc: Joey Gouly <joey.gouly@xxxxxxx>
> > Cc: Valentin Schneider <valentin.schneider@xxxxxxx>
> > Cc: Will Deacon <will@xxxxxxxxxx>
>
> I acked this patch in v2, has anything changed? Well, here it is again:

Sorry; I had meant to add your acks.

This patch is the same as in v2; the other patch has some minor changes as in
the cover letter (adding includes and always exposing a couple of function
prototypes).

> Acked-by: Catalin Marinas <catalin.marinas@xxxxxxx>

Thanks!

> BTW, you have a typo in the subject.

I'll go fix that now.

Mark.