]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: mvebu: Fix the operand list in the inline asm of armada_370_xp_pmsu_idle_enter
authorGregory CLEMENT <gregory.clement@free-electrons.com>
Fri, 4 Jul 2014 14:22:16 +0000 (16:22 +0200)
committerJason Cooper <jason@lakedaemon.net>
Tue, 8 Jul 2014 12:25:39 +0000 (12:25 +0000)
commitf8bc40b39ecb951918f8a1a6cb168d4d06cfb547
treef037c11f9c4d6cc4f284cda160af916014d9d312
parentbfe6c23be95faacdf2eef2f162ee62ef863f7503
ARM: mvebu: Fix the operand list in the inline asm of armada_370_xp_pmsu_idle_enter

In the inline asm part of the function armada_370_xp_pmsu_idle_enter()
the input operand was used. The intent here was to let the compiler
choose this register so it could do the optimization it
needed.

However an input operand is not supposed to be modified by the inline
asm code. This can lead to improper generated instructions.

In some case generated instruction the compiler made the choice to
reuse the same register to store the return value. But in the assembly
part this register was modified, so it can lead to return an wrong
value.

The fix is to use a clobber. Thanks to this the compiler will know
that the value of this register will be modified.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Link: https://lkml.kernel.org/r/1404483736-16938-1-git-send-email-gregory.clement@free-electrons.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
arch/arm/mach-mvebu/pmsu.c