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

arch: sparc: Remove CONFIG_OPROFILE support

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: William Cohen <wcohen@redhat.com>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Thomas Gleixner <tglx@linutronix.de>

-101
-1
Documentation/kbuild/makefiles.rst
··· 1317 1317 libs-y += arch/sparc/lib/ 1318 1318 1319 1319 drivers-$(CONFIG_PM) += arch/sparc/power/ 1320 - drivers-$(CONFIG_OPROFILE) += arch/sparc/oprofile/ 1321 1320 1322 1321 7.5 Architecture-specific boot images 1323 1322 -------------------------------------
-1
arch/sparc/Kconfig
··· 20 20 select OF_PROMTREE 21 21 select HAVE_ASM_MODVERSIONS 22 22 select HAVE_IDE 23 - select HAVE_OPROFILE 24 23 select HAVE_ARCH_KGDB if !SMP || SPARC64 25 24 select HAVE_ARCH_TRACEHOOK 26 25 select HAVE_ARCH_SECCOMP if SPARC64
-1
arch/sparc/Makefile
··· 65 65 libs-y += arch/sparc/lib/ 66 66 67 67 drivers-$(CONFIG_PM) += arch/sparc/power/ 68 - drivers-$(CONFIG_OPROFILE) += arch/sparc/oprofile/ 69 68 70 69 boot := arch/sparc/boot 71 70
-1
arch/sparc/configs/sparc64_defconfig
··· 8 8 # CONFIG_COMPAT_BRK is not set 9 9 CONFIG_SLAB=y 10 10 CONFIG_PROFILING=y 11 - CONFIG_OPROFILE=m 12 11 CONFIG_KPROBES=y 13 12 CONFIG_MODULES=y 14 13 CONFIG_MODULE_UNLOAD=y
-10
arch/sparc/oprofile/Makefile
··· 1 - # SPDX-License-Identifier: GPL-2.0-only 2 - obj-$(CONFIG_OPROFILE) += oprofile.o 3 - 4 - DRIVER_OBJS = $(addprefix ../../../drivers/oprofile/, \ 5 - oprof.o cpu_buffer.o buffer_sync.o \ 6 - event_buffer.o oprofile_files.o \ 7 - oprofilefs.o oprofile_stats.o \ 8 - timer_int.o ) 9 - 10 - oprofile-y := $(DRIVER_OBJS) init.o
-87
arch/sparc/oprofile/init.c
··· 1 - /** 2 - * @file init.c 3 - * 4 - * @remark Copyright 2002 OProfile authors 5 - * @remark Read the file COPYING 6 - * 7 - * @author John Levon <levon@movementarian.org> 8 - */ 9 - 10 - #include <linux/kernel.h> 11 - #include <linux/oprofile.h> 12 - #include <linux/errno.h> 13 - #include <linux/init.h> 14 - #include <linux/param.h> /* for HZ */ 15 - 16 - #ifdef CONFIG_SPARC64 17 - #include <linux/notifier.h> 18 - #include <linux/rcupdate.h> 19 - #include <linux/kdebug.h> 20 - #include <asm/nmi.h> 21 - 22 - static int profile_timer_exceptions_notify(struct notifier_block *self, 23 - unsigned long val, void *data) 24 - { 25 - struct die_args *args = data; 26 - int ret = NOTIFY_DONE; 27 - 28 - switch (val) { 29 - case DIE_NMI: 30 - oprofile_add_sample(args->regs, 0); 31 - ret = NOTIFY_STOP; 32 - break; 33 - default: 34 - break; 35 - } 36 - return ret; 37 - } 38 - 39 - static struct notifier_block profile_timer_exceptions_nb = { 40 - .notifier_call = profile_timer_exceptions_notify, 41 - }; 42 - 43 - static int timer_start(void) 44 - { 45 - if (register_die_notifier(&profile_timer_exceptions_nb)) 46 - return 1; 47 - nmi_adjust_hz(HZ); 48 - return 0; 49 - } 50 - 51 - 52 - static void timer_stop(void) 53 - { 54 - nmi_adjust_hz(1); 55 - unregister_die_notifier(&profile_timer_exceptions_nb); 56 - synchronize_rcu(); /* Allow already-started NMIs to complete. */ 57 - } 58 - 59 - static int op_nmi_timer_init(struct oprofile_operations *ops) 60 - { 61 - if (atomic_read(&nmi_active) <= 0) 62 - return -ENODEV; 63 - 64 - ops->start = timer_start; 65 - ops->stop = timer_stop; 66 - ops->cpu_type = "timer"; 67 - printk(KERN_INFO "oprofile: Using perfctr NMI timer interrupt.\n"); 68 - return 0; 69 - } 70 - #endif 71 - 72 - int __init oprofile_arch_init(struct oprofile_operations *ops) 73 - { 74 - int ret = -ENODEV; 75 - 76 - #ifdef CONFIG_SPARC64 77 - ret = op_nmi_timer_init(ops); 78 - if (!ret) 79 - return ret; 80 - #endif 81 - 82 - return ret; 83 - } 84 - 85 - void oprofile_arch_exit(void) 86 - { 87 - }