]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Use instruction emulation infrastructure to handle alignment faults
authorPaul Mackerras <paulus@ozlabs.org>
Wed, 30 Aug 2017 04:12:40 +0000 (14:12 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 1 Sep 2017 06:42:43 +0000 (16:42 +1000)
commit052da8f5d23804f923f2179502237fb9975655a4
tree5935c607203c770ec8d8a16811f528cdacdf9dfd
parent8769f5367223751a68999be963a12d343c5209eb
powerpc: Use instruction emulation infrastructure to handle alignment faults

This replaces almost all of the instruction emulation code in
fix_alignment() with calls to analyse_instr(), emulate_loadstore()
and emulate_dcbz().  The only emulation code left is the SPE
emulation code; analyse_instr() etc. do not handle SPE instructions
at present.

One result of this is that we can now handle alignment faults on
all the new VSX load and store instructions that were added in POWER9.
VSX loads/stores will take alignment faults for unaligned accesses
to cache-inhibited memory.

Another effect is that we no longer rely on the DAR and DSISR values
set by the processor.

With this, we now need to include the instruction emulation code
unconditionally.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/Kconfig
arch/powerpc/kernel/align.c
arch/powerpc/lib/Makefile