]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
arm64: entry: move bad_mode() to entry-common.c
authorMark Rutland <mark.rutland@arm.com>
Mon, 7 Jun 2021 09:46:15 +0000 (10:46 +0100)
committerWill Deacon <will@kernel.org>
Mon, 7 Jun 2021 10:35:55 +0000 (11:35 +0100)
commitcbed5f8d3feb5ecc84c998b81db7e004b3fb2135
treef4c339a07356fbee51ab804b8d6bfb14eb55fb97
parentaf541cbbf9c646d2eaa8b3ee3836d5b16435e848
arm64: entry: move bad_mode() to entry-common.c

In subsequent patches we'll rework the way bad_mode() is called by
exception entry code. In preparation for this, let's move bad_mode()
itself into entry-common.c.

Let's also mark it as noinstr (e.g. to prevent it being kprobed), and
let's also make the `handler` array a local variable, as this is only
use by bad_mode(), and will be removed entirely in a subsequent patch.

There should be no functional change as a result of this patch.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Marc Zyngier <maz@kernel.org>
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-12-mark.rutland@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/entry-common.c
arch/arm64/kernel/traps.c