Re: [PATCH v3 2/3] perf arm64: Generate system call table from asm/unistd.h

From: Arnaldo Carvalho de Melo
Date: Mon Jul 23 2018 - 15:01:28 EST


Em Mon, Jul 23, 2018 at 03:59:05PM -0300, Arnaldo Carvalho de Melo escreveu:
> A quick hack is to do this instead:

I'm going with this quick hack applied so that I can pass all tests,
feel free to provide an alternative patch that makes
tools/include/uapi/asm-generic/unistd.h be used when included by
tools/arch/arm64/include/uapi/asm/unistd.h, that I haven't tried to do
and looks the right fix.

- Arnaldo

> diff --git a/tools/perf/arch/arm64/Makefile b/tools/perf/arch/arm64/Makefile
> index 85fdf4949db3..f013b115dc86 100644
> --- a/tools/perf/arch/arm64/Makefile
> +++ b/tools/perf/arch/arm64/Makefile
> @@ -11,7 +11,7 @@ PERF_HAVE_ARCH_REGS_QUERY_REGISTER_OFFSET := 1
>
> out := $(OUTPUT)arch/arm64/include/generated/asm
> header := $(out)/syscalls.c
> -sysdef := $(srctree)/tools/arch/arm64/include/uapi/asm/unistd.h
> +sysdef := $(srctree)/tools/include/uapi/asm-generic/unistd.h
> sysprf := $(srctree)/tools/perf/arch/arm64/entry/syscalls/
> systbl := $(sysprf)/mksyscalltbl
>
> diff --git a/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl b/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl
> index c21023509960..52e197317d3e 100755
> --- a/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl
> +++ b/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl
> @@ -28,6 +28,7 @@ create_table_from_c()
>
> cat <<-_EoHEADER
> #include <stdio.h>
> + #define __ARCH_WANT_RENAMEAT
> #include "$input"
> int main(int argc, char *argv[])
> {