arm64: factor insn read out of call_undef_hook()
authorMark Rutland <mark.rutland@arm.com>
Wed, 19 Oct 2022 14:41:18 +0000 (15:41 +0100)
committerWill Deacon <will@kernel.org>
Tue, 15 Nov 2022 13:46:18 +0000 (13:46 +0000)
commitdbfbd87efa79575491af0ba1a87bf567eaea6cae
treeac619dcf5414baf11ea7d1dd5036f492760cc082
parentbff8f413c71ffc3cb679dbd9a5632b33af563f9f
arm64: factor insn read out of call_undef_hook()

Subsequent patches will rework EL0 UNDEF handling, removing the need for
struct undef_hook and call_undef_hook. In preparation for those changes,
this patch factors the logic for reading user instructions out of
call_undef_hook() and into a new user_insn_read() helper, matching the
style of the existing aarch64_insn_read() helper used for reading kernel
instructions.

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

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Joey Gouly <joey.gouly@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20221019144123.612388-5-mark.rutland@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/traps.c