linux-stable/tools/arch
Aurelien Jarno da78c8cda5 tools uapi: fix RISC-V 64-bit support
[ Upstream commit d0df00e30e ]

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: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-02-20 10:25:39 +01:00
..
alpha/include tools include arch: Grab a copy of errno.h for arch's supported by perf 2018-01-23 09:51:37 -03:00
arc/include/uapi/asm License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
arm/include tools headers uapi: Update tools's copies of kvm headers 2018-09-11 13:09:26 -03:00
arm64/include tools headers uapi: Update tools's copies of kvm headers 2018-09-11 13:09:26 -03:00
h8300/include License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
hexagon/include/uapi/asm License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
ia64/include License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
microblaze/include/uapi/asm License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
mips/include tools include arch: Grab a copy of errno.h for arch's supported by perf 2018-01-23 09:51:37 -03:00
parisc/include/uapi/asm parisc: Drop architecture-specific ENOTSUP define 2018-08-13 09:30:41 +02:00
powerpc/include tools headers powerpc: Update asm/unistd.h copy to pick new 2018-07-30 11:51:13 -03:00
riscv/include/uapi/asm tools uapi: fix RISC-V 64-bit support 2019-02-20 10:25:39 +01:00
s390/include tools headers uapi: Update tools's copies of kvm headers 2018-09-11 13:09:26 -03:00
sh/include License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
sparc/include tools include arch: Grab a copy of errno.h for arch's supported by perf 2018-01-23 09:51:37 -03:00
x86 tools arch uapi: Sync the x86 kvm.h copy 2018-10-08 12:04:51 -03:00
xtensa/include License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00