]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/asm: Mark cr0 as clobbered in mftb()
authorOliver O'Halloran <oohall@gmail.com>
Thu, 6 Jul 2017 08:46:43 +0000 (18:46 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 11 Jul 2017 02:53:53 +0000 (12:53 +1000)
commitc450749ea7e3930d01795080530b358a8b689ebc
treedc297ddb52b2d7226da656e1d8a3d445985d9ce0
parentf155fb2f5ac2e14c089bff57e6958a356f6c77a5
powerpc/asm: Mark cr0 as clobbered in mftb()

The workaround for the CELL timebase bug does not correctly mark cr0 as
being clobbered. This means GCC doesn't know that the asm block changes cr0 and
might leave the result of an unrelated comparison in cr0 across the block, which
we then trash, leading to basically random behaviour.

Fixes: 41a9350a85ec ("[POWERPC] Cell timebase bug workaround")
Cc: stable@vger.kernel.org # v2.6.19+
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
[mpe: Tweak change log and flag for stable]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/reg.h