linux-mainline/arch/sparc
Arnd Bergmann ec7633de40 sparc: mark __arch_xchg() as __always_inline
An otherwise correct change to the atomic operations uncovered an
existing bug in the sparc __arch_xchg() function, which is calls
__xchg_called_with_bad_pointer() when its arguments are unknown at
compile time:

ERROR: modpost: "__xchg_called_with_bad_pointer" [lib/atomic64_test.ko] undefined!

This now happens because gcc determines that it's better to not inline the
function. Avoid this by just marking the function as __always_inline
to force the compiler to do the right thing here.

Reported-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/all/c525adc9-6623-4660-8718-e0c9311563b8@roeck-us.net/
Fixes: d12157efc8 ("locking/atomic: make atomic*_{cmp,}xchg optional")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Palmer Dabbelt <palmer@rivosinc.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Andi Shyti <andi.shyti@linux.intel.com>
Link: https://lore.kernel.org/r/20230628094938.2318171-1-arnd@kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
2023-07-13 09:54:32 -07:00
..
boot
configs mm/slab: rename CONFIG_SLAB to CONFIG_SLAB_DEPRECATED 2023-05-26 19:01:47 +02:00
crypto
include sparc: mark __arch_xchg() as __always_inline 2023-07-13 09:54:32 -07:00
kernel - Arnd Bergmann has fixed a bunch of -Wmissing-prototypes in 2023-06-28 10:59:38 -07:00
lib
math-emu
mm sparc32: fix lock_mm_and_find_vma() conversion 2023-06-29 20:41:24 -07:00
net
power
prom sparc64: Replace all non-returning strlcpy with strscpy 2023-06-14 12:04:06 -07:00
vdso
video arch/sparc: Add module license and description for fbdev helpers 2023-06-29 13:30:02 +02:00
Kbuild
Kconfig Merge branch 'expand-stack' 2023-06-28 20:35:21 -07:00
Kconfig.debug watchdog/sparc64: define HARDLOCKUP_DETECTOR_SPARC64 2023-06-19 16:25:29 -07:00
Makefile Merge drm/drm-next into drm-misc-next 2023-05-09 15:03:40 +02:00