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);
......
This diff is collapsed.
...@@ -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