Skip to content
Commit fe2ac0b2 authored by Dave Martin's avatar Dave Martin
Browse files

arm64: traps: Fix inconsistent faulting instruction skipping



Correct skipping of an instruction on AArch32 works a bit
differently from AArch64, mainly due to the different CPSR/PSTATE
semantics.

There have been various attempts to get this right.  Currenty
arm64_skip_faulting_instruction() mostly does the right thing, but
does not advance the IT state machine for the AArch32 case.

arm64_compat_skip_faulting_instruction() handles the IT state
machine but is local to traps.c, and porting other code to use it
will make a mess since there are some call sites that apply for
both the compat and native cases.

Since manual instruction skipping implies a trap, it's a relatively
slow path.

So, make arm64_skip_faulting_instruction() handle both compat and
native, and get rid of the arm64_compat_skip_faulting_instruction()
special case.

Fixes: 32a3e635 ("arm64: compat: Add CNTFRQ trap handler")
Fixes: 1f1c0140 ("arm64: compat: Add condition code checks and IT advance")
Fixes: 6436beee ("arm64: Fix single stepping in kernel traps")
Fixes: bd35a4ad ("arm64: Port SWP/SWPB emulation support from arm")
Signed-off-by: default avatarDave Martin <Dave.Martin@arm.com>
parent 4b84760d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment