arch: s390: Remove CONFIG_OPROFILE support
authorViresh Kumar <viresh.kumar@linaro.org>
Thu, 14 Jan 2021 11:35:25 +0000 (17:05 +0530)
committerViresh Kumar <viresh.kumar@linaro.org>
Fri, 29 Jan 2021 04:35:51 +0000 (10:05 +0530)
The "oprofile" user-space tools don't use the kernel OPROFILE support
any more, and haven't in a long time. User-space has been converted to
the perf interfaces.

Remove the old oprofile's architecture specific support.

Suggested-by: Christoph Hellwig <hch@infradead.org>
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Robert Richter <rric@kernel.org>
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Acked-by: William Cohen <wcohen@redhat.com>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
arch/s390/Kconfig
arch/s390/Makefile
arch/s390/configs/debug_defconfig
arch/s390/configs/defconfig
arch/s390/oprofile/Makefile [deleted file]
arch/s390/oprofile/init.c [deleted file]

index c72874f..f84444e 100644 (file)
@@ -174,7 +174,6 @@ config S390
        select HAVE_MOD_ARCH_SPECIFIC
        select HAVE_NMI
        select HAVE_NOP_MCOUNT
-       select HAVE_OPROFILE
        select HAVE_PCI
        select HAVE_PERF_EVENTS
        select HAVE_PERF_REGS
index 8db267d..e443ed9 100644 (file)
@@ -134,9 +134,6 @@ core-y              += arch/s390/
 libs-y         += arch/s390/lib/
 drivers-y      += drivers/s390/
 
-# must be linked after kernel
-drivers-$(CONFIG_OPROFILE)     += arch/s390/oprofile/
-
 boot           := arch/s390/boot
 syscalls       := arch/s390/kernel/syscalls
 tools          := arch/s390/tools
index c4f6ff9..8b94347 100644 (file)
@@ -57,7 +57,6 @@ CONFIG_CMM=m
 CONFIG_APPLDATA_BASE=y
 CONFIG_KVM=m
 CONFIG_S390_UNWIND_SELFTEST=y
-CONFIG_OPROFILE=m
 CONFIG_KPROBES=y
 CONFIG_JUMP_LABEL=y
 CONFIG_STATIC_KEYS_SELFTEST=y
index 5113589..9db1232 100644 (file)
@@ -55,7 +55,6 @@ CONFIG_CMM=m
 CONFIG_APPLDATA_BASE=y
 CONFIG_KVM=m
 CONFIG_S390_UNWIND_SELFTEST=m
-CONFIG_OPROFILE=m
 CONFIG_KPROBES=y
 CONFIG_JUMP_LABEL=y
 # CONFIG_GCC_PLUGINS is not set
diff --git a/arch/s390/oprofile/Makefile b/arch/s390/oprofile/Makefile
deleted file mode 100644 (file)
index 36261f9..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-obj-$(CONFIG_OPROFILE) += oprofile.o
-
-DRIVER_OBJS = $(addprefix ../../../drivers/oprofile/, \
-               oprof.o cpu_buffer.o buffer_sync.o \
-               event_buffer.o oprofile_files.o \
-               oprofilefs.o oprofile_stats.o  \
-               timer_int.o )
-
-oprofile-y :=  $(DRIVER_OBJS) init.o
diff --git a/arch/s390/oprofile/init.c b/arch/s390/oprofile/init.c
deleted file mode 100644 (file)
index 7441857..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- * S390 Version
- *   Copyright IBM Corp. 2002, 2011
- *   Author(s): Thomas Spatzier (tspat@de.ibm.com)
- *   Author(s): Mahesh Salgaonkar (mahesh@linux.vnet.ibm.com)
- *   Author(s): Heinz Graalfs (graalfs@linux.vnet.ibm.com)
- *   Author(s): Andreas Krebbel (krebbel@linux.vnet.ibm.com)
- *
- * @remark Copyright 2002-2011 OProfile authors
- */
-
-#include <linux/oprofile.h>
-#include <linux/init.h>
-#include <asm/processor.h>
-#include <asm/unwind.h>
-
-static void s390_backtrace(struct pt_regs *regs, unsigned int depth)
-{
-       struct unwind_state state;
-
-       unwind_for_each_frame(&state, current, regs, 0) {
-               if (depth-- == 0)
-                       break;
-               oprofile_add_trace(state.ip);
-       }
-}
-
-int __init oprofile_arch_init(struct oprofile_operations *ops)
-{
-       ops->backtrace = s390_backtrace;
-       return 0;
-}
-
-void oprofile_arch_exit(void)
-{
-}