linux-stable/arch/mips
Arnd Bergmann 3bb58902fa mips: always link byteswap helpers into decompressor
[ Upstream commit cddc40f561 ]

My series to clean up the unaligned access implementation
across architectures caused some mips randconfig builds to
fail with:

   mips64-linux-ld: arch/mips/boot/compressed/decompress.o: in function `decompress_kernel':
   decompress.c:(.text.decompress_kernel+0x54): undefined reference to `__bswapsi2'

It turns out that this problem has already been fixed for the XZ
decompressor but now it also shows up in (at least) LZO and LZ4.  From my
analysis I concluded that the compiler could always have emitted those
calls, but the different implementation allowed it to make otherwise
better decisions about not inlining the byteswap, which results in the
link error when the out-of-line code is missing.

While it could be addressed by adding it to the two decompressor
implementations that are known to be affected, but as this only adds
112 bytes to the kernel, the safer choice is to always add them.

Fixes: c50ec67875 ("MIPS: zboot: Fix the build with XZ compression on older GCC versions")
Fixes: 0652035a57 ("asm-generic: unaligned: remove byteshift helpers")
Link: https://lore.kernel.org/linux-mm/202106301304.gz2wVY9w-lkp@intel.com/
Link: https://lore.kernel.org/linux-mm/202106260659.TyMe8mjr-lkp@intel.com/
Link: https://lore.kernel.org/linux-mm/202106172016.onWT6Tza-lkp@intel.com/
Link: https://lore.kernel.org/linux-mm/202105231743.JJcALnhS-lkp@intel.com/
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-07-20 16:17:55 +02:00
..
alchemy MIPS: alchemy: xxs1500: add gpio-au1000.h header file 2021-06-03 08:36:25 +02:00
ar7 MIPS: AR7: ensure the port type's FCR value is used 2018-01-23 19:58:21 +01:00
ath25 MIPS: ath25: Check for kzalloc allocation failure 2018-03-15 10:54:31 +01:00
ath79 Revert "MIPS: perf: ath79: Fix perfcount IRQ assignment" 2019-06-11 12:21:49 +02:00
bcm47xx MIPS: BCM47XX: fix kconfig dependency bug for BCM47XX_BCMA 2020-12-29 13:46:53 +01:00
bcm63xx MIPS: BCM63XX: drop unused and broken DSP platform device 2020-01-27 14:46:11 +01:00
bmips License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
boot mips: always link byteswap helpers into decompressor 2021-07-20 16:17:55 +02:00
cavium-octeon MIPS: OCTEON: add missing put_device() call in dwc3_octeon_device_init() 2020-08-21 09:48:10 +02:00
cobalt
configs MIPS: Loongson: Build ATI Radeon GPU driver as module 2020-06-20 10:25:07 +02:00
dec License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
emma
fw MIPS: fw: sni: Fix out of bounds init of o32 stack 2019-11-06 12:43:17 +01:00
generic MIPS: generic: Update node names to avoid unit addresses 2021-06-30 08:48:56 -04:00
include MIPS: add PMD table accounting into MIPS'pmd_alloc_one 2021-07-20 16:17:44 +02:00
jazz MIPS: jazz: fix 64bit build 2019-02-27 10:08:04 +01:00
jz4740 MIPS: lb60: Fix pin mappings 2019-07-31 07:28:47 +02:00
kernel MIPS: vmlinux.lds.S: add missing PAGE_ALIGNED_DATA() section 2021-03-03 18:22:36 +01:00
kvm KVM: MIPS: Change the definition of kvm type 2020-09-23 10:46:34 +02:00
lantiq MIPS: lantiq: Explicitly compare LTQ_EBU_PCC_ISTAT against 0 2021-03-03 18:22:41 +01:00
lasat License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
lib MIPS: Fix kernel hang under FUNCTION_GRAPH_TRACER and PREEMPT_TRACER 2021-06-16 11:53:01 +02:00
loongson32 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
loongson64 MIPS: Loongson: Fix potential NULL dereference in loongson3_platform_init() 2020-02-28 16:35:57 +01:00
math-emu MIPS: math-emu: Write-protect delay slot emulation pages 2019-01-09 17:14:51 +01:00
mm MIPS: c-r4k: Fix section mismatch for loongson2_sc_init 2021-03-03 18:22:41 +01:00
mti-malta Update MIPS email addresses 2017-11-03 09:02:30 -07:00
net bpf, mips: Limit to 33 tail calls 2020-01-12 12:11:54 +01:00
netlogic License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
oprofile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
paravirt License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pci MIPS: pci-legacy: stop using of_pci_range_to_resource 2021-05-22 10:57:33 +02:00
pic32 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pistachio MIPS: pistachio: Build uImage.gz by default 2019-06-11 12:21:49 +02: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: ralink: export rt_sysc_membase for rt2880_wdt.c 2021-06-03 08:36:25 +02:00
rb532 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sgi-ip22 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sgi-ip27 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sgi-ip32 MIPS: Add missing include files 2017-03-08 10:38:06 +01:00
sibyte Revert "MIPS: SiByte: Enable swiotlb for SWARM, LittleSur and BigSur" 2019-09-19 09:08:03 +02:00
sni MIPS: SNI: Fix spurious interrupts 2020-09-23 10:46:35 +02:00
tools Update MIPS email addresses 2017-11-03 09:02:30 -07:00
txx9 mips: txx9: fix iounmap related issue 2019-11-20 17:59:48 +01:00
vdso mips: Do not include hi and lo in clobber list for R6 2021-05-22 10:57:13 +02:00
vr41xx License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xilfpga License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kbuild MIPS: Disable Werror when W= is set 2017-04-10 11:56:07 +02:00
Kbuild.platforms
Kconfig MIPS: SNI: Fix MIPS_L1_CACHE_SHIFT 2020-09-23 10:46:35 +02:00
Kconfig.debug License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile MIPS: Truncate link address into 32bit for 32bit kernel 2020-06-20 10:25:11 +02:00
Makefile.postlink MIPS: fix indentation of the 'RELOCS' message 2020-02-14 16:32:09 -05:00