Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3412969pxj; Tue, 1 Jun 2021 04:55:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyehps3MjgqXFLGfOSPV2OqTZcopjX2zb05NVyBBZPsgCLEKB5QVtnjs4SzbX3vf7OzTO8Z X-Received: by 2002:a02:c817:: with SMTP id p23mr24923471jao.9.1622548515233; Tue, 01 Jun 2021 04:55:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622548515; cv=none; d=google.com; s=arc-20160816; b=HQSpp13w1eLnh5IRmuOvSU5xFFqzDeWekJZqGhPNFduWrs4lHG5cf1MBbPblYFbU8/ 0/WaXIDhIm5ax2YficLJWhv6t2anB17RGMcISZd+zGx7YyQIYXsWpd2lLw2N9GRN16KF lLNfOZC4x+gvbUBkFjs/3SQ8AogbdtDXo9xhz/d5D0QQDE2/XIfV2Kx6eNMGGcljlmx3 coQK+tQkbEbk5IkbU7F44616QgpPioB7A4F2SbxQvIFmihEpmQOxeELGJQO7zMjm1s7Z OMRj7SMVRSJkGlYzZdMMdTcT5o/2IcCRwMY0Ap+aJ2PPe5I94RhSUfyrB26zAzK7sdFL HGkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=EAmbkeijXJGTV7ZSt4R9sawJYDUuYHPNSJGhgMb/Y84=; b=nf/IYeXcrnaFJpUalN23GGiEmkajq4WAAoqUSuayTjXnqrzaF1aZIlot6r4Yd53Yem UIjYLj7pE+0Dl64N+D5CRa+PgLTwycn7TTZhC3xJCur7AYz6kM3tQ5N+IscY3eSxz93G RxyrMhTm4wvZ6y0zoDNcecayj9ocZ2vnfed+EmDcg+UZ7YY95ssndsVQqkrndwujd9hX ozEJZ9XmiZzlc+KvEU6sNrHPNTEAd5XLYMlLNeGRP1LlAXWDFlU56+YSq1lbYyQWO/Xw e/UdC2MKPeJjNjN3Zlydx7t6/l1e21hyYANCMqLFj7Ueja60UuEqdOnNrbxYGz0rZRus 5miw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p8si16832991ioj.46.2021.06.01.04.55.01; Tue, 01 Jun 2021 04:55:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233336AbhFALzw (ORCPT + 99 others); Tue, 1 Jun 2021 07:55:52 -0400 Received: from mail.loongson.cn ([114.242.206.163]:46770 "EHLO loongson.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230288AbhFALzv (ORCPT ); Tue, 1 Jun 2021 07:55:51 -0400 Received: from linux.localdomain (unknown [113.200.148.30]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9BxkOLVH7Zge0QIAA--.5303S2; Tue, 01 Jun 2021 19:53:57 +0800 (CST) From: Tiezhu Yang To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Xuefeng Li Subject: [PATCH] perf tools: Copy uapi/asm/perf_regs.h from the kernel for MIPS Date: Tue, 1 Jun 2021 19:53:56 +0800 Message-Id: <1622548436-12472-1-git-send-email-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.1.0 X-CM-TRANSID: AQAAf9BxkOLVH7Zge0QIAA--.5303S2 X-Coremail-Antispam: 1UD129KBjvJXoWx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qz5rrqw2lrqou0/ Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 ^~~~~~~~~~~~~~~~~ compilation terminated. Signed-off-by: Tiezhu Yang --- 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