From patchwork Fri Nov 8 23:46:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 13869111 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BC898D64076 for ; Sat, 9 Nov 2024 00:22:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:To:From:Subject :References:Mime-Version:Message-Id:In-Reply-To:Date:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=OKslcm2V1UHcqGqqi4FAiYTJwpOr2SEQn/AjeUS4EGg=; b=ClgHO4XM2J4Lhnqjki4kK9tMU9 wVGZPRWEw0/JyOsAb3KUk9noWUkWPPwvQ2ld3ntfZwWX8TtnjbfT3ZdJez4tPozEBECE89wZZxf3e KTXmVSd96bgMCh9/04nWVqFXm7tq5VAVPot7n76Ts5ROhZlA5/+J4aqyGqwT2TtOV5jJmfa/ich13 TgQjyS72nJkYFApVeA0qsepI15kZGxPn5dVQC3v9f1a0MOuzcBsf0ijAejIPaSIAfGfBeIM8Yrw8v rEOfynGKe7jf4dQSTbkWxTQc0/HYGWJ9gooPQbuOqJk1Rozns3bMd74qn/EHWq4bMZGIBThLafsu+ M5ztY3Ww==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t9ZFY-0000000CKmL-2dcx; Sat, 09 Nov 2024 00:22:48 +0000 Received: from mail-yb1-xb49.google.com ([2607:f8b0:4864:20::b49]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t9Ygs-0000000CFMG-38bh for linux-arm-kernel@lists.infradead.org; Fri, 08 Nov 2024 23:47:01 +0000 Received: by mail-yb1-xb49.google.com with SMTP id 3f1490d57ef6-e30ba241e7eso4628983276.2 for ; Fri, 08 Nov 2024 15:46:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1731109617; x=1731714417; darn=lists.infradead.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=OKslcm2V1UHcqGqqi4FAiYTJwpOr2SEQn/AjeUS4EGg=; b=lyGP876ixL622dd51iVDMXFdM2R5KKIIZaDuEAC+vHoQkRQ5xKYKry3+B8afNVtFdz zVOuAB9ec0Yv36Fpxjm3DnKHxwlpUFth1N7J6KDTLtZVp2E95UG1fiKWRzpQQU/jvZmc yqf16O6jL5FR+PYBMeFAdVEaF0f3sc/8HMxvfpMTE9lSZy68uL9WGllqmmVpUNvbpWQ3 L+hW/oov0ru5mZsczstZYbHGWLvh5NgtcM6xb4ofmSrVNa5dn/GlP6bohpJaHA9yLL8h DkAQuSj+WtMCxIAkrw/F0E7TYf04hx3rdR2WUrOw3WqCMM0Xk1/Mvd4fjEr7TgFamO/k n9bQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731109617; x=1731714417; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=OKslcm2V1UHcqGqqi4FAiYTJwpOr2SEQn/AjeUS4EGg=; b=lb2YFkVTZAXv2URVrDv8oD5k5sycWJKhoqj3aHdYSICVbGXJEKvzNF1G5fWRWUKfQ/ sHbedSbIBdXtUoyNKBn7xEO/9XC5Wu9z4u6auq4u2osFtxXvRIx8GKHVmygWgf5IkRU8 IfjRe+hlcuUICztjR/8rj/U1d8T5MIttJ2TKVCJerD7ZpfS/Iut+Amr+UljSs3x7v7R1 IBzBd1AZfd+UIQgRUs7BO4P9fMlVt9IFjTpWNYrPXvtQ2q47AiG4S6P38RSL2dFpE2EL vy29URUdQy2P6+pofJ8T7356GNe2D9gL/k6OwXW7D4zZUosgosj8IjkgPtn6hc90G1jx OrZw== X-Forwarded-Encrypted: i=1; AJvYcCWFmrNvlAcdVfStlnG7zDiLoXMv7gIkQ+S8mUZTK+M8ILImruLCJo/3+2L026OUsrmv/K4qHLW81Sm2KZhZORwX@lists.infradead.org X-Gm-Message-State: AOJu0Ywa1FqbsUCynjVps8fXXaIZts3n2oNSjPkguezfe2ifPuReRHBR JDxC4iSqOTTAf+J0Dy+ugZJ5fv8X0NZWsUgF2BFUEL4tl5PUsShVKxTfGcaELvr+ggmSFGmje18 emmclnw== X-Google-Smtp-Source: AGHT+IG1zx26qQHAzqiLBUtrRzJXR+kqfJstP7FYSoC2xoOMAWBu+eO7OrTp0s/Fw2wwPvD/OOi7YEUCvyL0 X-Received: from irogers.svl.corp.google.com ([2620:15c:2c5:11:6fd2:1e36:6d8c:7c49]) (user=irogers job=sendgmr) by 2002:a25:ae63:0:b0:e11:639b:6428 with SMTP id 3f1490d57ef6-e337f77f713mr8790276.0.1731109617162; Fri, 08 Nov 2024 15:46:57 -0800 (PST) Date: Fri, 8 Nov 2024 15:46:05 -0800 In-Reply-To: <20241108234606.429459-1-irogers@google.com> Message-Id: <20241108234606.429459-21-irogers@google.com> Mime-Version: 1.0 References: <20241108234606.429459-1-irogers@google.com> X-Mailer: git-send-email 2.47.0.277.g8800431eea-goog Subject: [PATCH v4 20/20] perf build: Remove PERF_HAVE_DWARF_REGS From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Kan Liang , John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , Guo Ren , Paul Walmsley , Palmer Dabbelt , Albert Ou , Nick Terrell , "Masami Hiramatsu (Google)" , Changbin Du , Guilherme Amadio , Yang Jihong , Aditya Gupta , Athira Rajeev , Masahiro Yamada , Bibo Mao , Huacai Chen , Kajol Jain , Atish Patra , Shenlin Liang , Anup Patel , Oliver Upton , "Steinar H. Gunderson" , "Dr. David Alan Gilbert" , Chen Pei , Dima Kogan , Przemek Kitszel , "David S. Miller" , Alexander Lobakin , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-riscv@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241108_154658_917083_7AE61D73 X-CRM114-Status: GOOD ( 16.87 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org PERF_HAVE_DWARF_REGS was true when an architecture had a dwarf-regs.c file. There are no more architecture dwarf-regs.c files, selection is done using constants from the ELF file rather than conditional compilation. When removing PERF_HAVE_DWARF_REGS was the only variable in the Makefile, remove the Makefile. Add missing SPDX for RISC-V Makefile. Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Ian Rogers --- tools/perf/Makefile.config | 13 ++++--------- tools/perf/arch/arm/Makefile | 3 --- tools/perf/arch/arm64/Makefile | 3 --- tools/perf/arch/csky/Makefile | 4 ---- tools/perf/arch/loongarch/Makefile | 3 --- tools/perf/arch/mips/Makefile | 4 ---- tools/perf/arch/powerpc/Makefile | 4 ---- tools/perf/arch/riscv/Makefile | 4 +--- tools/perf/arch/s390/Makefile | 3 --- tools/perf/arch/sh/Makefile | 4 ---- tools/perf/arch/sparc/Makefile | 4 ---- tools/perf/arch/x86/Makefile | 3 --- tools/perf/arch/xtensa/Makefile | 4 ---- 13 files changed, 5 insertions(+), 51 deletions(-) delete mode 100644 tools/perf/arch/csky/Makefile delete mode 100644 tools/perf/arch/sh/Makefile delete mode 100644 tools/perf/arch/xtensa/Makefile diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index 52a216df9e2a..2916d59c88cd 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -559,15 +559,10 @@ ifndef NO_LIBELF endif ifndef NO_LIBDW - ifeq ($(origin PERF_HAVE_DWARF_REGS), undefined) - $(warning DWARF register mappings have not been defined for architecture $(SRCARCH), DWARF support disabled) - NO_LIBDW := 1 - else - CFLAGS += -DHAVE_LIBDW_SUPPORT $(LIBDW_CFLAGS) - LDFLAGS += $(LIBDW_LDFLAGS) - EXTLIBS += ${DWARFLIBS} - $(call detected,CONFIG_LIBDW) - endif # PERF_HAVE_DWARF_REGS + CFLAGS += -DHAVE_LIBDW_SUPPORT $(LIBDW_CFLAGS) + LDFLAGS += $(LIBDW_LDFLAGS) + EXTLIBS += ${DWARFLIBS} + $(call detected,CONFIG_LIBDW) endif # NO_LIBDW ifndef NO_LIBBPF diff --git a/tools/perf/arch/arm/Makefile b/tools/perf/arch/arm/Makefile index 9b164d379548..8b59ce8efb89 100644 --- a/tools/perf/arch/arm/Makefile +++ b/tools/perf/arch/arm/Makefile @@ -1,5 +1,2 @@ # SPDX-License-Identifier: GPL-2.0-only -ifndef NO_LIBDW -PERF_HAVE_DWARF_REGS := 1 -endif PERF_HAVE_JITDUMP := 1 diff --git a/tools/perf/arch/arm64/Makefile b/tools/perf/arch/arm64/Makefile index ca2e35961287..91570d5d428e 100644 --- a/tools/perf/arch/arm64/Makefile +++ b/tools/perf/arch/arm64/Makefile @@ -1,7 +1,4 @@ # SPDX-License-Identifier: GPL-2.0 -ifndef NO_LIBDW -PERF_HAVE_DWARF_REGS := 1 -endif PERF_HAVE_JITDUMP := 1 HAVE_KVM_STAT_SUPPORT := 1 diff --git a/tools/perf/arch/csky/Makefile b/tools/perf/arch/csky/Makefile deleted file mode 100644 index 119b06a64bed..000000000000 --- a/tools/perf/arch/csky/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only -ifndef NO_LIBDW -PERF_HAVE_DWARF_REGS := 1 -endif diff --git a/tools/perf/arch/loongarch/Makefile b/tools/perf/arch/loongarch/Makefile index 79b432744296..52544d59245b 100644 --- a/tools/perf/arch/loongarch/Makefile +++ b/tools/perf/arch/loongarch/Makefile @@ -1,7 +1,4 @@ # SPDX-License-Identifier: GPL-2.0 -ifndef NO_LIBDW -PERF_HAVE_DWARF_REGS := 1 -endif PERF_HAVE_JITDUMP := 1 HAVE_KVM_STAT_SUPPORT := 1 diff --git a/tools/perf/arch/mips/Makefile b/tools/perf/arch/mips/Makefile index 733f7b76f52d..827168f1077a 100644 --- a/tools/perf/arch/mips/Makefile +++ b/tools/perf/arch/mips/Makefile @@ -1,8 +1,4 @@ # SPDX-License-Identifier: GPL-2.0 -ifndef NO_LIBDW -PERF_HAVE_DWARF_REGS := 1 -endif - # Syscall table generation for perf out := $(OUTPUT)arch/mips/include/generated/asm header := $(out)/syscalls_n64.c diff --git a/tools/perf/arch/powerpc/Makefile b/tools/perf/arch/powerpc/Makefile index ae05727835d8..dc8f4fb8e324 100644 --- a/tools/perf/arch/powerpc/Makefile +++ b/tools/perf/arch/powerpc/Makefile @@ -1,8 +1,4 @@ # SPDX-License-Identifier: GPL-2.0 -ifndef NO_LIBDW -PERF_HAVE_DWARF_REGS := 1 -endif - HAVE_KVM_STAT_SUPPORT := 1 PERF_HAVE_JITDUMP := 1 diff --git a/tools/perf/arch/riscv/Makefile b/tools/perf/arch/riscv/Makefile index d83e0f32f3a8..18ad078000e2 100644 --- a/tools/perf/arch/riscv/Makefile +++ b/tools/perf/arch/riscv/Makefile @@ -1,6 +1,4 @@ -ifndef NO_LIBDW -PERF_HAVE_DWARF_REGS := 1 -endif +# SPDX-License-Identifier: GPL-2.0 PERF_HAVE_JITDUMP := 1 HAVE_KVM_STAT_SUPPORT := 1 diff --git a/tools/perf/arch/s390/Makefile b/tools/perf/arch/s390/Makefile index 58e79f5b67a4..c431c21b11ef 100644 --- a/tools/perf/arch/s390/Makefile +++ b/tools/perf/arch/s390/Makefile @@ -1,7 +1,4 @@ # SPDX-License-Identifier: GPL-2.0-only -ifndef NO_LIBDW -PERF_HAVE_DWARF_REGS := 1 -endif HAVE_KVM_STAT_SUPPORT := 1 PERF_HAVE_JITDUMP := 1 diff --git a/tools/perf/arch/sh/Makefile b/tools/perf/arch/sh/Makefile deleted file mode 100644 index 119b06a64bed..000000000000 --- a/tools/perf/arch/sh/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only -ifndef NO_LIBDW -PERF_HAVE_DWARF_REGS := 1 -endif diff --git a/tools/perf/arch/sparc/Makefile b/tools/perf/arch/sparc/Makefile index 7741184894c8..8b59ce8efb89 100644 --- a/tools/perf/arch/sparc/Makefile +++ b/tools/perf/arch/sparc/Makefile @@ -1,6 +1,2 @@ # SPDX-License-Identifier: GPL-2.0-only -ifndef NO_LIBDW -PERF_HAVE_DWARF_REGS := 1 -endif - PERF_HAVE_JITDUMP := 1 diff --git a/tools/perf/arch/x86/Makefile b/tools/perf/arch/x86/Makefile index 51cf267f4d85..a6b6e0a9308a 100644 --- a/tools/perf/arch/x86/Makefile +++ b/tools/perf/arch/x86/Makefile @@ -1,7 +1,4 @@ # SPDX-License-Identifier: GPL-2.0 -ifndef NO_LIBDW -PERF_HAVE_DWARF_REGS := 1 -endif HAVE_KVM_STAT_SUPPORT := 1 PERF_HAVE_JITDUMP := 1 diff --git a/tools/perf/arch/xtensa/Makefile b/tools/perf/arch/xtensa/Makefile deleted file mode 100644 index 119b06a64bed..000000000000 --- a/tools/perf/arch/xtensa/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only -ifndef NO_LIBDW -PERF_HAVE_DWARF_REGS := 1 -endif