Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

um: Add cmpxchg8b_emu and checksum functions to asm-prototypes.h

With CONFIG_GENDWARFKSYMS, um builds fail due to missing prototypes
in asm/asm-prototypes.h. Add declarations for cmpxchg8b_emu and the
exported checksum functions, including csum_partial_copy_generic as
it's also exported.

Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: linux-kbuild@vger.kernel.org
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202503251216.lE4t9Ikj-lkp@intel.com/
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Link: https://patch.msgid.link/20250326190500.847236-2-samitolvanen@google.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

authored by

Sami Tolvanen and committed by
Johannes Berg
674d03f6 22361369

+8
+5
arch/um/include/asm/asm-prototypes.h
··· 1 1 #include <asm-generic/asm-prototypes.h> 2 + #include <asm/checksum.h> 3 + 4 + #ifdef CONFIG_UML_X86 5 + extern void cmpxchg8b_emu(void); 6 + #endif
+3
arch/x86/um/asm/checksum.h
··· 20 20 */ 21 21 extern __wsum csum_partial(const void *buff, int len, __wsum sum); 22 22 23 + /* Do not call this directly. Declared for export type visibility. */ 24 + extern __visible __wsum csum_partial_copy_generic(const void *src, void *dst, int len); 25 + 23 26 /** 24 27 * csum_fold - Fold and invert a 32bit checksum. 25 28 * sum: 32bit unfolded sum