Commit 31bfdb03 authored by Paul Mackerras's avatar Paul Mackerras Committed by Michael Ellerman

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: default avatarPaul Mackerras <paulus@ozlabs.org>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent a53d5182
...@@ -367,10 +367,6 @@ config PPC_ADV_DEBUG_DAC_RANGE ...@@ -367,10 +367,6 @@ config PPC_ADV_DEBUG_DAC_RANGE
depends on PPC_ADV_DEBUG_REGS && 44x depends on PPC_ADV_DEBUG_REGS && 44x
default y default y
config PPC_EMULATE_SSTEP
bool
default y if KPROBES || UPROBES || XMON || HAVE_HW_BREAKPOINT
config ZONE_DMA32 config ZONE_DMA32
bool bool
default y if PPC64 default y if PPC64
......
This diff is collapsed.
...@@ -31,8 +31,8 @@ obj64-$(CONFIG_KPROBES_SANITY_TEST) += test_emulate_step.o ...@@ -31,8 +31,8 @@ obj64-$(CONFIG_KPROBES_SANITY_TEST) += test_emulate_step.o
obj-y += checksum_$(BITS).o checksum_wrappers.o obj-y += checksum_$(BITS).o checksum_wrappers.o
obj-$(CONFIG_PPC_EMULATE_SSTEP) += sstep.o ldstfp.o obj-y += sstep.o ldstfp.o quad.o
obj64-$(CONFIG_PPC_EMULATE_SSTEP) += quad.o obj64-y += quad.o
obj-$(CONFIG_PPC_LIB_RHEAP) += rheap.o obj-$(CONFIG_PPC_LIB_RHEAP) += rheap.o
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment