mbox series

[0/2] arm64: cleanup DAIF.D manipulation

Message ID 20240422113523.4070414-1-mark.rutland@arm.com (mailing list archive)
Headers show
Series arm64: cleanup DAIF.D manipulation | expand

Message

Mark Rutland April 22, 2024, 11:35 a.m. UTC
Hi,

These patches cleanup some historical manipulation of DAIF.D which is no
longer necessary. The main goal here is to remove the unnecessary
manipulation so that it's easier to rework DAIF manipulation in future
to handle other exception mask bits (e.g. PSTATE.{ALLINT,PM}). That's
necessary for supporting the architectural NMI, etc.

The first patch updates a stale comment, removing an already-stale
reference to a macro that'll be removed entirely in the second patch.

The second patch removes the unnecessary manipulation of DAIF.D. The
additional lines are all comments added to setup_arch() and
secondary_start_kernel() to explain the initial unmasking of DAIF bits.
The commit message explains the history of the manipulation, and why the
change is desirable and safe.

I've build-tested and boot-tested this locally atop v6.9-rc3.

Mark.

Mark Rutland (2):
  arm64: assembler: update stale comment for disable_step_tsk
  arm64: defer clearing DAIF.D

 arch/arm64/include/asm/assembler.h |  6 +-----
 arch/arm64/kernel/setup.c          | 11 +++++++++--
 arch/arm64/kernel/smp.c            |  7 +++++++
 arch/arm64/mm/proc.S               | 10 ----------
 4 files changed, 17 insertions(+), 17 deletions(-)

Comments

Will Deacon April 28, 2024, 8:59 a.m. UTC | #1
On Mon, 22 Apr 2024 12:35:21 +0100, Mark Rutland wrote:
> These patches cleanup some historical manipulation of DAIF.D which is no
> longer necessary. The main goal here is to remove the unnecessary
> manipulation so that it's easier to rework DAIF manipulation in future
> to handle other exception mask bits (e.g. PSTATE.{ALLINT,PM}). That's
> necessary for supporting the architectural NMI, etc.
> 
> The first patch updates a stale comment, removing an already-stale
> reference to a macro that'll be removed entirely in the second patch.
> 
> [...]

Applied to arm64 (for-next/misc), thanks!

[1/2] arm64: assembler: update stale comment for disable_step_tsk
      https://git.kernel.org/arm64/c/3a2d2ca42975
[2/2] arm64: defer clearing DAIF.D
      https://git.kernel.org/arm64/c/080297beccf7

Cheers,