From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Tiezhu Yang <yangtiezhu@loongson.cn>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
Xuefeng Li <lixuefeng@loongson.cn>
Subject: Re: [PATCH] perf tools: Copy uapi/asm/perf_regs.h from the kernel for MIPS
Date: Tue, 1 Jun 2021 10:08:37 -0300 [thread overview]
Message-ID: <YLYxVXevS2kL4EVK@kernel.org> (raw)
In-Reply-To: <1622548436-12472-1-git-send-email-yangtiezhu@loongson.cn>
Em Tue, Jun 01, 2021 at 07:53:56PM +0800, Tiezhu Yang escreveu:
> To allow the build to complete on older systems, where those files are
> either not uptodate, lacking some recent additions or not present at
> all.
>
> And check if the copy drifts from the kernel.
>
> This commit is similar with
> commit 12f020338a2c ("tools: Copy uapi/asm/perf_regs.h from the kernel")
>
> With this commit, we can avoid the following build error in any case:
>
> tools/perf/arch/mips/include/perf_regs.h:7:10:
> fatal error: asm/perf_regs.h: No such file or directory
> #include <asm/perf_regs.h>
> ^~~~~~~~~~~~~~~~~
> compilation terminated.
Thanks, applied.
- Arnaldo
> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
> ---
> tools/arch/mips/include/uapi/asm/perf_regs.h | 40 ++++++++++++++++++++++++++++
> tools/perf/Makefile.config | 1 -
> tools/perf/check-headers.sh | 1 +
> 3 files changed, 41 insertions(+), 1 deletion(-)
> create mode 100644 tools/arch/mips/include/uapi/asm/perf_regs.h
>
> diff --git a/tools/arch/mips/include/uapi/asm/perf_regs.h b/tools/arch/mips/include/uapi/asm/perf_regs.h
> new file mode 100644
> index 0000000..d0f4ecd
> --- /dev/null
> +++ b/tools/arch/mips/include/uapi/asm/perf_regs.h
> @@ -0,0 +1,40 @@
> +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
> +#ifndef _ASM_MIPS_PERF_REGS_H
> +#define _ASM_MIPS_PERF_REGS_H
> +
> +enum perf_event_mips_regs {
> + PERF_REG_MIPS_PC,
> + PERF_REG_MIPS_R1,
> + PERF_REG_MIPS_R2,
> + PERF_REG_MIPS_R3,
> + PERF_REG_MIPS_R4,
> + PERF_REG_MIPS_R5,
> + PERF_REG_MIPS_R6,
> + PERF_REG_MIPS_R7,
> + PERF_REG_MIPS_R8,
> + PERF_REG_MIPS_R9,
> + PERF_REG_MIPS_R10,
> + PERF_REG_MIPS_R11,
> + PERF_REG_MIPS_R12,
> + PERF_REG_MIPS_R13,
> + PERF_REG_MIPS_R14,
> + PERF_REG_MIPS_R15,
> + PERF_REG_MIPS_R16,
> + PERF_REG_MIPS_R17,
> + PERF_REG_MIPS_R18,
> + PERF_REG_MIPS_R19,
> + PERF_REG_MIPS_R20,
> + PERF_REG_MIPS_R21,
> + PERF_REG_MIPS_R22,
> + PERF_REG_MIPS_R23,
> + PERF_REG_MIPS_R24,
> + PERF_REG_MIPS_R25,
> + PERF_REG_MIPS_R26,
> + PERF_REG_MIPS_R27,
> + PERF_REG_MIPS_R28,
> + PERF_REG_MIPS_R29,
> + PERF_REG_MIPS_R30,
> + PERF_REG_MIPS_R31,
> + PERF_REG_MIPS_MAX = PERF_REG_MIPS_R31 + 1,
> +};
> +#endif /* _ASM_MIPS_PERF_REGS_H */
> diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
> index 406a951..73df23d 100644
> --- a/tools/perf/Makefile.config
> +++ b/tools/perf/Makefile.config
> @@ -90,7 +90,6 @@ endif
> ifeq ($(ARCH),mips)
> NO_PERF_REGS := 0
> CFLAGS += -I$(OUTPUT)arch/mips/include/generated
> - CFLAGS += -I../../arch/mips/include/uapi -I../../arch/mips/include/generated/uapi
> LIBUNWIND_LIBS = -lunwind -lunwind-mips
> endif
>
> diff --git a/tools/perf/check-headers.sh b/tools/perf/check-headers.sh
> index dd8ff28..c783558 100755
> --- a/tools/perf/check-headers.sh
> +++ b/tools/perf/check-headers.sh
> @@ -39,6 +39,7 @@ arch/x86/lib/x86-opcode-map.txt
> arch/x86/tools/gen-insn-attr-x86.awk
> arch/arm/include/uapi/asm/perf_regs.h
> arch/arm64/include/uapi/asm/perf_regs.h
> +arch/mips/include/uapi/asm/perf_regs.h
> arch/powerpc/include/uapi/asm/perf_regs.h
> arch/s390/include/uapi/asm/perf_regs.h
> arch/x86/include/uapi/asm/perf_regs.h
> --
> 2.1.0
>
--
- Arnaldo
prev parent reply other threads:[~2021-06-01 13:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-01 11:53 [PATCH] perf tools: Copy uapi/asm/perf_regs.h from the kernel for MIPS Tiezhu Yang
2021-06-01 13:08 ` Arnaldo Carvalho de Melo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YLYxVXevS2kL4EVK@kernel.org \
--to=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=lixuefeng@loongson.cn \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=yangtiezhu@loongson.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).