Commit 81901fc0 authored by Leo Yan's avatar Leo Yan Committed by Namhyung Kim

perf build: Cleanup perf register configuration

The target is to allow the tool to always enable the perf register
feature for native parsing and cross parsing, and current code doesn't
depend on the macro 'HAVE_PERF_REGS_SUPPORT'.

This patch remove the variable 'NO_PERF_REGS' and the defined macro
'HAVE_PERF_REGS_SUPPORT' from the Makefile.
Signed-off-by: default avatarLeo Yan <leo.yan@linux.dev>
Reviewed-by: default avatarIan Rogers <irogers@google.com>
Cc: James Clark <james.clark@arm.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Albert Ou <aou@eecs.berkeley.edu>
Cc: Huacai Chen <chenhuacai@kernel.org>
Cc: Guo Ren <guoren@kernel.org>
Cc: Will Deacon <will@kernel.org>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Ming Wang <wangming01@loongson.cn>
Cc: John Garry <john.g.garry@oracle.com>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: linux-csky@vger.kernel.org
Cc: linux-riscv@lists.infradead.org
Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20240214113947.240957-5-leo.yan@linux.dev
parent 9a4e47ef
...@@ -28,8 +28,6 @@ include $(srctree)/tools/scripts/Makefile.arch ...@@ -28,8 +28,6 @@ include $(srctree)/tools/scripts/Makefile.arch
$(call detected_var,SRCARCH) $(call detected_var,SRCARCH)
NO_PERF_REGS := 1
ifneq ($(NO_SYSCALL_TABLE),1) ifneq ($(NO_SYSCALL_TABLE),1)
NO_SYSCALL_TABLE := 1 NO_SYSCALL_TABLE := 1
...@@ -50,7 +48,6 @@ endif ...@@ -50,7 +48,6 @@ endif
# Additional ARCH settings for ppc # Additional ARCH settings for ppc
ifeq ($(SRCARCH),powerpc) ifeq ($(SRCARCH),powerpc)
NO_PERF_REGS := 0
CFLAGS += -I$(OUTPUT)arch/powerpc/include/generated CFLAGS += -I$(OUTPUT)arch/powerpc/include/generated
LIBUNWIND_LIBS := -lunwind -lunwind-ppc64 LIBUNWIND_LIBS := -lunwind -lunwind-ppc64
endif endif
...@@ -66,41 +63,27 @@ ifeq ($(SRCARCH),x86) ...@@ -66,41 +63,27 @@ ifeq ($(SRCARCH),x86)
else else
LIBUNWIND_LIBS = -lunwind-x86 -llzma -lunwind LIBUNWIND_LIBS = -lunwind-x86 -llzma -lunwind
endif endif
NO_PERF_REGS := 0
endif endif
ifeq ($(SRCARCH),arm) ifeq ($(SRCARCH),arm)
NO_PERF_REGS := 0
LIBUNWIND_LIBS = -lunwind -lunwind-arm LIBUNWIND_LIBS = -lunwind -lunwind-arm
endif endif
ifeq ($(SRCARCH),arm64) ifeq ($(SRCARCH),arm64)
NO_PERF_REGS := 0
CFLAGS += -I$(OUTPUT)arch/arm64/include/generated CFLAGS += -I$(OUTPUT)arch/arm64/include/generated
LIBUNWIND_LIBS = -lunwind -lunwind-aarch64 LIBUNWIND_LIBS = -lunwind -lunwind-aarch64
endif endif
ifeq ($(SRCARCH),loongarch) ifeq ($(SRCARCH),loongarch)
NO_PERF_REGS := 0
CFLAGS += -I$(OUTPUT)arch/loongarch/include/generated CFLAGS += -I$(OUTPUT)arch/loongarch/include/generated
LIBUNWIND_LIBS = -lunwind -lunwind-loongarch64 LIBUNWIND_LIBS = -lunwind -lunwind-loongarch64
endif endif
ifeq ($(SRCARCH),riscv)
NO_PERF_REGS := 0
endif
ifeq ($(SRCARCH),csky)
NO_PERF_REGS := 0
endif
ifeq ($(ARCH),s390) ifeq ($(ARCH),s390)
NO_PERF_REGS := 0
CFLAGS += -fPIC -I$(OUTPUT)arch/s390/include/generated CFLAGS += -fPIC -I$(OUTPUT)arch/s390/include/generated
endif endif
ifeq ($(ARCH),mips) ifeq ($(ARCH),mips)
NO_PERF_REGS := 0
CFLAGS += -I$(OUTPUT)arch/mips/include/generated CFLAGS += -I$(OUTPUT)arch/mips/include/generated
LIBUNWIND_LIBS = -lunwind -lunwind-mips LIBUNWIND_LIBS = -lunwind -lunwind-mips
endif endif
...@@ -161,10 +144,6 @@ endif ...@@ -161,10 +144,6 @@ endif
FEATURE_CHECK_CFLAGS-libopencsd := $(LIBOPENCSD_CFLAGS) FEATURE_CHECK_CFLAGS-libopencsd := $(LIBOPENCSD_CFLAGS)
FEATURE_CHECK_LDFLAGS-libopencsd := $(LIBOPENCSD_LDFLAGS) $(OPENCSDLIBS) FEATURE_CHECK_LDFLAGS-libopencsd := $(LIBOPENCSD_LDFLAGS) $(OPENCSDLIBS)
ifeq ($(NO_PERF_REGS),0)
CFLAGS += -DHAVE_PERF_REGS_SUPPORT
endif
# for linking with debug library, run like: # for linking with debug library, run like:
# make DEBUG=1 LIBDW_DIR=/opt/libdw/ # make DEBUG=1 LIBDW_DIR=/opt/libdw/
ifdef LIBDW_DIR ifdef LIBDW_DIR
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment