mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-22 02:17:36 -04:00
libbpf: Add __NR_bpf definition for LoongArch
LoongArch uses the generic syscall table, where __NR_bpf is defined as 280 in include/uapi/asm-generic/unistd.h. To align with other architectures, add the __NR_bpf definition for LoongArch to avoid a potential compilation failure: "error __NR_bpf not defined. libbpf does not support your arch." This is a follow up patch of: commitb0c47807d3("bpf: Add sparc support to tools and samples.") commitbad1926dd2("bpf, s390: fix build for libbpf and selftest suite") commitca31ca8247("tools/bpf: fix perf build error with uClibc (seen on ARC)") commite32cb12ff5("bpf, mips: Fix build errors about __NR_bpf undeclared") Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20260526063936.16769-1-yangtiezhu@loongson.cn
This commit is contained in:
committed by
Andrii Nakryiko
parent
b23705e6af
commit
a4a5d4ee06
@@ -20,6 +20,8 @@
|
||||
# define __NR_bpf 6319
|
||||
# elif defined(__mips__) && defined(_ABI64)
|
||||
# define __NR_bpf 5315
|
||||
# elif defined(__loongarch__)
|
||||
# define __NR_bpf 280
|
||||
# else
|
||||
# error __NR_bpf not defined. libbpf does not support your arch.
|
||||
# endif
|
||||
|
||||
@@ -59,6 +59,8 @@
|
||||
# define __NR_bpf 6319
|
||||
# elif defined(__mips__) && defined(_ABI64)
|
||||
# define __NR_bpf 5315
|
||||
# elif defined(__loongarch__)
|
||||
# define __NR_bpf 280
|
||||
# else
|
||||
# error __NR_bpf not defined. libbpf does not support your arch.
|
||||
# endif
|
||||
|
||||
Reference in New Issue
Block a user