Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/52xx: Fix an invalid ASM expression ('addi' used instead of 'add')

AS arch/powerpc/platforms/52xx/lite5200_sleep.o
arch/powerpc/platforms/52xx/lite5200_sleep.S: Assembler messages:
arch/powerpc/platforms/52xx/lite5200_sleep.S:184: Warning: invalid register expression

In the following code, 'addi' is wrong, has to be 'add'

/* local udelay in sram is needed */
udelay: /* r11 - tb_ticks_per_usec, r12 - usecs, overwrites r13 */
mullw r12, r12, r11
mftb r13 /* start */
addi r12, r13, r12 /* end */

Fixes: ee983079ce04 ("[POWERPC] MPC5200 low power mode")
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/cb4cec9131c8577803367f1699209a7e104cec2a.1619025821.git.christophe.leroy@csgroup.eu

authored by

Christophe Leroy and committed by
Michael Ellerman
8a87a507 0f197ddc

+1 -1
+1 -1
arch/powerpc/platforms/52xx/lite5200_sleep.S
··· 181 181 udelay: /* r11 - tb_ticks_per_usec, r12 - usecs, overwrites r13 */ 182 182 mullw r12, r12, r11 183 183 mftb r13 /* start */ 184 - addi r12, r13, r12 /* end */ 184 + add r12, r13, r12 /* end */ 185 185 1: 186 186 mftb r13 /* current */ 187 187 cmp cr0, r13, r12