]> Git Repo - linux.git/commitdiff
powerpc: Fix handling of alignment interrupt on dcbz instruction
authorPaul Mackerras <[email protected]>
Wed, 13 Sep 2017 04:51:24 +0000 (14:51 +1000)
committerMichael Ellerman <[email protected]>
Thu, 14 Sep 2017 22:41:18 +0000 (08:41 +1000)
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: 31bfdb036f12 ("powerpc: Use instruction emulation infrastructure to handle alignment faults")
Signed-off-by: Paul Mackerras <[email protected]>
Tested-by: Michal Sojka <[email protected]>
Tested-by: Christian Zigotzky <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
arch/powerpc/kernel/align.c

index 26b9994d27eef9c806b5c1f683f10325aff85d1c..43ef2515648098f985ff5f7d10a66b2f6d724391 100644 (file)
@@ -341,7 +341,7 @@ int fix_alignment(struct pt_regs *regs)
 
        type = op.type & INSTR_TYPE_MASK;
        if (!OP_IS_LOAD_STORE(type)) {
-               if (type != CACHEOP + DCBZ)
+               if (op.type != CACHEOP + DCBZ)
                        return -EINVAL;
                PPC_WARN_ALIGNMENT(dcbz, regs);
                r = emulate_dcbz(op.ea, regs);
This page took 0.051284 seconds and 4 git commands to generate.