• 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: 's avatarAurelien Jarno <aurelien@aurel32.net>
    Signed-off-by: 's avatarPalmer Dabbelt <palmer@sifive.com>
    Signed-off-by: 's avatarSasha Levin <sashal@kernel.org>
    7e710bfd
Name
Last commit
Last update
..
alpha/include Loading commit data...
arc/include/uapi/asm Loading commit data...
arm/include Loading commit data...
arm64/include Loading commit data...
h8300/include Loading commit data...
hexagon/include/uapi/asm Loading commit data...
ia64/include Loading commit data...
microblaze/include/uapi/asm Loading commit data...
mips/include Loading commit data...
parisc/include/uapi/asm Loading commit data...
powerpc/include Loading commit data...
riscv/include/uapi/asm Loading commit data...
s390/include Loading commit data...
sh/include Loading commit data...
sparc/include Loading commit data...
x86 Loading commit data...
xtensa/include Loading commit data...