Commit 1bc944ce authored by Paul Mackerras's avatar Paul Mackerras Committed by Michael Ellerman

powerpc: Fix handling of alignment interrupt on dcbz instruction

This fixes the emulation of the dcbz instruction in the alignment
interrupt handler.  The error was that we were comparing just the
instruction type field of op.type rather than the whole thing,
and therefore the comparison "type != CACHEOP + DCBZ" was always
true.

Fixes: 31bfdb03 ("powerpc: Use instruction emulation infrastructure to handle alignment faults")
Signed-off-by: default avatarPaul Mackerras <paulus@ozlabs.org>
Tested-by: default avatarMichal Sojka <sojkam1@fel.cvut.cz>
Tested-by: default avatarChristian Zigotzky <chzigotzky@xenosoft.de>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent bac65d9d
...@@ -341,7 +341,7 @@ int fix_alignment(struct pt_regs *regs) ...@@ -341,7 +341,7 @@ int fix_alignment(struct pt_regs *regs)
type = op.type & INSTR_TYPE_MASK; type = op.type & INSTR_TYPE_MASK;
if (!OP_IS_LOAD_STORE(type)) { if (!OP_IS_LOAD_STORE(type)) {
if (type != CACHEOP + DCBZ) if (op.type != CACHEOP + DCBZ)
return -EINVAL; return -EINVAL;
PPC_WARN_ALIGNMENT(dcbz, regs); PPC_WARN_ALIGNMENT(dcbz, regs);
r = emulate_dcbz(op.ea, regs); r = emulate_dcbz(op.ea, regs);
......
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