]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Fix emulation of mcrf in emulate_step()
authorAnton Blanchard <anton@samba.org>
Wed, 14 Jun 2017 23:46:38 +0000 (09:46 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 12 Jul 2017 06:43:32 +0000 (16:43 +1000)
commit8b7b3146e1b719d57ea6b6a7eb873ae262e278e7
tree39a0c1ba916b7d78bd6cf7ae74106e15795807de
parenta0ae31f5eb9a19a7de162425ebf7420f1d7b8ee8
powerpc: Fix emulation of mcrf in emulate_step()

The mcrf emulation code was using the CR field number directly as the shift
value, without taking into account that CR fields are numbered from 0-7 starting
at the high bits. That meant it was looking at the CR fields in the reverse
order.

Fixes: 0f25a42aff24 ("powerpc: Emulate icbi, mcrf and conditional-trap instructions")
Cc: stable@vger.kernel.org # v3.18+
Signed-off-by: Anton Blanchard <anton@samba.org>
Acked-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/lib/sstep.c