Skip to content

Commit 7a3c90d

Browse files
committed
arch: powerpc: Stop building and using oprofile
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. This commits stops building oprofile for powerpc and removes any reference to it from directories in arch/powerpc/ apart from arch/powerpc/oprofile, which will be removed in the next commit (this is broken into two commits as the size of the commit became very big, ~5k lines). Note that the member "oprofile_cpu_type" in "struct cpu_spec" isn't removed as it was also used by other parts of the code. Suggested-by: Christoph Hellwig <[email protected]> Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Viresh Kumar <[email protected]> Acked-by: Robert Richter <[email protected]> Acked-by: William Cohen <[email protected]> Acked-by: Al Viro <[email protected]> Acked-by: Thomas Gleixner <[email protected]>
1 parent 7a22384 commit 7a3c90d

28 files changed

+1
-347
lines changed

arch/powerpc/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,6 @@ config PPC
226226
select HAVE_MOD_ARCH_SPECIFIC
227227
select HAVE_NMI if PERF_EVENTS || (PPC64 && PPC_BOOK3S)
228228
select HAVE_HARDLOCKUP_DETECTOR_ARCH if (PPC64 && PPC_BOOK3S)
229-
select HAVE_OPROFILE
230229
select HAVE_OPTPROBES if PPC64
231230
select HAVE_PERF_EVENTS
232231
select HAVE_PERF_EVENTS_NMI if PPC64

arch/powerpc/Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,6 @@ head-$(CONFIG_PPC_OF_BOOT_TRAMPOLINE) += arch/powerpc/kernel/prom_init.o
276276
# See arch/powerpc/Kbuild for content of core part of the kernel
277277
core-y += arch/powerpc/
278278

279-
drivers-$(CONFIG_OPROFILE) += arch/powerpc/oprofile/
280-
281279
# Default to zImage, override when needed
282280
all: zImage
283281

arch/powerpc/configs/44x/akebono_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ CONFIG_EXPERT=y
88
CONFIG_KALLSYMS_ALL=y
99
# CONFIG_SLUB_CPU_PARTIAL is not set
1010
CONFIG_PROFILING=y
11-
CONFIG_OPROFILE=y
1211
CONFIG_MODULES=y
1312
CONFIG_MODULE_UNLOAD=y
1413
# CONFIG_BLK_DEV_BSG is not set

arch/powerpc/configs/44x/currituck_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ CONFIG_LOG_BUF_SHIFT=14
66
CONFIG_EXPERT=y
77
CONFIG_KALLSYMS_ALL=y
88
CONFIG_PROFILING=y
9-
CONFIG_OPROFILE=y
109
CONFIG_MODULES=y
1110
CONFIG_MODULE_UNLOAD=y
1211
# CONFIG_BLK_DEV_BSG is not set

arch/powerpc/configs/44x/fsp2_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ CONFIG_KALLSYMS_ALL=y
1717
CONFIG_BPF_SYSCALL=y
1818
CONFIG_EMBEDDED=y
1919
CONFIG_PROFILING=y
20-
CONFIG_OPROFILE=y
2120
CONFIG_MODULES=y
2221
CONFIG_MODULE_UNLOAD=y
2322
# CONFIG_BLK_DEV_BSG is not set

arch/powerpc/configs/44x/iss476-smp_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ CONFIG_BLK_DEV_INITRD=y
77
CONFIG_EXPERT=y
88
CONFIG_KALLSYMS_ALL=y
99
CONFIG_PROFILING=y
10-
CONFIG_OPROFILE=y
1110
CONFIG_MODULES=y
1211
CONFIG_MODULE_UNLOAD=y
1312
# CONFIG_BLK_DEV_BSG is not set

arch/powerpc/configs/cell_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ CONFIG_CPUSETS=y
1414
CONFIG_BLK_DEV_INITRD=y
1515
# CONFIG_COMPAT_BRK is not set
1616
CONFIG_PROFILING=y
17-
CONFIG_OPROFILE=m
1817
CONFIG_MODULES=y
1918
CONFIG_MODULE_UNLOAD=y
2019
CONFIG_PARTITION_ADVANCED=y

arch/powerpc/configs/g5_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ CONFIG_CGROUPS=y
1212
CONFIG_BLK_DEV_INITRD=y
1313
# CONFIG_COMPAT_BRK is not set
1414
CONFIG_PROFILING=y
15-
CONFIG_OPROFILE=y
1615
CONFIG_MODULES=y
1716
CONFIG_MODULE_UNLOAD=y
1817
CONFIG_MODVERSIONS=y

arch/powerpc/configs/maple_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ CONFIG_IKCONFIG=y
99
CONFIG_IKCONFIG_PROC=y
1010
# CONFIG_COMPAT_BRK is not set
1111
CONFIG_PROFILING=y
12-
CONFIG_OPROFILE=m
1312
CONFIG_KPROBES=y
1413
CONFIG_MODULES=y
1514
CONFIG_MODULE_UNLOAD=y

arch/powerpc/configs/pasemi_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ CONFIG_NO_HZ=y
77
CONFIG_HIGH_RES_TIMERS=y
88
CONFIG_BLK_DEV_INITRD=y
99
CONFIG_PROFILING=y
10-
CONFIG_OPROFILE=y
1110
CONFIG_MODULES=y
1211
CONFIG_MODULE_UNLOAD=y
1312
# CONFIG_BLK_DEV_BSG is not set

arch/powerpc/configs/pmac32_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ CONFIG_LOG_BUF_SHIFT=14
1010
CONFIG_BLK_DEV_INITRD=y
1111
# CONFIG_COMPAT_BRK is not set
1212
CONFIG_PROFILING=y
13-
CONFIG_OPROFILE=y
1413
CONFIG_MODULES=y
1514
CONFIG_MODULE_UNLOAD=y
1615
CONFIG_MODULE_FORCE_UNLOAD=y

arch/powerpc/configs/powernv_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ CONFIG_BLK_DEV_INITRD=y
3030
CONFIG_BPF_SYSCALL=y
3131
# CONFIG_COMPAT_BRK is not set
3232
CONFIG_PROFILING=y
33-
CONFIG_OPROFILE=m
3433
CONFIG_KPROBES=y
3534
CONFIG_JUMP_LABEL=y
3635
CONFIG_MODULES=y

arch/powerpc/configs/ppc64_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ CONFIG_VIRTUALIZATION=y
6262
CONFIG_KVM_BOOK3S_64=m
6363
CONFIG_KVM_BOOK3S_64_HV=m
6464
CONFIG_VHOST_NET=m
65-
CONFIG_OPROFILE=m
6665
CONFIG_KPROBES=y
6766
CONFIG_JUMP_LABEL=y
6867
CONFIG_MODULES=y

arch/powerpc/configs/ppc64e_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ CONFIG_CPUSETS=y
1414
CONFIG_BLK_DEV_INITRD=y
1515
# CONFIG_COMPAT_BRK is not set
1616
CONFIG_PROFILING=y
17-
CONFIG_OPROFILE=y
1817
CONFIG_MODULES=y
1918
CONFIG_MODULE_UNLOAD=y
2019
CONFIG_MODVERSIONS=y

arch/powerpc/configs/ppc6xx_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ CONFIG_USER_NS=y
1919
CONFIG_BLK_DEV_INITRD=y
2020
# CONFIG_COMPAT_BRK is not set
2121
CONFIG_PROFILING=y
22-
CONFIG_OPROFILE=m
2322
CONFIG_KPROBES=y
2423
CONFIG_MODULES=y
2524
CONFIG_MODULE_UNLOAD=y

arch/powerpc/configs/ps3_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ CONFIG_EMBEDDED=y
1313
# CONFIG_COMPAT_BRK is not set
1414
CONFIG_SLAB=y
1515
CONFIG_PROFILING=y
16-
CONFIG_OPROFILE=m
1716
CONFIG_MODULES=y
1817
CONFIG_MODULE_UNLOAD=y
1918
# CONFIG_PPC_POWERNV is not set

arch/powerpc/configs/pseries_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ CONFIG_BLK_DEV_INITRD=y
2929
CONFIG_BPF_SYSCALL=y
3030
# CONFIG_COMPAT_BRK is not set
3131
CONFIG_PROFILING=y
32-
CONFIG_OPROFILE=m
3332
CONFIG_KPROBES=y
3433
CONFIG_JUMP_LABEL=y
3534
CONFIG_MODULES=y

arch/powerpc/include/asm/cputable.h

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,6 @@ struct cpu_spec;
1717
typedef void (*cpu_setup_t)(unsigned long offset, struct cpu_spec* spec);
1818
typedef void (*cpu_restore_t)(void);
1919

20-
enum powerpc_oprofile_type {
21-
PPC_OPROFILE_INVALID = 0,
22-
PPC_OPROFILE_RS64 = 1,
23-
PPC_OPROFILE_POWER4 = 2,
24-
PPC_OPROFILE_G4 = 3,
25-
PPC_OPROFILE_FSL_EMB = 4,
26-
PPC_OPROFILE_CELL = 5,
27-
PPC_OPROFILE_PA6T = 6,
28-
};
29-
3020
enum powerpc_pmc_type {
3121
PPC_PMC_DEFAULT = 0,
3222
PPC_PMC_IBM = 1,
@@ -83,16 +73,6 @@ struct cpu_spec {
8373
/* Used by oprofile userspace to select the right counters */
8474
char *oprofile_cpu_type;
8575

86-
/* Processor specific oprofile operations */
87-
enum powerpc_oprofile_type oprofile_type;
88-
89-
/* Bit locations inside the mmcra change */
90-
unsigned long oprofile_mmcra_sihv;
91-
unsigned long oprofile_mmcra_sipr;
92-
93-
/* Bits to clear during an oprofile exception */
94-
unsigned long oprofile_mmcra_clear;
95-
9676
/* Name of processor class, for the ELF AT_PLATFORM entry */
9777
char *platform;
9878

arch/powerpc/include/asm/oprofile_impl.h

Lines changed: 0 additions & 135 deletions
This file was deleted.

arch/powerpc/include/asm/spu.h

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -201,20 +201,6 @@ int spu_64k_pages_available(void);
201201
struct mm_struct;
202202
extern void spu_flush_all_slbs(struct mm_struct *mm);
203203

204-
/* This interface allows a profiler (e.g., OProfile) to store a ref
205-
* to spu context information that it creates. This caching technique
206-
* avoids the need to recreate this information after a save/restore operation.
207-
*
208-
* Assumes the caller has already incremented the ref count to
209-
* profile_info; then spu_context_destroy must call kref_put
210-
* on prof_info_kref.
211-
*/
212-
void spu_set_profile_private_kref(struct spu_context *ctx,
213-
struct kref *prof_info_kref,
214-
void ( * prof_info_release) (struct kref *kref));
215-
216-
void *spu_get_profile_private_kref(struct spu_context *ctx);
217-
218204
/* system callbacks from the SPU */
219205
struct spu_syscall_block {
220206
u64 nr_ret;
@@ -266,25 +252,6 @@ void spu_remove_dev_attr(struct device_attribute *attr);
266252
int spu_add_dev_attr_group(struct attribute_group *attrs);
267253
void spu_remove_dev_attr_group(struct attribute_group *attrs);
268254

269-
/*
270-
* Notifier blocks:
271-
*
272-
* oprofile can get notified when a context switch is performed
273-
* on an spe. The notifer function that gets called is passed
274-
* a pointer to the SPU structure as well as the object-id that
275-
* identifies the binary running on that SPU now.
276-
*
277-
* For a context save, the object-id that is passed is zero,
278-
* identifying that the kernel will run from that moment on.
279-
*
280-
* For a context restore, the object-id is the value written
281-
* to object-id spufs file from user space and the notifer
282-
* function can assume that spu->ctx is valid.
283-
*/
284-
struct notifier_block;
285-
int spu_switch_event_register(struct notifier_block * n);
286-
int spu_switch_event_unregister(struct notifier_block * n);
287-
288255
extern void notify_spus_active(void);
289256
extern void do_notify_spus_active(void);
290257

0 commit comments

Comments
 (0)