• Aurelien Jarno's avatar
    tools uapi: fix RISC-V 64-bit support · 7e710bfd
    Aurelien Jarno authored
    [ Upstream commit d0df00e3 ]
    
    The BPF library is not built on 64-bit RISC-V, as the BPF feature is
    not detected. Looking more in details, feature/test-bpf.c fails to build
    with the following error:
    
    | In file included from /tmp/linux-4.19.12/tools/include/uapi/asm/bitsperlong.h:17,
    |                  from /tmp/linux-4.19.12/tools/include/uapi/asm-generic/unistd.h:2,
    |                  from /usr/include/riscv64-linux-gnu/asm/unistd.h:1,
    |                  from test-bpf.c:2:
    | /tmp/linux-4.19.12/tools/include/asm-generic/bitsperlong.h:14:2: error: #error Inconsistent word size. Check asm/bitsperlong.h
    |  #error Inconsistent word size. Check asm/bitsperlong.h
    |   ^~~~~
    
    The UAPI from the tools directory is missing RISC-V support, therefore
    bitsperlong.h from asm-generic is used, defaulting to 32 bits.
    
    Fix that by adding tools/arch/riscv/include/uapi/asm/bitsperlong.h as
    a copy of arch/riscv/include/uapi/asm/bitsperlong.h and by updating
    tools/include/uapi/asm/bitsperlong.h.
    Signed-off-by: default avatarAurelien Jarno <aurelien@aurel32.net>
    Signed-off-by: default avatarPalmer Dabbelt <palmer@sifive.com>
    Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
    7e710bfd
Name
Last commit
Last update
..
accounting Loading commit data...
arch Loading commit data...
bpf Loading commit data...
build Loading commit data...
cgroup Loading commit data...
crypto Loading commit data...
firewire Loading commit data...
gpio Loading commit data...
hv Loading commit data...
iio Loading commit data...
include Loading commit data...
kvm/kvm_stat Loading commit data...
laptop Loading commit data...
leds Loading commit data...
lib Loading commit data...
memory-model Loading commit data...
nfsd Loading commit data...
objtool Loading commit data...
pci Loading commit data...
pcmcia Loading commit data...
perf Loading commit data...
power Loading commit data...
scripts Loading commit data...
spi Loading commit data...
testing Loading commit data...
thermal/tmon Loading commit data...
time Loading commit data...
usb Loading commit data...
virtio Loading commit data...
vm Loading commit data...
wmi Loading commit data...
Makefile Loading commit data...