Skip to content

Commit

Permalink
arm64: remove redundant local_daif_mask() in bad_mode()
Browse files Browse the repository at this point in the history
Upon taking an exception, the CPU sets all the DAIF bits. We never
clear any of these bits prior to calling bad_mode(), and bad_mode()
itself never clears any of these bits, so there's no need to call
local_daif_mask().

This patch removes the redundant call.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Marc Zyngier <maz@kernel.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Joey Gouly <joey.gouly@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20210607094624.34689-2-mark.rutland@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
  • Loading branch information
Mark Rutland authored and Will Deacon committed Jun 7, 2021
1 parent c468154 commit 382dcdd
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion arch/arm64/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,6 @@ asmlinkage void notrace bad_mode(struct pt_regs *regs, int reason, unsigned int
esr_get_class_string(esr));

__show_regs(regs);
local_daif_mask();
panic("bad mode");
}

Expand Down

0 comments on commit 382dcdd

Please sign in to comment.