linux/arch/x86
Linus Torvalds 769327258a x86-32: fix cmpxchg8b_emu build error with clang
The kernel test robot reported that clang no longer compiles the 32-bit
x86 kernel in some configurations due to commit 95ece48165
("locking/atomic/x86: Rewrite x86_32 arch_atomic64_{,fetch}_{and,or,xor}()
functions").

The build fails with

  arch/x86/include/asm/cmpxchg_32.h:149:9: error: inline assembly requires more registers than available

and the reason seems to be that not only does the cmpxchg8b instruction
need four fixed registers (EDX:EAX and ECX:EBX), with the emulation
fallback the inline asm also wants a fifth fixed register for the
address (it uses %esi for that, but that's just a software convention
with cmpxchg8b_emu).

Avoiding using another pointer input to the asm (and just forcing it to
use the "0(%esi)" addressing that we end up requiring for the sw
fallback) seems to fix the issue.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202406230912.F6XFIyA6-lkp@intel.com/
Fixes: 95ece48165 ("locking/atomic/x86: Rewrite x86_32 arch_atomic64_{,fetch}_{and,or,xor}() functions")
Link: https://lore.kernel.org/all/202406230912.F6XFIyA6-lkp@intel.com/
Suggested-by: Uros Bizjak <ubizjak@gmail.com>
Reviewed-and-Tested-by: Uros Bizjak <ubizjak@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2024-06-30 09:21:29 -07:00
..
boot x86/boot: Don't add the EFI stub to targets, again 2024-06-13 10:32:36 +02:00
coco x86/cc: Add cc_platform_set/_clear() helpers 2024-04-04 10:40:27 +02:00
configs hardening: Enable KCFI and some other options 2024-05-01 12:38:14 -07:00
crypto crypto: x86/aes-xts - switch to new Intel CPU model defines 2024-05-22 11:10:48 +02:00
entry syscalls: fix compat_sys_io_pgetevents_time64 usage 2024-06-25 15:57:20 +02:00
events perf/x86/intel: Add missing MODULE_DESCRIPTION() lines 2024-05-31 11:41:15 +02:00
hyperv x86/platform changes for v6.10: 2024-05-13 19:29:08 -07:00
ia32
include x86-32: fix cmpxchg8b_emu build error with clang 2024-06-30 09:21:29 -07:00
kernel x86: stop playing stack games in profile_pc() 2024-06-28 14:27:22 -07:00
kvm KVM: SEV-ES: Fix svm_get_msr()/svm_set_msr() for KVM_SEV_ES_INIT guests 2024-06-21 07:11:29 -04:00
lib x86/uaccess: Fix missed zeroing of ia32 u64 get_user() range checking 2024-06-11 16:08:43 -07:00
math-emu x86/math-emu: Fix function cast warnings 2024-04-08 16:06:22 +02:00
mm x86/mm/numa: Use NUMA_NO_NODE when calling memblock_set_node() 2024-06-06 22:20:39 +03:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-05-02 12:06:25 -07:00
pci pci-v6.10-changes 2024-05-21 10:09:28 -07:00
platform efi/x86: Free EFI memory map only when installing a new one. 2024-06-15 10:25:02 +02:00
power - Kuan-Wei Chiu has developed the well-named series "lib min_heap: Min 2024-03-14 18:03:09 -07:00
purgatory Kbuild updates for v6.10 2024-05-18 12:39:20 -07:00
ras
realmode Makefile: remove redundant tool coverage variables 2024-05-14 23:35:48 +09:00
tools Changes: 2024-05-19 11:32:42 -07:00
um This pull request contains the following changes for UML: 2024-05-25 13:17:48 -07:00
video arch: Fix name collision with ACPI's video.o 2024-05-20 21:17:06 +00:00
virt x86/cleanups changes for v6.10: 2024-05-13 18:21:24 -07:00
xen xen: branch for v6.10-rc1 2024-05-24 10:24:49 -07:00
.gitignore
Kbuild x86/build: Use obj-y to descend into arch/x86/virt/ 2024-03-30 10:41:49 +01:00
Kconfig x86: implement ARCH_HAS_KERNEL_FPU_SUPPORT 2024-05-19 14:36:19 -07:00
Kconfig.assembler x86: add kconfig symbols for assembler VAES and VPCLMULQDQ support 2024-04-05 15:46:33 +08:00
Kconfig.cpu x86/Kconfig: Transmeta Crusoe is CPU family 5, not 6 2024-02-09 16:28:19 +01:00
Kconfig.debug x86/kconfig: Select ARCH_WANT_FRAME_POINTERS again when UNWINDER_FRAME_POINTER=y 2024-05-20 11:37:23 +02:00
Makefile - A series ("kbuild: enable more warnings by default") from Arnd 2024-05-22 18:59:29 -07:00
Makefile_32.cpu
Makefile.postlink
Makefile.um