OSDN Git Service

powerpc: Enable Prefixed Instructions
authorAlistair Popple <alistair@popple.id.au>
Wed, 6 May 2020 03:40:41 +0000 (13:40 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 18 May 2020 14:10:38 +0000 (00:10 +1000)
commit2aa6195e43b3740258ead93aee42ac719dd4c4b0
tree07ee5ab059b1b8f47ce98a1bbde1b801ea8f671b
parent0b582db5490a1f250ef63337dd46d5c7599dae80
powerpc: Enable Prefixed Instructions

Prefix instructions have their own FSCR bit which needs to enabled via
a CPU feature. The kernel will save the FSCR for problem state but it
needs to be enabled initially.

If prefixed instructions are made unavailable by the [H]FSCR, attempting
to use them will cause a facility unavailable exception. Add "PREFIX" to
the facility_strings[].

Currently there are no prefixed instructions that are actually emulated
by emulate_instruction() within facility_unavailable_exception().
However, when caused by a prefixed instructions the SRR1 PREFIXED bit is
set. Prepare for dealing with emulated prefixed instructions by checking
for this bit.

Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Jordan Niethe <jniethe5@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Link: https://lore.kernel.org/r/20200506034050.24806-22-jniethe5@gmail.com
arch/powerpc/include/asm/reg.h
arch/powerpc/kernel/traps.c