linux-stable/arch/mips
Maciej W. Rozycki 148b9aba99
MIPS: memset: Fix CPU_DADDI_WORKAROUNDS `small_fixup' regression
Fix a commit 8a8158c85e ("MIPS: memset.S: EVA & fault support for
small_memset") regression and remove assembly warnings:

arch/mips/lib/memset.S: Assembler messages:
arch/mips/lib/memset.S:243: Warning: Macro instruction expanded into multiple instructions in a branch delay slot

triggering with the CPU_DADDI_WORKAROUNDS option set and this code:

	PTR_SUBU	a2, t1, a0
	jr		ra
	 PTR_ADDIU	a2, 1

This is because with that option in place the DADDIU instruction, which
the PTR_ADDIU CPP macro expands to, becomes a GAS macro, which in turn
expands to an LI/DADDU (or actually ADDIU/DADDU) sequence:

 13c:	01a4302f 	dsubu	a2,t1,a0
 140:	03e00008 	jr	ra
 144:	24010001 	li	at,1
 148:	00c1302d 	daddu	a2,a2,at
	...

Correct this by switching off the `noreorder' assembly mode and letting
GAS schedule this jump's delay slot, as there is nothing special about
it that would require manual scheduling.  With this change in place
correct code is produced:

 13c:	01a4302f 	dsubu	a2,t1,a0
 140:	24010001 	li	at,1
 144:	03e00008 	jr	ra
 148:	00c1302d 	daddu	a2,a2,at
	...

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Paul Burton <paul.burton@mips.com>
Fixes: 8a8158c85e ("MIPS: memset.S: EVA & fault support for small_memset")
Patchwork: https://patchwork.linux-mips.org/patch/20833/
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: stable@vger.kernel.org # 4.17+
2018-10-05 09:41:39 -07:00
..
alchemy mips: unify prom_putchar() declarations 2018-07-17 09:40:17 -07:00
ar7 mips: unify prom_putchar() declarations 2018-07-17 09:40:17 -07:00
ath25 mips: unify prom_putchar() declarations 2018-07-17 09:40:17 -07:00
ath79 Here are the main MIPS changes for 4.19. 2018-08-13 19:24:32 -07:00
bcm47xx Revert "MIPS: BCM47XX: Enable 74K Core ExternalSync for PCIe erratum" 2018-07-27 10:07:32 -07:00
bcm63xx mips: unify prom_putchar() declarations 2018-07-17 09:40:17 -07:00
bmips MIPS: bmips: remove unnecessary call to register "simple-bus" 2018-06-24 09:27:27 -07:00
boot kbuild: rename LDFLAGS to KBUILD_LDFLAGS 2018-08-24 08:22:08 +09:00
cavium-octeon Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2018-08-15 16:01:47 -07:00
cobalt
configs Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2018-08-15 15:04:25 -07:00
crypto MIPS: crypto: Add crc32 and crc32c hw accelerated module 2018-02-19 20:50:36 +00:00
dec MIPS: Convert update_persistent_clock() to update_persistent_clock64() 2018-05-14 23:58:23 +01:00
emma
fw mips: unify prom_putchar() declarations 2018-07-17 09:40:17 -07:00
generic MIPS: Remove obsolete MIPS checks for DST node "chosen@0" 2018-08-06 09:50:33 -07:00
include MIPS: VDSO: Always map near top of user memory 2018-09-28 12:09:00 -07:00
jazz MIPS: Make (UN)CAC_ADDR() PHYS_OFFSET-agnostic 2018-07-30 10:27:20 -07:00
jz4740 JFFS2 changes: 2018-08-14 10:57:44 -07:00
kernel MIPS: Fix CONFIG_CMDLINE handling 2018-09-28 12:09:04 -07:00
kvm KVM: Remove obsolete kvm_unmap_hva notifier backend 2018-09-07 15:06:02 +02:00
lantiq MIPS: lantiq: dma: add dev pointer 2018-09-11 23:33:19 -07:00
lasat kbuild: rename LDFLAGS to KBUILD_LDFLAGS 2018-08-24 08:22:08 +09:00
lib MIPS: memset: Fix CPU_DADDI_WORKAROUNDS `small_fixup' regression 2018-10-05 09:41:39 -07:00
loongson32 MIPS: Loongson: Merge load addresses 2018-07-30 18:59:01 -07:00
loongson64 MIPS: Loongson: Add Loongson-3A R3.1 basic support 2018-07-23 17:53:34 -07:00
math-emu MIPS: math-emu: Mark fall throughs in switch statements with a comment 2017-12-12 17:20:20 +01:00
mm A few MIPS fixes for 4.19: 2018-08-23 14:23:08 -07:00
mti-malta MIPS: Malta: Use PIIX4 poweroff driver to power down 2018-06-24 09:27:27 -07:00
net bpf, mips: remove unused function 2018-05-14 19:11:45 -07:00
netlogic mips: unify prom_putchar() declarations 2018-07-17 09:40:17 -07:00
oprofile MIPS: perf: More robustly probe for the presence of per-tc counters 2018-05-15 15:16:16 +01:00
paravirt mips: unify prom_putchar() declarations 2018-07-17 09:40:17 -07:00
pci Here are the main MIPS changes for 4.19. 2018-08-13 19:24:32 -07:00
pic32 mips: unify prom_putchar() declarations 2018-07-17 09:40:17 -07:00
pistachio License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pmcs-msp71xx License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pnx833x mtd: nand: Rename nand.h into rawnand.h 2017-08-13 10:11:49 +02:00
power License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ralink mips: unify prom_putchar() declarations 2018-07-17 09:40:17 -07:00
rb532 MIPS: RB532: Avoid undefined mac_pton without GENERIC_NET_UTILS 2018-01-10 16:39:03 +01:00
sgi-ip22 Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-11-13 17:56:58 -08:00
sgi-ip27 mips: unify prom_putchar() declarations 2018-07-17 09:40:17 -07:00
sgi-ip32 MIPS: IP32: use generic dma noncoherent ops 2018-06-24 09:27:27 -07:00
sibyte mips: unify prom_putchar() declarations 2018-07-17 09:40:17 -07:00
sni MIPS: sni: Remove the read_persistent_clock() 2018-05-14 23:58:25 +01:00
tools Update MIPS email addresses 2017-11-03 09:02:30 -07:00
txx9 JFFS2 changes: 2018-08-14 10:57:44 -07:00
vdso MIPS: VDSO: Force link endianness 2018-08-07 16:16:13 -07:00
vr41xx MIPS: Annotate cpu_wait implementations with __cpuidle 2018-06-28 14:18:54 -07:00
Kbuild MIPS: Disable Werror when W= is set 2017-04-10 11:56:07 +02:00
Kbuild.platforms MIPS: Xilfpga: Switch to using generic defconfigs 2017-11-08 22:54:14 +00:00
Kconfig A few MIPS fixes for 4.19: 2018-08-23 14:23:08 -07:00
Kconfig.debug Kconfig: consolidate the "Kernel hacking" menu 2018-08-02 08:06:48 +09:00
Makefile kbuild: rename LDFLAGS to KBUILD_LDFLAGS 2018-08-24 08:22:08 +09:00
Makefile.postlink License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00