Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf build: Remove PERF_HAVE_DWARF_REGS

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) <mhiramat@kernel.org>
Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Anup Patel <anup@brainfault.org>
Cc: Yang Jihong <yangjihong@bytedance.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Albert Ou <aou@eecs.berkeley.edu>
Cc: Shenlin Liang <liangshenlin@eswincomputing.com>
Cc: Nick Terrell <terrelln@fb.com>
Cc: Guilherme Amadio <amadio@gentoo.org>
Cc: Steinar H. Gunderson <sesse@google.com>
Cc: Changbin Du <changbin.du@huawei.com>
Cc: Alexander Lobakin <aleksander.lobakin@intel.com>
Cc: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Cc: Huacai Chen <chenhuacai@kernel.org>
Cc: Guo Ren <guoren@kernel.org>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Will Deacon <will@kernel.org>
Cc: James Clark <james.clark@linaro.org>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Chen Pei <cp0613@linux.alibaba.com>
Cc: Leo Yan <leo.yan@linux.dev>
Cc: Oliver Upton <oliver.upton@linux.dev>
Cc: Aditya Gupta <adityag@linux.ibm.com>
Cc: Kajol Jain <kjain@linux.ibm.com>
Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-riscv@lists.infradead.org
Cc: Bibo Mao <maobibo@loongson.cn>
Cc: John Garry <john.g.garry@oracle.com>
Cc: Atish Patra <atishp@rivosinc.com>
Cc: Dima Kogan <dima@secretsauce.net>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Dr. David Alan Gilbert <linux@treblig.org>
Cc: linux-csky@vger.kernel.org
Link: https://lore.kernel.org/r/20241108234606.429459-21-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>

authored by

Ian Rogers and committed by
Namhyung Kim
ddbfb6f2 3ef6b89a

+5 -51
+4 -9
tools/perf/Makefile.config
··· 559 559 endif 560 560 561 561 ifndef NO_LIBDW 562 - ifeq ($(origin PERF_HAVE_DWARF_REGS), undefined) 563 - $(warning DWARF register mappings have not been defined for architecture $(SRCARCH), DWARF support disabled) 564 - NO_LIBDW := 1 565 - else 566 - CFLAGS += -DHAVE_LIBDW_SUPPORT $(LIBDW_CFLAGS) 567 - LDFLAGS += $(LIBDW_LDFLAGS) 568 - EXTLIBS += ${DWARFLIBS} 569 - $(call detected,CONFIG_LIBDW) 570 - endif # PERF_HAVE_DWARF_REGS 562 + CFLAGS += -DHAVE_LIBDW_SUPPORT $(LIBDW_CFLAGS) 563 + LDFLAGS += $(LIBDW_LDFLAGS) 564 + EXTLIBS += ${DWARFLIBS} 565 + $(call detected,CONFIG_LIBDW) 571 566 endif # NO_LIBDW 572 567 573 568 ifndef NO_LIBBPF
-3
tools/perf/arch/arm/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - ifndef NO_LIBDW 3 - PERF_HAVE_DWARF_REGS := 1 4 - endif 5 2 PERF_HAVE_JITDUMP := 1
-3
tools/perf/arch/arm64/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 - ifndef NO_LIBDW 3 - PERF_HAVE_DWARF_REGS := 1 4 - endif 5 2 PERF_HAVE_JITDUMP := 1 6 3 HAVE_KVM_STAT_SUPPORT := 1 7 4
-4
tools/perf/arch/csky/Makefile
··· 1 - # SPDX-License-Identifier: GPL-2.0-only 2 - ifndef NO_LIBDW 3 - PERF_HAVE_DWARF_REGS := 1 4 - endif
-3
tools/perf/arch/loongarch/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 - ifndef NO_LIBDW 3 - PERF_HAVE_DWARF_REGS := 1 4 - endif 5 2 PERF_HAVE_JITDUMP := 1 6 3 HAVE_KVM_STAT_SUPPORT := 1 7 4
-4
tools/perf/arch/mips/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 - ifndef NO_LIBDW 3 - PERF_HAVE_DWARF_REGS := 1 4 - endif 5 - 6 2 # Syscall table generation for perf 7 3 out := $(OUTPUT)arch/mips/include/generated/asm 8 4 header := $(out)/syscalls_n64.c
-4
tools/perf/arch/powerpc/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 - ifndef NO_LIBDW 3 - PERF_HAVE_DWARF_REGS := 1 4 - endif 5 - 6 2 HAVE_KVM_STAT_SUPPORT := 1 7 3 PERF_HAVE_JITDUMP := 1 8 4
+1 -3
tools/perf/arch/riscv/Makefile
··· 1 - ifndef NO_LIBDW 2 - PERF_HAVE_DWARF_REGS := 1 3 - endif 1 + # SPDX-License-Identifier: GPL-2.0 4 2 PERF_HAVE_JITDUMP := 1 5 3 HAVE_KVM_STAT_SUPPORT := 1 6 4
-3
tools/perf/arch/s390/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - ifndef NO_LIBDW 3 - PERF_HAVE_DWARF_REGS := 1 4 - endif 5 2 HAVE_KVM_STAT_SUPPORT := 1 6 3 PERF_HAVE_JITDUMP := 1 7 4
-4
tools/perf/arch/sh/Makefile
··· 1 - # SPDX-License-Identifier: GPL-2.0-only 2 - ifndef NO_LIBDW 3 - PERF_HAVE_DWARF_REGS := 1 4 - endif
-4
tools/perf/arch/sparc/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - ifndef NO_LIBDW 3 - PERF_HAVE_DWARF_REGS := 1 4 - endif 5 - 6 2 PERF_HAVE_JITDUMP := 1
-3
tools/perf/arch/x86/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 - ifndef NO_LIBDW 3 - PERF_HAVE_DWARF_REGS := 1 4 - endif 5 2 HAVE_KVM_STAT_SUPPORT := 1 6 3 PERF_HAVE_JITDUMP := 1 7 4
-4
tools/perf/arch/xtensa/Makefile
··· 1 - # SPDX-License-Identifier: GPL-2.0-only 2 - ifndef NO_LIBDW 3 - PERF_HAVE_DWARF_REGS := 1 4 - endif