Commit 7a3c90df authored by Viresh Kumar's avatar Viresh Kumar

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: default avatarChristoph Hellwig <hch@infradead.org>
Suggested-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Acked-by: default avatarRobert Richter <rric@kernel.org>
Acked-by: default avatarWilliam Cohen <wcohen@redhat.com>
Acked-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 7a22384d
...@@ -226,7 +226,6 @@ config PPC ...@@ -226,7 +226,6 @@ config PPC
select HAVE_MOD_ARCH_SPECIFIC select HAVE_MOD_ARCH_SPECIFIC
select HAVE_NMI if PERF_EVENTS || (PPC64 && PPC_BOOK3S) select HAVE_NMI if PERF_EVENTS || (PPC64 && PPC_BOOK3S)
select HAVE_HARDLOCKUP_DETECTOR_ARCH if (PPC64 && PPC_BOOK3S) select HAVE_HARDLOCKUP_DETECTOR_ARCH if (PPC64 && PPC_BOOK3S)
select HAVE_OPROFILE
select HAVE_OPTPROBES if PPC64 select HAVE_OPTPROBES if PPC64
select HAVE_PERF_EVENTS select HAVE_PERF_EVENTS
select HAVE_PERF_EVENTS_NMI if PPC64 select HAVE_PERF_EVENTS_NMI if PPC64
......
...@@ -276,8 +276,6 @@ head-$(CONFIG_PPC_OF_BOOT_TRAMPOLINE) += arch/powerpc/kernel/prom_init.o ...@@ -276,8 +276,6 @@ head-$(CONFIG_PPC_OF_BOOT_TRAMPOLINE) += arch/powerpc/kernel/prom_init.o
# See arch/powerpc/Kbuild for content of core part of the kernel # See arch/powerpc/Kbuild for content of core part of the kernel
core-y += arch/powerpc/ core-y += arch/powerpc/
drivers-$(CONFIG_OPROFILE) += arch/powerpc/oprofile/
# Default to zImage, override when needed # Default to zImage, override when needed
all: zImage all: zImage
......
...@@ -8,7 +8,6 @@ CONFIG_EXPERT=y ...@@ -8,7 +8,6 @@ CONFIG_EXPERT=y
CONFIG_KALLSYMS_ALL=y CONFIG_KALLSYMS_ALL=y
# CONFIG_SLUB_CPU_PARTIAL is not set # CONFIG_SLUB_CPU_PARTIAL is not set
CONFIG_PROFILING=y CONFIG_PROFILING=y
CONFIG_OPROFILE=y
CONFIG_MODULES=y CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y CONFIG_MODULE_UNLOAD=y
# CONFIG_BLK_DEV_BSG is not set # CONFIG_BLK_DEV_BSG is not set
......
...@@ -6,7 +6,6 @@ CONFIG_LOG_BUF_SHIFT=14 ...@@ -6,7 +6,6 @@ CONFIG_LOG_BUF_SHIFT=14
CONFIG_EXPERT=y CONFIG_EXPERT=y
CONFIG_KALLSYMS_ALL=y CONFIG_KALLSYMS_ALL=y
CONFIG_PROFILING=y CONFIG_PROFILING=y
CONFIG_OPROFILE=y
CONFIG_MODULES=y CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y CONFIG_MODULE_UNLOAD=y
# CONFIG_BLK_DEV_BSG is not set # CONFIG_BLK_DEV_BSG is not set
......
...@@ -17,7 +17,6 @@ CONFIG_KALLSYMS_ALL=y ...@@ -17,7 +17,6 @@ CONFIG_KALLSYMS_ALL=y
CONFIG_BPF_SYSCALL=y CONFIG_BPF_SYSCALL=y
CONFIG_EMBEDDED=y CONFIG_EMBEDDED=y
CONFIG_PROFILING=y CONFIG_PROFILING=y
CONFIG_OPROFILE=y
CONFIG_MODULES=y CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y CONFIG_MODULE_UNLOAD=y
# CONFIG_BLK_DEV_BSG is not set # CONFIG_BLK_DEV_BSG is not set
......
...@@ -7,7 +7,6 @@ CONFIG_BLK_DEV_INITRD=y ...@@ -7,7 +7,6 @@ CONFIG_BLK_DEV_INITRD=y
CONFIG_EXPERT=y CONFIG_EXPERT=y
CONFIG_KALLSYMS_ALL=y CONFIG_KALLSYMS_ALL=y
CONFIG_PROFILING=y CONFIG_PROFILING=y
CONFIG_OPROFILE=y
CONFIG_MODULES=y CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y CONFIG_MODULE_UNLOAD=y
# CONFIG_BLK_DEV_BSG is not set # CONFIG_BLK_DEV_BSG is not set
......
...@@ -14,7 +14,6 @@ CONFIG_CPUSETS=y ...@@ -14,7 +14,6 @@ CONFIG_CPUSETS=y
CONFIG_BLK_DEV_INITRD=y CONFIG_BLK_DEV_INITRD=y
# CONFIG_COMPAT_BRK is not set # CONFIG_COMPAT_BRK is not set
CONFIG_PROFILING=y CONFIG_PROFILING=y
CONFIG_OPROFILE=m
CONFIG_MODULES=y CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y CONFIG_MODULE_UNLOAD=y
CONFIG_PARTITION_ADVANCED=y CONFIG_PARTITION_ADVANCED=y
......
...@@ -12,7 +12,6 @@ CONFIG_CGROUPS=y ...@@ -12,7 +12,6 @@ CONFIG_CGROUPS=y
CONFIG_BLK_DEV_INITRD=y CONFIG_BLK_DEV_INITRD=y
# CONFIG_COMPAT_BRK is not set # CONFIG_COMPAT_BRK is not set
CONFIG_PROFILING=y CONFIG_PROFILING=y
CONFIG_OPROFILE=y
CONFIG_MODULES=y CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y CONFIG_MODULE_UNLOAD=y
CONFIG_MODVERSIONS=y CONFIG_MODVERSIONS=y
......
...@@ -9,7 +9,6 @@ CONFIG_IKCONFIG=y ...@@ -9,7 +9,6 @@ CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y CONFIG_IKCONFIG_PROC=y
# CONFIG_COMPAT_BRK is not set # CONFIG_COMPAT_BRK is not set
CONFIG_PROFILING=y CONFIG_PROFILING=y
CONFIG_OPROFILE=m
CONFIG_KPROBES=y CONFIG_KPROBES=y
CONFIG_MODULES=y CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y CONFIG_MODULE_UNLOAD=y
......
...@@ -7,7 +7,6 @@ CONFIG_NO_HZ=y ...@@ -7,7 +7,6 @@ CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y CONFIG_HIGH_RES_TIMERS=y
CONFIG_BLK_DEV_INITRD=y CONFIG_BLK_DEV_INITRD=y
CONFIG_PROFILING=y CONFIG_PROFILING=y
CONFIG_OPROFILE=y
CONFIG_MODULES=y CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y CONFIG_MODULE_UNLOAD=y
# CONFIG_BLK_DEV_BSG is not set # CONFIG_BLK_DEV_BSG is not set
......
...@@ -10,7 +10,6 @@ CONFIG_LOG_BUF_SHIFT=14 ...@@ -10,7 +10,6 @@ CONFIG_LOG_BUF_SHIFT=14
CONFIG_BLK_DEV_INITRD=y CONFIG_BLK_DEV_INITRD=y
# CONFIG_COMPAT_BRK is not set # CONFIG_COMPAT_BRK is not set
CONFIG_PROFILING=y CONFIG_PROFILING=y
CONFIG_OPROFILE=y
CONFIG_MODULES=y CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_FORCE_UNLOAD=y CONFIG_MODULE_FORCE_UNLOAD=y
......
...@@ -30,7 +30,6 @@ CONFIG_BLK_DEV_INITRD=y ...@@ -30,7 +30,6 @@ CONFIG_BLK_DEV_INITRD=y
CONFIG_BPF_SYSCALL=y CONFIG_BPF_SYSCALL=y
# CONFIG_COMPAT_BRK is not set # CONFIG_COMPAT_BRK is not set
CONFIG_PROFILING=y CONFIG_PROFILING=y
CONFIG_OPROFILE=m
CONFIG_KPROBES=y CONFIG_KPROBES=y
CONFIG_JUMP_LABEL=y CONFIG_JUMP_LABEL=y
CONFIG_MODULES=y CONFIG_MODULES=y
......
...@@ -62,7 +62,6 @@ CONFIG_VIRTUALIZATION=y ...@@ -62,7 +62,6 @@ CONFIG_VIRTUALIZATION=y
CONFIG_KVM_BOOK3S_64=m CONFIG_KVM_BOOK3S_64=m
CONFIG_KVM_BOOK3S_64_HV=m CONFIG_KVM_BOOK3S_64_HV=m
CONFIG_VHOST_NET=m CONFIG_VHOST_NET=m
CONFIG_OPROFILE=m
CONFIG_KPROBES=y CONFIG_KPROBES=y
CONFIG_JUMP_LABEL=y CONFIG_JUMP_LABEL=y
CONFIG_MODULES=y CONFIG_MODULES=y
......
...@@ -14,7 +14,6 @@ CONFIG_CPUSETS=y ...@@ -14,7 +14,6 @@ CONFIG_CPUSETS=y
CONFIG_BLK_DEV_INITRD=y CONFIG_BLK_DEV_INITRD=y
# CONFIG_COMPAT_BRK is not set # CONFIG_COMPAT_BRK is not set
CONFIG_PROFILING=y CONFIG_PROFILING=y
CONFIG_OPROFILE=y
CONFIG_MODULES=y CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y CONFIG_MODULE_UNLOAD=y
CONFIG_MODVERSIONS=y CONFIG_MODVERSIONS=y
......
...@@ -19,7 +19,6 @@ CONFIG_USER_NS=y ...@@ -19,7 +19,6 @@ CONFIG_USER_NS=y
CONFIG_BLK_DEV_INITRD=y CONFIG_BLK_DEV_INITRD=y
# CONFIG_COMPAT_BRK is not set # CONFIG_COMPAT_BRK is not set
CONFIG_PROFILING=y CONFIG_PROFILING=y
CONFIG_OPROFILE=m
CONFIG_KPROBES=y CONFIG_KPROBES=y
CONFIG_MODULES=y CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y CONFIG_MODULE_UNLOAD=y
......
...@@ -13,7 +13,6 @@ CONFIG_EMBEDDED=y ...@@ -13,7 +13,6 @@ CONFIG_EMBEDDED=y
# CONFIG_COMPAT_BRK is not set # CONFIG_COMPAT_BRK is not set
CONFIG_SLAB=y CONFIG_SLAB=y
CONFIG_PROFILING=y CONFIG_PROFILING=y
CONFIG_OPROFILE=m
CONFIG_MODULES=y CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y CONFIG_MODULE_UNLOAD=y
# CONFIG_PPC_POWERNV is not set # CONFIG_PPC_POWERNV is not set
......
...@@ -29,7 +29,6 @@ CONFIG_BLK_DEV_INITRD=y ...@@ -29,7 +29,6 @@ CONFIG_BLK_DEV_INITRD=y
CONFIG_BPF_SYSCALL=y CONFIG_BPF_SYSCALL=y
# CONFIG_COMPAT_BRK is not set # CONFIG_COMPAT_BRK is not set
CONFIG_PROFILING=y CONFIG_PROFILING=y
CONFIG_OPROFILE=m
CONFIG_KPROBES=y CONFIG_KPROBES=y
CONFIG_JUMP_LABEL=y CONFIG_JUMP_LABEL=y
CONFIG_MODULES=y CONFIG_MODULES=y
......
...@@ -17,16 +17,6 @@ struct cpu_spec; ...@@ -17,16 +17,6 @@ struct cpu_spec;
typedef void (*cpu_setup_t)(unsigned long offset, struct cpu_spec* spec); typedef void (*cpu_setup_t)(unsigned long offset, struct cpu_spec* spec);
typedef void (*cpu_restore_t)(void); typedef void (*cpu_restore_t)(void);
enum powerpc_oprofile_type {
PPC_OPROFILE_INVALID = 0,
PPC_OPROFILE_RS64 = 1,
PPC_OPROFILE_POWER4 = 2,
PPC_OPROFILE_G4 = 3,
PPC_OPROFILE_FSL_EMB = 4,
PPC_OPROFILE_CELL = 5,
PPC_OPROFILE_PA6T = 6,
};
enum powerpc_pmc_type { enum powerpc_pmc_type {
PPC_PMC_DEFAULT = 0, PPC_PMC_DEFAULT = 0,
PPC_PMC_IBM = 1, PPC_PMC_IBM = 1,
...@@ -83,16 +73,6 @@ struct cpu_spec { ...@@ -83,16 +73,6 @@ struct cpu_spec {
/* Used by oprofile userspace to select the right counters */ /* Used by oprofile userspace to select the right counters */
char *oprofile_cpu_type; char *oprofile_cpu_type;
/* Processor specific oprofile operations */
enum powerpc_oprofile_type oprofile_type;
/* Bit locations inside the mmcra change */
unsigned long oprofile_mmcra_sihv;
unsigned long oprofile_mmcra_sipr;
/* Bits to clear during an oprofile exception */
unsigned long oprofile_mmcra_clear;
/* Name of processor class, for the ELF AT_PLATFORM entry */ /* Name of processor class, for the ELF AT_PLATFORM entry */
char *platform; char *platform;
......
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright (C) 2004 Anton Blanchard <anton@au.ibm.com>, IBM
*
* Based on alpha version.
*/
#ifndef _ASM_POWERPC_OPROFILE_IMPL_H
#define _ASM_POWERPC_OPROFILE_IMPL_H
#ifdef __KERNEL__
#define OP_MAX_COUNTER 8
/* Per-counter configuration as set via oprofilefs. */
struct op_counter_config {
unsigned long enabled;
unsigned long event;
unsigned long count;
/* Classic doesn't support per-counter user/kernel selection */
unsigned long kernel;
unsigned long user;
unsigned long unit_mask;
};
/* System-wide configuration as set via oprofilefs. */
struct op_system_config {
#ifdef CONFIG_PPC64
unsigned long mmcr0;
unsigned long mmcr1;
unsigned long mmcra;
#ifdef CONFIG_OPROFILE_CELL
/* Register for oprofile user tool to check cell kernel profiling
* support.
*/
unsigned long cell_support;
#endif
#endif
unsigned long enable_kernel;
unsigned long enable_user;
};
/* Per-arch configuration */
struct op_powerpc_model {
int (*reg_setup) (struct op_counter_config *,
struct op_system_config *,
int num_counters);
int (*cpu_setup) (struct op_counter_config *);
int (*start) (struct op_counter_config *);
int (*global_start) (struct op_counter_config *);
void (*stop) (void);
void (*global_stop) (void);
int (*sync_start)(void);
int (*sync_stop)(void);
void (*handle_interrupt) (struct pt_regs *,
struct op_counter_config *);
int num_counters;
};
extern struct op_powerpc_model op_model_fsl_emb;
extern struct op_powerpc_model op_model_power4;
extern struct op_powerpc_model op_model_7450;
extern struct op_powerpc_model op_model_cell;
extern struct op_powerpc_model op_model_pa6t;
/* All the classic PPC parts use these */
static inline unsigned int classic_ctr_read(unsigned int i)
{
switch(i) {
case 0:
return mfspr(SPRN_PMC1);
case 1:
return mfspr(SPRN_PMC2);
case 2:
return mfspr(SPRN_PMC3);
case 3:
return mfspr(SPRN_PMC4);
case 4:
return mfspr(SPRN_PMC5);
case 5:
return mfspr(SPRN_PMC6);
/* No PPC32 chip has more than 6 so far */
#ifdef CONFIG_PPC64
case 6:
return mfspr(SPRN_PMC7);
case 7:
return mfspr(SPRN_PMC8);
#endif
default:
return 0;
}
}
static inline void classic_ctr_write(unsigned int i, unsigned int val)
{
switch(i) {
case 0:
mtspr(SPRN_PMC1, val);
break;
case 1:
mtspr(SPRN_PMC2, val);
break;
case 2:
mtspr(SPRN_PMC3, val);
break;
case 3:
mtspr(SPRN_PMC4, val);
break;
case 4:
mtspr(SPRN_PMC5, val);
break;
case 5:
mtspr(SPRN_PMC6, val);
break;
/* No PPC32 chip has more than 6, yet */
#ifdef CONFIG_PPC64
case 6:
mtspr(SPRN_PMC7, val);
break;
case 7:
mtspr(SPRN_PMC8, val);
break;
#endif
default:
break;
}
}
extern void op_powerpc_backtrace(struct pt_regs * const regs, unsigned int depth);
#endif /* __KERNEL__ */
#endif /* _ASM_POWERPC_OPROFILE_IMPL_H */
...@@ -201,20 +201,6 @@ int spu_64k_pages_available(void); ...@@ -201,20 +201,6 @@ int spu_64k_pages_available(void);
struct mm_struct; struct mm_struct;
extern void spu_flush_all_slbs(struct mm_struct *mm); extern void spu_flush_all_slbs(struct mm_struct *mm);
/* This interface allows a profiler (e.g., OProfile) to store a ref
* to spu context information that it creates. This caching technique
* avoids the need to recreate this information after a save/restore operation.
*
* Assumes the caller has already incremented the ref count to
* profile_info; then spu_context_destroy must call kref_put
* on prof_info_kref.
*/
void spu_set_profile_private_kref(struct spu_context *ctx,
struct kref *prof_info_kref,
void ( * prof_info_release) (struct kref *kref));
void *spu_get_profile_private_kref(struct spu_context *ctx);
/* system callbacks from the SPU */ /* system callbacks from the SPU */
struct spu_syscall_block { struct spu_syscall_block {
u64 nr_ret; u64 nr_ret;
...@@ -266,25 +252,6 @@ void spu_remove_dev_attr(struct device_attribute *attr); ...@@ -266,25 +252,6 @@ void spu_remove_dev_attr(struct device_attribute *attr);
int spu_add_dev_attr_group(struct attribute_group *attrs); int spu_add_dev_attr_group(struct attribute_group *attrs);
void spu_remove_dev_attr_group(struct attribute_group *attrs); void spu_remove_dev_attr_group(struct attribute_group *attrs);
/*
* Notifier blocks:
*
* oprofile can get notified when a context switch is performed
* on an spe. The notifer function that gets called is passed
* a pointer to the SPU structure as well as the object-id that
* identifies the binary running on that SPU now.
*
* For a context save, the object-id that is passed is zero,
* identifying that the kernel will run from that moment on.
*
* For a context restore, the object-id is the value written
* to object-id spufs file from user space and the notifer
* function can assume that spu->ctx is valid.
*/
struct notifier_block;
int spu_switch_event_register(struct notifier_block * n);
int spu_switch_event_unregister(struct notifier_block * n);
extern void notify_spus_active(void); extern void notify_spus_active(void);
extern void do_notify_spus_active(void); extern void do_notify_spus_active(void);
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
#include <linux/export.h> #include <linux/export.h>
#include <linux/jump_label.h> #include <linux/jump_label.h>
#include <asm/oprofile_impl.h>
#include <asm/cputable.h> #include <asm/cputable.h>
#include <asm/prom.h> /* for PTRRELOC on ARCH=ppc */ #include <asm/prom.h> /* for PTRRELOC on ARCH=ppc */
#include <asm/mce.h> #include <asm/mce.h>
...@@ -151,7 +150,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -151,7 +150,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.cpu_setup = __setup_cpu_ppc970, .cpu_setup = __setup_cpu_ppc970,
.cpu_restore = __restore_cpu_ppc970, .cpu_restore = __restore_cpu_ppc970,
.oprofile_cpu_type = "ppc64/970", .oprofile_cpu_type = "ppc64/970",
.oprofile_type = PPC_OPROFILE_POWER4,
.platform = "ppc970", .platform = "ppc970",
}, },
{ /* PPC970FX */ { /* PPC970FX */
...@@ -169,7 +167,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -169,7 +167,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.cpu_setup = __setup_cpu_ppc970, .cpu_setup = __setup_cpu_ppc970,
.cpu_restore = __restore_cpu_ppc970, .cpu_restore = __restore_cpu_ppc970,
.oprofile_cpu_type = "ppc64/970", .oprofile_cpu_type = "ppc64/970",
.oprofile_type = PPC_OPROFILE_POWER4,
.platform = "ppc970", .platform = "ppc970",
}, },
{ /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */ { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
...@@ -187,7 +184,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -187,7 +184,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.cpu_setup = __setup_cpu_ppc970, .cpu_setup = __setup_cpu_ppc970,
.cpu_restore = __restore_cpu_ppc970, .cpu_restore = __restore_cpu_ppc970,
.oprofile_cpu_type = "ppc64/970MP", .oprofile_cpu_type = "ppc64/970MP",
.oprofile_type = PPC_OPROFILE_POWER4,
.platform = "ppc970", .platform = "ppc970",
}, },
{ /* PPC970MP */ { /* PPC970MP */
...@@ -205,7 +201,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -205,7 +201,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.cpu_setup = __setup_cpu_ppc970MP, .cpu_setup = __setup_cpu_ppc970MP,
.cpu_restore = __restore_cpu_ppc970, .cpu_restore = __restore_cpu_ppc970,
.oprofile_cpu_type = "ppc64/970MP", .oprofile_cpu_type = "ppc64/970MP",
.oprofile_type = PPC_OPROFILE_POWER4,
.platform = "ppc970", .platform = "ppc970",
}, },
{ /* PPC970GX */ { /* PPC970GX */
...@@ -222,7 +217,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -222,7 +217,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.pmc_type = PPC_PMC_IBM, .pmc_type = PPC_PMC_IBM,
.cpu_setup = __setup_cpu_ppc970, .cpu_setup = __setup_cpu_ppc970,
.oprofile_cpu_type = "ppc64/970", .oprofile_cpu_type = "ppc64/970",
.oprofile_type = PPC_OPROFILE_POWER4,
.platform = "ppc970", .platform = "ppc970",
}, },
{ /* Power5 GR */ { /* Power5 GR */
...@@ -237,12 +231,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -237,12 +231,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.num_pmcs = 6, .num_pmcs = 6,
.pmc_type = PPC_PMC_IBM, .pmc_type = PPC_PMC_IBM,
.oprofile_cpu_type = "ppc64/power5", .oprofile_cpu_type = "ppc64/power5",
.oprofile_type = PPC_OPROFILE_POWER4,
/* SIHV / SIPR bits are implemented on POWER4+ (GQ)
* and above but only works on POWER5 and above
*/
.oprofile_mmcra_sihv = MMCRA_SIHV,
.oprofile_mmcra_sipr = MMCRA_SIPR,
.platform = "power5", .platform = "power5",
}, },
{ /* Power5++ */ { /* Power5++ */
...@@ -256,9 +244,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -256,9 +244,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.dcache_bsize = 128, .dcache_bsize = 128,
.num_pmcs = 6, .num_pmcs = 6,
.oprofile_cpu_type = "ppc64/power5++", .oprofile_cpu_type = "ppc64/power5++",
.oprofile_type = PPC_OPROFILE_POWER4,
.oprofile_mmcra_sihv = MMCRA_SIHV,
.oprofile_mmcra_sipr = MMCRA_SIPR,
.platform = "power5+", .platform = "power5+",
}, },
{ /* Power5 GS */ { /* Power5 GS */
...@@ -273,9 +258,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -273,9 +258,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.num_pmcs = 6, .num_pmcs = 6,
.pmc_type = PPC_PMC_IBM, .pmc_type = PPC_PMC_IBM,
.oprofile_cpu_type = "ppc64/power5+", .oprofile_cpu_type = "ppc64/power5+",
.oprofile_type = PPC_OPROFILE_POWER4,
.oprofile_mmcra_sihv = MMCRA_SIHV,
.oprofile_mmcra_sipr = MMCRA_SIPR,
.platform = "power5+", .platform = "power5+",
}, },
{ /* POWER6 in P5+ mode; 2.04-compliant processor */ { /* POWER6 in P5+ mode; 2.04-compliant processor */
...@@ -288,7 +270,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -288,7 +270,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.icache_bsize = 128, .icache_bsize = 128,
.dcache_bsize = 128, .dcache_bsize = 128,
.oprofile_cpu_type = "ppc64/ibm-compat-v1", .oprofile_cpu_type = "ppc64/ibm-compat-v1",
.oprofile_type = PPC_OPROFILE_POWER4,
.platform = "power5+", .platform = "power5+",
}, },
{ /* Power6 */ { /* Power6 */
...@@ -304,11 +285,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -304,11 +285,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.num_pmcs = 6, .num_pmcs = 6,
.pmc_type = PPC_PMC_IBM, .pmc_type = PPC_PMC_IBM,
.oprofile_cpu_type = "ppc64/power6", .oprofile_cpu_type = "ppc64/power6",
.oprofile_type = PPC_OPROFILE_POWER4,
.oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
.oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
.oprofile_mmcra_clear = POWER6_MMCRA_THRM |
POWER6_MMCRA_OTHER,
.platform = "power6x", .platform = "power6x",
}, },
{ /* 2.05-compliant processor, i.e. Power6 "architected" mode */ { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
...@@ -321,7 +297,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -321,7 +297,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.icache_bsize = 128, .icache_bsize = 128,
.dcache_bsize = 128, .dcache_bsize = 128,
.oprofile_cpu_type = "ppc64/ibm-compat-v1", .oprofile_cpu_type = "ppc64/ibm-compat-v1",
.oprofile_type = PPC_OPROFILE_POWER4,
.platform = "power6", .platform = "power6",
}, },
{ /* 2.06-compliant processor, i.e. Power7 "architected" mode */ { /* 2.06-compliant processor, i.e. Power7 "architected" mode */
...@@ -334,7 +309,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -334,7 +309,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.mmu_features = MMU_FTRS_POWER7, .mmu_features = MMU_FTRS_POWER7,
.icache_bsize = 128, .icache_bsize = 128,
.dcache_bsize = 128, .dcache_bsize = 128,
.oprofile_type = PPC_OPROFILE_POWER4,
.oprofile_cpu_type = "ppc64/ibm-compat-v1", .oprofile_cpu_type = "ppc64/ibm-compat-v1",
.cpu_setup = __setup_cpu_power7, .cpu_setup = __setup_cpu_power7,
.cpu_restore = __restore_cpu_power7, .cpu_restore = __restore_cpu_power7,
...@@ -351,7 +325,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -351,7 +325,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.mmu_features = MMU_FTRS_POWER8, .mmu_features = MMU_FTRS_POWER8,
.icache_bsize = 128, .icache_bsize = 128,
.dcache_bsize = 128, .dcache_bsize = 128,
.oprofile_type = PPC_OPROFILE_INVALID,
.oprofile_cpu_type = "ppc64/ibm-compat-v1", .oprofile_cpu_type = "ppc64/ibm-compat-v1",
.cpu_setup = __setup_cpu_power8, .cpu_setup = __setup_cpu_power8,
.cpu_restore = __restore_cpu_power8, .cpu_restore = __restore_cpu_power8,
...@@ -368,7 +341,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -368,7 +341,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.mmu_features = MMU_FTRS_POWER9, .mmu_features = MMU_FTRS_POWER9,
.icache_bsize = 128, .icache_bsize = 128,
.dcache_bsize = 128, .dcache_bsize = 128,
.oprofile_type = PPC_OPROFILE_INVALID,
.oprofile_cpu_type = "ppc64/ibm-compat-v1", .oprofile_cpu_type = "ppc64/ibm-compat-v1",
.cpu_setup = __setup_cpu_power9, .cpu_setup = __setup_cpu_power9,
.cpu_restore = __restore_cpu_power9, .cpu_restore = __restore_cpu_power9,
...@@ -384,7 +356,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -384,7 +356,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.mmu_features = MMU_FTRS_POWER10, .mmu_features = MMU_FTRS_POWER10,
.icache_bsize = 128, .icache_bsize = 128,
.dcache_bsize = 128, .dcache_bsize = 128,
.oprofile_type = PPC_OPROFILE_INVALID,
.oprofile_cpu_type = "ppc64/ibm-compat-v1", .oprofile_cpu_type = "ppc64/ibm-compat-v1",
.cpu_setup = __setup_cpu_power10, .cpu_setup = __setup_cpu_power10,
.cpu_restore = __restore_cpu_power10, .cpu_restore = __restore_cpu_power10,
...@@ -403,7 +374,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -403,7 +374,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.num_pmcs = 6, .num_pmcs = 6,
.pmc_type = PPC_PMC_IBM, .pmc_type = PPC_PMC_IBM,
.oprofile_cpu_type = "ppc64/power7", .oprofile_cpu_type = "ppc64/power7",
.oprofile_type = PPC_OPROFILE_POWER4,
.cpu_setup = __setup_cpu_power7, .cpu_setup = __setup_cpu_power7,
.cpu_restore = __restore_cpu_power7, .cpu_restore = __restore_cpu_power7,
.machine_check_early = __machine_check_early_realmode_p7, .machine_check_early = __machine_check_early_realmode_p7,
...@@ -422,7 +392,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -422,7 +392,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.num_pmcs = 6, .num_pmcs = 6,
.pmc_type = PPC_PMC_IBM, .pmc_type = PPC_PMC_IBM,
.oprofile_cpu_type = "ppc64/power7", .oprofile_cpu_type = "ppc64/power7",
.oprofile_type = PPC_OPROFILE_POWER4,
.cpu_setup = __setup_cpu_power7, .cpu_setup = __setup_cpu_power7,
.cpu_restore = __restore_cpu_power7, .cpu_restore = __restore_cpu_power7,
.machine_check_early = __machine_check_early_realmode_p7, .machine_check_early = __machine_check_early_realmode_p7,
...@@ -441,7 +410,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -441,7 +410,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.num_pmcs = 6, .num_pmcs = 6,
.pmc_type = PPC_PMC_IBM, .pmc_type = PPC_PMC_IBM,
.oprofile_cpu_type = "ppc64/power8", .oprofile_cpu_type = "ppc64/power8",
.oprofile_type = PPC_OPROFILE_INVALID,
.cpu_setup = __setup_cpu_power8, .cpu_setup = __setup_cpu_power8,
.cpu_restore = __restore_cpu_power8, .cpu_restore = __restore_cpu_power8,
.machine_check_early = __machine_check_early_realmode_p8, .machine_check_early = __machine_check_early_realmode_p8,
...@@ -460,7 +428,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -460,7 +428,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.num_pmcs = 6, .num_pmcs = 6,
.pmc_type = PPC_PMC_IBM, .pmc_type = PPC_PMC_IBM,
.oprofile_cpu_type = "ppc64/power8", .oprofile_cpu_type = "ppc64/power8",
.oprofile_type = PPC_OPROFILE_INVALID,
.cpu_setup = __setup_cpu_power8, .cpu_setup = __setup_cpu_power8,
.cpu_restore = __restore_cpu_power8, .cpu_restore = __restore_cpu_power8,
.machine_check_early = __machine_check_early_realmode_p8, .machine_check_early = __machine_check_early_realmode_p8,
...@@ -479,7 +446,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -479,7 +446,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.num_pmcs = 6, .num_pmcs = 6,
.pmc_type = PPC_PMC_IBM, .pmc_type = PPC_PMC_IBM,
.oprofile_cpu_type = "ppc64/power8", .oprofile_cpu_type = "ppc64/power8",
.oprofile_type = PPC_OPROFILE_INVALID,
.cpu_setup = __setup_cpu_power8, .cpu_setup = __setup_cpu_power8,
.cpu_restore = __restore_cpu_power8, .cpu_restore = __restore_cpu_power8,
.machine_check_early = __machine_check_early_realmode_p8, .machine_check_early = __machine_check_early_realmode_p8,
...@@ -498,7 +464,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -498,7 +464,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.num_pmcs = 6, .num_pmcs = 6,
.pmc_type = PPC_PMC_IBM, .pmc_type = PPC_PMC_IBM,
.oprofile_cpu_type = "ppc64/power9", .oprofile_cpu_type = "ppc64/power9",
.oprofile_type = PPC_OPROFILE_INVALID,
.cpu_setup = __setup_cpu_power9, .cpu_setup = __setup_cpu_power9,
.cpu_restore = __restore_cpu_power9, .cpu_restore = __restore_cpu_power9,
.machine_check_early = __machine_check_early_realmode_p9, .machine_check_early = __machine_check_early_realmode_p9,
...@@ -517,7 +482,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -517,7 +482,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.num_pmcs = 6, .num_pmcs = 6,
.pmc_type = PPC_PMC_IBM, .pmc_type = PPC_PMC_IBM,
.oprofile_cpu_type = "ppc64/power9", .oprofile_cpu_type = "ppc64/power9",
.oprofile_type = PPC_OPROFILE_INVALID,
.cpu_setup = __setup_cpu_power9, .cpu_setup = __setup_cpu_power9,
.cpu_restore = __restore_cpu_power9, .cpu_restore = __restore_cpu_power9,
.machine_check_early = __machine_check_early_realmode_p9, .machine_check_early = __machine_check_early_realmode_p9,
...@@ -536,7 +500,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -536,7 +500,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.num_pmcs = 6, .num_pmcs = 6,
.pmc_type = PPC_PMC_IBM, .pmc_type = PPC_PMC_IBM,
.oprofile_cpu_type = "ppc64/power9", .oprofile_cpu_type = "ppc64/power9",
.oprofile_type = PPC_OPROFILE_INVALID,
.cpu_setup = __setup_cpu_power9, .cpu_setup = __setup_cpu_power9,
.cpu_restore = __restore_cpu_power9, .cpu_restore = __restore_cpu_power9,
.machine_check_early = __machine_check_early_realmode_p9, .machine_check_early = __machine_check_early_realmode_p9,
...@@ -555,7 +518,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -555,7 +518,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.num_pmcs = 6, .num_pmcs = 6,
.pmc_type = PPC_PMC_IBM, .pmc_type = PPC_PMC_IBM,
.oprofile_cpu_type = "ppc64/power10", .oprofile_cpu_type = "ppc64/power10",
.oprofile_type = PPC_OPROFILE_INVALID,
.cpu_setup = __setup_cpu_power10, .cpu_setup = __setup_cpu_power10,
.cpu_restore = __restore_cpu_power10, .cpu_restore = __restore_cpu_power10,
.machine_check_early = __machine_check_early_realmode_p10, .machine_check_early = __machine_check_early_realmode_p10,
...@@ -575,7 +537,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -575,7 +537,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.num_pmcs = 4, .num_pmcs = 4,
.pmc_type = PPC_PMC_IBM, .pmc_type = PPC_PMC_IBM,
.oprofile_cpu_type = "ppc64/cell-be", .oprofile_cpu_type = "ppc64/cell-be",
.oprofile_type = PPC_OPROFILE_CELL,
.platform = "ppc-cell-be", .platform = "ppc-cell-be",
}, },
{ /* PA Semi PA6T */ { /* PA Semi PA6T */
...@@ -592,7 +553,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -592,7 +553,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.cpu_setup = __setup_cpu_pa6t, .cpu_setup = __setup_cpu_pa6t,
.cpu_restore = __restore_cpu_pa6t, .cpu_restore = __restore_cpu_pa6t,
.oprofile_cpu_type = "ppc64/pa6t", .oprofile_cpu_type = "ppc64/pa6t",
.oprofile_type = PPC_OPROFILE_PA6T,
.platform = "pa6t", .platform = "pa6t",
}, },
{ /* default match */ { /* default match */
...@@ -757,7 +717,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -757,7 +717,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.machine_check = machine_check_generic, .machine_check = machine_check_generic,
.platform = "ppc750", .platform = "ppc750",
.oprofile_cpu_type = "ppc/750", .oprofile_cpu_type = "ppc/750",
.oprofile_type = PPC_OPROFILE_G4,
}, },
{ /* 745/755 */ { /* 745/755 */
.pvr_mask = 0xfffff000, .pvr_mask = 0xfffff000,
...@@ -789,7 +748,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -789,7 +748,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.machine_check = machine_check_generic, .machine_check = machine_check_generic,
.platform = "ppc750", .platform = "ppc750",
.oprofile_cpu_type = "ppc/750", .oprofile_cpu_type = "ppc/750",
.oprofile_type = PPC_OPROFILE_G4,
}, },
{ /* 750FX rev 2.0 must disable HID0[DPM] */ { /* 750FX rev 2.0 must disable HID0[DPM] */
.pvr_mask = 0xffffffff, .pvr_mask = 0xffffffff,
...@@ -806,7 +764,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -806,7 +764,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.machine_check = machine_check_generic, .machine_check = machine_check_generic,
.platform = "ppc750", .platform = "ppc750",
.oprofile_cpu_type = "ppc/750", .oprofile_cpu_type = "ppc/750",
.oprofile_type = PPC_OPROFILE_G4,
}, },
{ /* 750FX (All revs except 2.0) */ { /* 750FX (All revs except 2.0) */
.pvr_mask = 0xffff0000, .pvr_mask = 0xffff0000,
...@@ -823,7 +780,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -823,7 +780,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.machine_check = machine_check_generic, .machine_check = machine_check_generic,
.platform = "ppc750", .platform = "ppc750",
.oprofile_cpu_type = "ppc/750", .oprofile_cpu_type = "ppc/750",
.oprofile_type = PPC_OPROFILE_G4,
}, },
{ /* 750GX */ { /* 750GX */
.pvr_mask = 0xffff0000, .pvr_mask = 0xffff0000,
...@@ -840,7 +796,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -840,7 +796,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.machine_check = machine_check_generic, .machine_check = machine_check_generic,
.platform = "ppc750", .platform = "ppc750",
.oprofile_cpu_type = "ppc/750", .oprofile_cpu_type = "ppc/750",
.oprofile_type = PPC_OPROFILE_G4,
}, },
{ /* 740/750 (L2CR bit need fixup for 740) */ { /* 740/750 (L2CR bit need fixup for 740) */
.pvr_mask = 0xffff0000, .pvr_mask = 0xffff0000,
...@@ -919,7 +874,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -919,7 +874,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.pmc_type = PPC_PMC_G4, .pmc_type = PPC_PMC_G4,
.cpu_setup = __setup_cpu_745x, .cpu_setup = __setup_cpu_745x,
.oprofile_cpu_type = "ppc/7450", .oprofile_cpu_type = "ppc/7450",
.oprofile_type = PPC_OPROFILE_G4,
.machine_check = machine_check_generic, .machine_check = machine_check_generic,
.platform = "ppc7450", .platform = "ppc7450",
}, },
...@@ -937,7 +891,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -937,7 +891,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.pmc_type = PPC_PMC_G4, .pmc_type = PPC_PMC_G4,
.cpu_setup = __setup_cpu_745x, .cpu_setup = __setup_cpu_745x,
.oprofile_cpu_type = "ppc/7450", .oprofile_cpu_type = "ppc/7450",
.oprofile_type = PPC_OPROFILE_G4,
.machine_check = machine_check_generic, .machine_check = machine_check_generic,
.platform = "ppc7450", .platform = "ppc7450",
}, },
...@@ -955,7 +908,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -955,7 +908,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.pmc_type = PPC_PMC_G4, .pmc_type = PPC_PMC_G4,
.cpu_setup = __setup_cpu_745x, .cpu_setup = __setup_cpu_745x,
.oprofile_cpu_type = "ppc/7450", .oprofile_cpu_type = "ppc/7450",
.oprofile_type = PPC_OPROFILE_G4,
.machine_check = machine_check_generic, .machine_check = machine_check_generic,
.platform = "ppc7450", .platform = "ppc7450",
}, },
...@@ -973,7 +925,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -973,7 +925,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.pmc_type = PPC_PMC_G4, .pmc_type = PPC_PMC_G4,
.cpu_setup = __setup_cpu_745x, .cpu_setup = __setup_cpu_745x,
.oprofile_cpu_type = "ppc/7450", .oprofile_cpu_type = "ppc/7450",
.oprofile_type = PPC_OPROFILE_G4,
.machine_check = machine_check_generic, .machine_check = machine_check_generic,
.platform = "ppc7450", .platform = "ppc7450",
}, },
...@@ -991,7 +942,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -991,7 +942,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.pmc_type = PPC_PMC_G4, .pmc_type = PPC_PMC_G4,
.cpu_setup = __setup_cpu_745x, .cpu_setup = __setup_cpu_745x,
.oprofile_cpu_type = "ppc/7450", .oprofile_cpu_type = "ppc/7450",
.oprofile_type = PPC_OPROFILE_G4,
.machine_check = machine_check_generic, .machine_check = machine_check_generic,
.platform = "ppc7450", .platform = "ppc7450",
}, },
...@@ -1009,7 +959,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -1009,7 +959,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.pmc_type = PPC_PMC_G4, .pmc_type = PPC_PMC_G4,
.cpu_setup = __setup_cpu_745x, .cpu_setup = __setup_cpu_745x,
.oprofile_cpu_type = "ppc/7450", .oprofile_cpu_type = "ppc/7450",
.oprofile_type = PPC_OPROFILE_G4,
.machine_check = machine_check_generic, .machine_check = machine_check_generic,
.platform = "ppc7450", .platform = "ppc7450",
}, },
...@@ -1027,7 +976,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -1027,7 +976,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.pmc_type = PPC_PMC_G4, .pmc_type = PPC_PMC_G4,
.cpu_setup = __setup_cpu_745x, .cpu_setup = __setup_cpu_745x,
.oprofile_cpu_type = "ppc/7450", .oprofile_cpu_type = "ppc/7450",
.oprofile_type = PPC_OPROFILE_G4,
.machine_check = machine_check_generic, .machine_check = machine_check_generic,
.platform = "ppc7450", .platform = "ppc7450",
}, },
...@@ -1045,7 +993,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -1045,7 +993,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.pmc_type = PPC_PMC_G4, .pmc_type = PPC_PMC_G4,
.cpu_setup = __setup_cpu_745x, .cpu_setup = __setup_cpu_745x,
.oprofile_cpu_type = "ppc/7450", .oprofile_cpu_type = "ppc/7450",
.oprofile_type = PPC_OPROFILE_G4,
.machine_check = machine_check_generic, .machine_check = machine_check_generic,
.platform = "ppc7450", .platform = "ppc7450",
}, },
...@@ -1062,7 +1009,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -1062,7 +1009,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.pmc_type = PPC_PMC_G4, .pmc_type = PPC_PMC_G4,
.cpu_setup = __setup_cpu_745x, .cpu_setup = __setup_cpu_745x,
.oprofile_cpu_type = "ppc/7450", .oprofile_cpu_type = "ppc/7450",
.oprofile_type = PPC_OPROFILE_G4,
.machine_check = machine_check_generic, .machine_check = machine_check_generic,
.platform = "ppc7450", .platform = "ppc7450",
}, },
...@@ -1080,7 +1026,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -1080,7 +1026,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.pmc_type = PPC_PMC_G4, .pmc_type = PPC_PMC_G4,
.cpu_setup = __setup_cpu_745x, .cpu_setup = __setup_cpu_745x,
.oprofile_cpu_type = "ppc/7450", .oprofile_cpu_type = "ppc/7450",
.oprofile_type = PPC_OPROFILE_G4,
.machine_check = machine_check_generic, .machine_check = machine_check_generic,
.platform = "ppc7450", .platform = "ppc7450",
}, },
...@@ -1098,7 +1043,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -1098,7 +1043,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.pmc_type = PPC_PMC_G4, .pmc_type = PPC_PMC_G4,
.cpu_setup = __setup_cpu_745x, .cpu_setup = __setup_cpu_745x,
.oprofile_cpu_type = "ppc/7450", .oprofile_cpu_type = "ppc/7450",
.oprofile_type = PPC_OPROFILE_G4,
.machine_check = machine_check_generic, .machine_check = machine_check_generic,
.platform = "ppc7450", .platform = "ppc7450",
}, },
...@@ -1211,7 +1155,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -1211,7 +1155,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.machine_check = machine_check_83xx, .machine_check = machine_check_83xx,
.num_pmcs = 4, .num_pmcs = 4,
.oprofile_cpu_type = "ppc/e300", .oprofile_cpu_type = "ppc/e300",
.oprofile_type = PPC_OPROFILE_FSL_EMB,
.platform = "ppc603", .platform = "ppc603",
}, },
{ /* e300c4 (e300c1, plus one IU) */ { /* e300c4 (e300c1, plus one IU) */
...@@ -1228,7 +1171,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -1228,7 +1171,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.machine_check = machine_check_83xx, .machine_check = machine_check_83xx,
.num_pmcs = 4, .num_pmcs = 4,
.oprofile_cpu_type = "ppc/e300", .oprofile_cpu_type = "ppc/e300",
.oprofile_type = PPC_OPROFILE_FSL_EMB,
.platform = "ppc603", .platform = "ppc603",
}, },
#endif #endif
...@@ -1925,7 +1867,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -1925,7 +1867,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.dcache_bsize = 32, .dcache_bsize = 32,
.num_pmcs = 4, .num_pmcs = 4,
.oprofile_cpu_type = "ppc/e500", .oprofile_cpu_type = "ppc/e500",
.oprofile_type = PPC_OPROFILE_FSL_EMB,
.cpu_setup = __setup_cpu_e500v1, .cpu_setup = __setup_cpu_e500v1,
.machine_check = machine_check_e500, .machine_check = machine_check_e500,
.platform = "ppc8540", .platform = "ppc8540",
...@@ -1945,7 +1886,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -1945,7 +1886,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.dcache_bsize = 32, .dcache_bsize = 32,
.num_pmcs = 4, .num_pmcs = 4,
.oprofile_cpu_type = "ppc/e500", .oprofile_cpu_type = "ppc/e500",
.oprofile_type = PPC_OPROFILE_FSL_EMB,
.cpu_setup = __setup_cpu_e500v2, .cpu_setup = __setup_cpu_e500v2,
.machine_check = machine_check_e500, .machine_check = machine_check_e500,
.platform = "ppc8548", .platform = "ppc8548",
...@@ -1965,7 +1905,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -1965,7 +1905,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.dcache_bsize = 64, .dcache_bsize = 64,
.num_pmcs = 4, .num_pmcs = 4,
.oprofile_cpu_type = "ppc/e500mc", .oprofile_cpu_type = "ppc/e500mc",
.oprofile_type = PPC_OPROFILE_FSL_EMB,
.cpu_setup = __setup_cpu_e500mc, .cpu_setup = __setup_cpu_e500mc,
.machine_check = machine_check_e500mc, .machine_check = machine_check_e500mc,
.platform = "ppce500mc", .platform = "ppce500mc",
...@@ -1987,7 +1926,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -1987,7 +1926,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.dcache_bsize = 64, .dcache_bsize = 64,
.num_pmcs = 4, .num_pmcs = 4,
.oprofile_cpu_type = "ppc/e500mc", .oprofile_cpu_type = "ppc/e500mc",
.oprofile_type = PPC_OPROFILE_FSL_EMB,
.cpu_setup = __setup_cpu_e5500, .cpu_setup = __setup_cpu_e5500,
#ifndef CONFIG_PPC32 #ifndef CONFIG_PPC32
.cpu_restore = __restore_cpu_e5500, .cpu_restore = __restore_cpu_e5500,
...@@ -2010,7 +1948,6 @@ static struct cpu_spec __initdata cpu_specs[] = { ...@@ -2010,7 +1948,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
.dcache_bsize = 64, .dcache_bsize = 64,
.num_pmcs = 6, .num_pmcs = 6,
.oprofile_cpu_type = "ppc/e6500", .oprofile_cpu_type = "ppc/e6500",
.oprofile_type = PPC_OPROFILE_FSL_EMB,
.cpu_setup = __setup_cpu_e6500, .cpu_setup = __setup_cpu_e6500,
#ifndef CONFIG_PPC32 #ifndef CONFIG_PPC32
.cpu_restore = __restore_cpu_e6500, .cpu_restore = __restore_cpu_e6500,
...@@ -2076,10 +2013,6 @@ static struct cpu_spec * __init setup_cpu_spec(unsigned long offset, ...@@ -2076,10 +2013,6 @@ static struct cpu_spec * __init setup_cpu_spec(unsigned long offset,
if (old.num_pmcs && !s->num_pmcs) { if (old.num_pmcs && !s->num_pmcs) {
t->num_pmcs = old.num_pmcs; t->num_pmcs = old.num_pmcs;
t->pmc_type = old.pmc_type; t->pmc_type = old.pmc_type;
t->oprofile_type = old.oprofile_type;
t->oprofile_mmcra_sihv = old.oprofile_mmcra_sihv;
t->oprofile_mmcra_sipr = old.oprofile_mmcra_sipr;
t->oprofile_mmcra_clear = old.oprofile_mmcra_clear;
/* /*
* If we have passed through this logic once before and * If we have passed through this logic once before and
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include <asm/dt_cpu_ftrs.h> #include <asm/dt_cpu_ftrs.h>
#include <asm/mce.h> #include <asm/mce.h>
#include <asm/mmu.h> #include <asm/mmu.h>
#include <asm/oprofile_impl.h>
#include <asm/prom.h> #include <asm/prom.h>
#include <asm/setup.h> #include <asm/setup.h>
...@@ -103,7 +102,6 @@ static struct cpu_spec __initdata base_cpu_spec = { ...@@ -103,7 +102,6 @@ static struct cpu_spec __initdata base_cpu_spec = {
.num_pmcs = 0, .num_pmcs = 0,
.pmc_type = PPC_PMC_DEFAULT, .pmc_type = PPC_PMC_DEFAULT,
.oprofile_cpu_type = NULL, .oprofile_cpu_type = NULL,
.oprofile_type = PPC_OPROFILE_INVALID,
.cpu_setup = NULL, .cpu_setup = NULL,
.cpu_restore = __restore_cpu_cpufeatures, .cpu_restore = __restore_cpu_cpufeatures,
.machine_check_early = NULL, .machine_check_early = NULL,
......
...@@ -100,8 +100,3 @@ config CBE_CPUFREQ_SPU_GOVERNOR ...@@ -100,8 +100,3 @@ config CBE_CPUFREQ_SPU_GOVERNOR
the minimal possible frequency. the minimal possible frequency.
endmenu endmenu
config OPROFILE_CELL
def_bool y
depends on PPC_CELL_NATIVE && (OPROFILE = m || OPROFILE = y) && SPU_BASE
...@@ -19,7 +19,6 @@ spu-priv1-$(CONFIG_PPC_CELL_COMMON) += spu_priv1_mmio.o ...@@ -19,7 +19,6 @@ spu-priv1-$(CONFIG_PPC_CELL_COMMON) += spu_priv1_mmio.o
spu-manage-$(CONFIG_PPC_CELL_COMMON) += spu_manage.o spu-manage-$(CONFIG_PPC_CELL_COMMON) += spu_manage.o
obj-$(CONFIG_SPU_BASE) += spu_callbacks.o spu_base.o \ obj-$(CONFIG_SPU_BASE) += spu_callbacks.o spu_base.o \
spu_notify.o \
spu_syscalls.o \ spu_syscalls.o \
$(spu-priv1-y) \ $(spu-priv1-y) \
$(spu-manage-y) \ $(spu-manage-y) \
......
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Move OProfile dependencies from spufs module to the kernel so it
* can run on non-cell PPC.
*
* Copyright (C) IBM 2005
*/
#undef DEBUG
#include <linux/export.h>
#include <linux/notifier.h>
#include <asm/spu.h>
#include "spufs/spufs.h"
static BLOCKING_NOTIFIER_HEAD(spu_switch_notifier);
void spu_switch_notify(struct spu *spu, struct spu_context *ctx)
{
blocking_notifier_call_chain(&spu_switch_notifier,
ctx ? ctx->object_id : 0, spu);
}
EXPORT_SYMBOL_GPL(spu_switch_notify);
int spu_switch_event_register(struct notifier_block *n)
{
int ret;
ret = blocking_notifier_chain_register(&spu_switch_notifier, n);
if (!ret)
notify_spus_active();
return ret;
}
EXPORT_SYMBOL_GPL(spu_switch_event_register);
int spu_switch_event_unregister(struct notifier_block *n)
{
return blocking_notifier_chain_unregister(&spu_switch_notifier, n);
}
EXPORT_SYMBOL_GPL(spu_switch_event_unregister);
void spu_set_profile_private_kref(struct spu_context *ctx,
struct kref *prof_info_kref,
void (* prof_info_release) (struct kref *kref))
{
ctx->prof_priv_kref = prof_info_kref;
ctx->prof_priv_release = prof_info_release;
}
EXPORT_SYMBOL_GPL(spu_set_profile_private_kref);
void *spu_get_profile_private_kref(struct spu_context *ctx)
{
return ctx->prof_priv_kref;
}
EXPORT_SYMBOL_GPL(spu_get_profile_private_kref);
...@@ -353,7 +353,6 @@ static int spu_process_callback(struct spu_context *ctx) ...@@ -353,7 +353,6 @@ static int spu_process_callback(struct spu_context *ctx)
long spufs_run_spu(struct spu_context *ctx, u32 *npc, u32 *event) long spufs_run_spu(struct spu_context *ctx, u32 *npc, u32 *event)
{ {
int ret; int ret;
struct spu *spu;
u32 status; u32 status;
if (mutex_lock_interruptible(&ctx->run_mutex)) if (mutex_lock_interruptible(&ctx->run_mutex))
...@@ -386,13 +385,10 @@ long spufs_run_spu(struct spu_context *ctx, u32 *npc, u32 *event) ...@@ -386,13 +385,10 @@ long spufs_run_spu(struct spu_context *ctx, u32 *npc, u32 *event)
mutex_lock(&ctx->state_mutex); mutex_lock(&ctx->state_mutex);
break; break;
} }
spu = ctx->spu;
if (unlikely(test_and_clear_bit(SPU_SCHED_NOTIFY_ACTIVE, if (unlikely(test_and_clear_bit(SPU_SCHED_NOTIFY_ACTIVE,
&ctx->sched_flags))) { &ctx->sched_flags))) {
if (!(status & SPU_STATUS_STOPPED_BY_STOP)) { if (!(status & SPU_STATUS_STOPPED_BY_STOP))
spu_switch_notify(spu, ctx);
continue; continue;
}
} }
spuctx_switch_state(ctx, SPU_UTIL_SYSTEM); spuctx_switch_state(ctx, SPU_UTIL_SYSTEM);
......
...@@ -181,9 +181,6 @@ void do_notify_spus_active(void) ...@@ -181,9 +181,6 @@ void do_notify_spus_active(void)
/* /*
* Wake up the active spu_contexts. * Wake up the active spu_contexts.
*
* When the awakened processes see their "notify_active" flag is set,
* they will call spu_switch_notify().
*/ */
for_each_online_node(node) { for_each_online_node(node) {
struct spu *spu; struct spu *spu;
...@@ -239,7 +236,6 @@ static void spu_bind_context(struct spu *spu, struct spu_context *ctx) ...@@ -239,7 +236,6 @@ static void spu_bind_context(struct spu *spu, struct spu_context *ctx)
spu_switch_log_notify(spu, ctx, SWITCH_LOG_START, 0); spu_switch_log_notify(spu, ctx, SWITCH_LOG_START, 0);
spu_restore(&ctx->csa, spu); spu_restore(&ctx->csa, spu);
spu->timestamp = jiffies; spu->timestamp = jiffies;
spu_switch_notify(spu, ctx);
ctx->state = SPU_STATE_RUNNABLE; ctx->state = SPU_STATE_RUNNABLE;
spuctx_switch_state(ctx, SPU_UTIL_USER); spuctx_switch_state(ctx, SPU_UTIL_USER);
...@@ -440,7 +436,6 @@ static void spu_unbind_context(struct spu *spu, struct spu_context *ctx) ...@@ -440,7 +436,6 @@ static void spu_unbind_context(struct spu *spu, struct spu_context *ctx)
*/ */
atomic_dec_if_positive(&ctx->gang->aff_sched_count); atomic_dec_if_positive(&ctx->gang->aff_sched_count);
spu_switch_notify(spu, NULL);
spu_unmap_mappings(ctx); spu_unmap_mappings(ctx);
spu_save(&ctx->csa, spu); spu_save(&ctx->csa, spu);
spu_switch_log_notify(spu, ctx, SWITCH_LOG_STOP, 0); spu_switch_log_notify(spu, ctx, SWITCH_LOG_STOP, 0);
......
...@@ -281,7 +281,6 @@ void spu_del_from_rq(struct spu_context *ctx); ...@@ -281,7 +281,6 @@ void spu_del_from_rq(struct spu_context *ctx);
int spu_activate(struct spu_context *ctx, unsigned long flags); int spu_activate(struct spu_context *ctx, unsigned long flags);
void spu_deactivate(struct spu_context *ctx); void spu_deactivate(struct spu_context *ctx);
void spu_yield(struct spu_context *ctx); void spu_yield(struct spu_context *ctx);
void spu_switch_notify(struct spu *spu, struct spu_context *ctx);
void spu_switch_log_notify(struct spu *spu, struct spu_context *ctx, void spu_switch_log_notify(struct spu *spu, struct spu_context *ctx,
u32 type, u32 val); u32 type, u32 val);
void spu_set_timeslice(struct spu_context *ctx); void spu_set_timeslice(struct spu_context *ctx);
......
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