aboutsummaryrefslogtreecommitdiffstats
path: root/lib/string.c
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <[email protected]>2023-02-07 10:46:33 +0000
committerBorislav Petkov (AMD) <[email protected]>2023-02-07 17:20:41 +0000
commit877cff5296faa6ef312f8002216bbf73bea006c7 (patch)
treeeea8bdb0d80b396f147f917dbabc3e6e2b5ca1c7 /lib/string.c
parentselftests: Emit a warning if getcpu() is missing on 32bit (diff)
downloadkernel-877cff5296faa6ef312f8002216bbf73bea006c7.tar.gz
kernel-877cff5296faa6ef312f8002216bbf73bea006c7.zip
x86/vdso: Fake 32bit VDSO build on 64bit compile for vgetcpu
The 64bit register constrains in __arch_hweight64() cannot be fulfilled in a 32-bit build. The function is only declared but not used within vclock_gettime.c and gcc does not care. LLVM complains and aborts. Reportedly because it validates extended asm even if latter would get compiled out, see https://lore.kernel.org/r/Y%2BJ%[email protected] i.e., a long standing design difference between gcc and LLVM. Move the "fake a 32 bit kernel configuration" bits from vclock_gettime.c into a common header file. Use this from vclock_gettime.c and vgetcpu.c. [ bp: Add background info from Nathan. ] Fixes: 92d33063c081a ("x86/vdso: Provide getcpu for x86-32.") Reported-by: kernel test robot <[email protected]> Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: Borislav Petkov (AMD) <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'lib/string.c')
0 files changed, 0 insertions, 0 deletions