summaryrefslogtreecommitdiffstats
path: root/tools/lib
diff options
context:
space:
mode:
authorTiezhu Yang <yangtiezhu@loongson.cn>2023-02-28 20:03:01 +0800
committerAndrii Nakryiko <andrii@kernel.org>2023-03-01 11:05:50 -0800
commitbe35f4af719c94df137cd611bf497d658eb3adc2 (patch)
tree356a3c06b763df634451641d9b1c06c92a517e1b /tools/lib
parent6c18e375310560915dc10ef41f789f2dfdf838bf (diff)
downloadlinux-stable-be35f4af719c94df137cd611bf497d658eb3adc2.tar.gz
linux-stable-be35f4af719c94df137cd611bf497d658eb3adc2.tar.bz2
linux-stable-be35f4af719c94df137cd611bf497d658eb3adc2.zip
selftests/bpf: Set __BITS_PER_LONG if target is bpf for LoongArch
If target is bpf, there is no __loongarch__ definition, __BITS_PER_LONG defaults to 32, __NR_nanosleep is not defined: #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 #define __NR_nanosleep 101 __SC_3264(__NR_nanosleep, sys_nanosleep_time32, sys_nanosleep) #endif Work around this problem, by explicitly setting __BITS_PER_LONG to __loongarch_grlen which is defined by compiler as 64 for LA64. This is similar with commit 36e70b9b06bf ("selftests, bpf: Fix broken riscv build"). Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/1677585781-21628-1-git-send-email-yangtiezhu@loongson.cn
Diffstat (limited to 'tools/lib')
0 files changed, 0 insertions, 0 deletions