Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1302713

Re: [PATCH 1/2] arm64: entry: remove pointless SPSR mode check

From Catalin Marinas <catalin.marinas@arm.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/2] arm64: entry: remove pointless SPSR mode check
Date 2016-01-06 13:20 +0100
Message-ID <qNVeh-YK-5@gated-at.bofh.it> (permalink)
References <qNDAK-5X5-7@gated-at.bofh.it> <qNDKr-61Z-31@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Jan 05, 2016 at 05:33:34PM +0000, Mark Rutland wrote:
> In work_pending  we may skip work if the stacked SPSR value represents
> anything other than an EL0 context. We then immediately invoke the
> kernel_exit 0 macro as part of ret_to_user, assuming a return to EL0.
> This is somewhat confusing.
> 
> We use work_pending as part of the ret_to_user/ret_fast_syscall state
> machine. We only use ret_fast_syscall in the return from an SVC issued
> from EL0. We use ret_to_user for return from EL0 exception handlers and
> also for return from ret_from_fork in the case the task was not a kernel
> thread (i.e. it is a user task).
> 
> Thus in all cases the stacked SPSR value must represent an EL0 context,
> and the check is redundant. This patch removes it, along with the now
> unused no_work_pending label.
> 
> Signed-off-by: Mark Rutland <mark.rutland@arm.com>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Chris Metcalf <cmetcalf@ezchip.com>
> Cc: Will Deacon <will.deacon@arm.com>

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v9 08/13] arch/arm64: adopt prepare_exit_to_usermode()  model from x86 Mark Rutland <mark.rutland@arm.com> - 2016-01-04 21:40 +0100
  Re: [PATCH v9 08/13] arch/arm64: adopt prepare_exit_to_usermode()  model from x86 Chris Metcalf <cmetcalf@ezchip.com> - 2016-01-04 22:10 +0100
    Re: [PATCH v9 08/13] arch/arm64: adopt prepare_exit_to_usermode()  model from x86 Mark Rutland <mark.rutland@arm.com> - 2016-01-05 18:30 +0100
      [PATCH 2/2] arm64: factor work_pending state machine to C Mark Rutland <mark.rutland@arm.com> - 2016-01-05 18:40 +0100
        Re: [PATCH 2/2] arm64: factor work_pending state machine to C Chris Metcalf <cmetcalf@ezchip.com> - 2016-01-05 20:00 +0100
        Re: [PATCH 2/2] arm64: factor work_pending state machine to C Catalin Marinas <catalin.marinas@arm.com> - 2016-01-06 13:40 +0100
          Re: [PATCH 2/2] arm64: factor work_pending state machine to C Mark Rutland <mark.rutland@arm.com> - 2016-01-06 13:50 +0100
        Re: [PATCH 2/2] arm64: factor work_pending state machine to C Mark Rutland <mark.rutland@arm.com> - 2016-01-06 14:50 +0100
          Re: [PATCH 2/2] arm64: factor work_pending state machine to C Catalin Marinas <catalin.marinas@arm.com> - 2016-01-06 15:20 +0100
      [PATCH 1/2] arm64: entry: remove pointless SPSR mode check Mark Rutland <mark.rutland@arm.com> - 2016-01-05 18:40 +0100
        Re: [PATCH 1/2] arm64: entry: remove pointless SPSR mode check Catalin Marinas <catalin.marinas@arm.com> - 2016-01-06 13:20 +0100
  Re: [PATCH v9 08/13] arch/arm64: adopt prepare_exit_to_usermode()  model from x86 Andy Lutomirski <luto@amacapital.net> - 2016-01-04 23:40 +0100
    Re: [PATCH v9 08/13] arch/arm64: adopt prepare_exit_to_usermode()  model from x86 Mark Rutland <mark.rutland@arm.com> - 2016-01-05 19:10 +0100

csiph-web