kernel_optimize_test/arch/mips/lib
Maciej W. Rozycki 2db4bc3418 MIPS: __delay CPU_DADDI_WORKAROUNDS bug fix
With CPU_DADDI_WORKAROUNDS enabled __delay assembles with a macro in a
branch delay slot:

{standard input}: Assembler messages:
{standard input}:18: Warning: Macro instruction expanded into multiple
instructions in a branch delay slot

and broken code results:

0000000000000000 <__delay>:
   0:	1480ffff 	bnez	a0,0 <__delay>
   4:	24010001 	li	at,1
   8:	0081202f 	dsubu	a0,a0,at
   c:	03e00008 	jr	ra
  10:	00000000 	nop
  14:	00000000 	nop

Consequently the function loops indefinitely, showing up prominently as a
hang in the delay loop calibration at bootstrap.

This change corrects the problem by forcing the immediate 1 into a
register while keeping code produced identical where CPU_DADDI_WORKAROUNDS
is disabled.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/6669/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2014-05-13 00:29:36 +02:00
..
ashldi3.c [MIPS] Fix optimization for size build. 2006-06-19 17:39:16 +01:00
ashrdi3.c [MIPS] Fix optimization for size build. 2006-06-19 17:39:16 +01:00
bitops.c MIPS: Remove unneeded volatile from arch/mips/lib/bitops.c 2013-05-08 01:19:06 +02:00
cmpdi2.c [MIPS] Add __cmpdi2 2007-08-27 02:17:00 +01:00
csum_partial.S MIPS: lib: csum_partial: Add EVA support 2014-03-26 23:09:17 +01:00
delay.c MIPS: __delay CPU_DADDI_WORKAROUNDS bug fix 2014-05-13 00:29:36 +02:00
dump_tlb.c Revert "MIPS: Allow ASID size to be determined at boot time." 2013-05-16 20:35:42 +02:00
iomap-pci.c mips: use the the PCI controller's io_map_base 2012-01-31 23:20:30 +02:00
iomap.c PCI: Cleanup the includes of <linux/pci.h> 2007-05-02 19:02:35 -07:00
libgcc.h MIPS: libgcc.h: Checkpatch cleanup 2010-04-12 17:26:15 +01:00
lshrdi3.c [MIPS] Fix optimization for size build. 2006-06-19 17:39:16 +01:00
Makefile MIPS: Make irqflags.h functions preempt-safe for non-mipsr2 cpus 2012-11-09 10:59:21 +01:00
memcpy.S MIPS: lib: memcpy: Add EVA support 2014-03-26 23:09:14 +01:00
memset.S MIPS: lib: memset: Add EVA support for the __bzero function. 2014-03-26 23:09:15 +01:00
mips-atomic.c MIPS: Get rid of the use of .macro in C code. 2013-04-11 15:39:51 +02:00
r3k_dump_tlb.c Revert "MIPS: Allow ASID size to be determined at boot time." 2013-05-16 20:35:42 +02:00
strlen_user.S MIPS: lib: strlen_user: Add EVA support 2014-03-26 23:09:13 +01:00
strncpy_user.S MIPS: lib: strncpy_user: Add EVA support 2014-03-26 23:09:14 +01:00
strnlen_user.S MIPS: lib: strnlen_user: Add EVA support 2014-03-26 23:09:13 +01:00
ucmpdi2.c [MIPS] Export __ucmpdi2 to modules. 2008-03-12 14:14:41 +00:00
uncached.c mips: delete non-required instances of include <linux/init.h> 2014-01-24 22:39:56 +01:00