linux/arch/mips
Arnd Bergmann 3f2bedabb6 futex: Ensure futex_atomic_cmpxchg_inatomic() is present
The boot-time detection of futex_atomic_cmpxchg_inatomic() has a bug on
some 32-bit arm builds, and Thomas Gleixner suggested that setting
CONFIG_HAVE_FUTEX_CMPXCHG would avoid the problem, as it is always present
anyway.

Looking into which other architectures could do the same showed that almost
all architectures have it, the exceptions being:

 - some old 32-bit MIPS uniprocessor cores without ll/sc
 - one xtensa variant with no SMP
 - 32-bit SPARC when built for SMP

Fix MIPS And Xtensa by rearranging the generic code to let it be used
as a fallback.

For SPARC, the SMP definition just ends up turning off futex anyway, so
this can be done at Kconfig time instead. Note that sparc32 glibc requires
the CASA instruction for its mutexes anyway, which is only available when
running on SPARCv9 or LEON CPUs, but needs to be implemented in the sparc32
kernel for those.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Max Filippov <jcmvbkbc@gmail.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Rich Felker <dalias@libc.org>
Link: https://lore.kernel.org/r/20211026100432.1730393-1-arnd@kernel.org
2021-11-25 00:02:28 +01:00
..
alchemy MIPS: Fix fall-through warnings for Clang 2021-10-13 14:47:42 -05:00
ar7 mips: ar7: convert to CONFIG_COMMON_CLK 2021-06-08 17:00:09 +02:00
ath25 mips: Bulk conversion to generic_handle_domain_irq() 2021-08-12 11:39:40 +01:00
ath79 MIPS: of: Introduce helper function to get DTB 2021-02-04 13:34:51 +01:00
bcm47xx MIPS: Remove empty prom_free_prom_memory functions 2021-01-07 17:11:33 +01:00
bcm63xx MIPS: BCM63XX: Use BUG_ON instead of condition followed by BUG. 2021-04-26 10:23:52 +02:00
bmips MIPS: bmips: include <linux/dma-direct.h> for phys_to_dma 2021-03-06 08:43:40 +01:00
boot Devicetree fixes for v5.16, take 1: 2021-11-14 11:11:51 -08:00
cavium-octeon - added printing of CPU options for /proc/cpuinfo 2021-11-05 08:13:19 -07:00
cobalt MIPS: Remove empty prom_free_prom_memory functions 2021-01-07 17:11:33 +01:00
configs MIPS: Update bmips_stb_defconfig 2021-11-09 16:08:24 +01:00
crypto asm-generic: unaligned always use struct helpers 2021-05-10 17:50:47 +02:00
dec MIPS: Allow modules to set board_be_handler 2021-11-09 16:07:26 +01:00
fw MIPS: Remove empty prom_free_prom_memory functions 2021-01-07 17:11:33 +01:00
generic MIPS: ingenic: Unconditionally enable clock of CPU #0 2021-08-29 13:31:02 +02:00
include futex: Ensure futex_atomic_cmpxchg_inatomic() is present 2021-11-25 00:02:28 +01:00
ingenic MIPS: Kconfig: ingenic: Ensure MACH_INGENIC_GENERIC selects all SoCs 2021-06-01 11:44:47 +02:00
jazz MIPS/jazzdma: return error code from jazz_dma_map_sg() 2021-08-09 17:13:05 +02:00
kernel - Config updates for BMIPS platform 2021-11-13 09:11:33 -08:00
kvm - added printing of CPU options for /proc/cpuinfo 2021-11-05 08:13:19 -07:00
lantiq MIPS: lantiq: dma: make the burst length configurable by the drivers 2021-09-15 11:02:01 +01:00
lib arch: remove compat_alloc_user_space 2021-09-08 15:32:35 -07:00
loongson2ef MIPS: loongson2ef: don't build serial.o unconditionally 2021-08-05 10:58:21 +02:00
loongson32 MIPS: Remove empty prom_free_prom_memory functions 2021-01-07 17:11:33 +01:00
loongson64 Merge branch 'akpm' (patches from Andrew) 2021-11-06 14:08:17 -07:00
math-emu
mm Merge branch 'akpm' (patches from Andrew) 2021-11-06 14:08:17 -07:00
mti-malta - converted Pistachio platform to use MIPS generic kernel 2021-09-03 11:11:54 -07:00
n64 mips: Add N64 machine type 2021-01-22 11:40:00 +01:00
net bpf, mips: Fix comment on tail call count limiting 2021-10-11 15:29:38 +02:00
pci - added printing of CPU options for /proc/cpuinfo 2021-11-05 08:13:19 -07:00
pic32 clkdev: remove CONFIG_CLKDEV_LOOKUP 2021-06-08 17:00:09 +02:00
power
ralink PCI: mt7621: Add MediaTek MT7621 PCIe host controller driver 2021-10-21 10:59:18 -05:00
rb532 arch: remove spurious blkdev.h includes 2021-10-18 06:17:01 -06:00
sgi-ip22 MIPS: Allow modules to set board_be_handler 2021-11-09 16:07:26 +01:00
sgi-ip27 - Config updates for BMIPS platform 2021-11-13 09:11:33 -08:00
sgi-ip30 memblock: rename memblock_free to memblock_phys_free 2021-11-06 13:30:41 -07:00
sgi-ip32 MIPS: Allow modules to set board_be_handler 2021-11-09 16:07:26 +01:00
sibyte - Config updates for BMIPS platform 2021-11-13 09:11:33 -08:00
sni MIPS: sni: Fix the build 2021-10-18 18:09:54 +02:00
tools
txx9 MIPS: Allow modules to set board_be_handler 2021-11-09 16:07:26 +01:00
vdso MIPS: VDSO: remove -nostdlib compiler flag 2021-11-09 16:09:37 +01:00
vr41xx MIPS: Remove empty prom_free_prom_memory functions 2021-01-07 17:11:33 +01:00
Kbuild kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00
Kbuild.platforms MIPS: fix duplicated slashes for Platform file path 2021-11-09 16:11:52 +01:00
Kconfig - Config updates for BMIPS platform 2021-11-13 09:11:33 -08:00
Kconfig.debug tracing: Refactor TRACE_IRQFLAGS_SUPPORT in Kconfig 2021-08-16 11:37:21 -04:00
Makefile - Config updates for BMIPS platform 2021-11-13 09:11:33 -08:00
Makefile.postlink