diff options
author | Bob Nelson <rrnelson@linux.vnet.ibm.com> | 2007-12-14 17:27:30 +0300 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-12-28 07:07:52 +0300 |
commit | aed3a8c9bb1a8623a618232087c5ff62718e3b9a (patch) | |
tree | 3998117906b40887ce7739288403927f461bf4f4 /arch/powerpc/platforms/cell/spufs | |
parent | c68cb23dde29fb107575656effa46f7b9440ac04 (diff) | |
download | linux-aed3a8c9bb1a8623a618232087c5ff62718e3b9a.tar.xz |
[POWERPC] Oprofile: Remove dependency on spufs module
This removes an OProfile dependency on the spufs module. This
dependency was causing a problem for multiplatform systems that are
built with support for Oprofile on Cell but try to load the oprofile
module on a non-Cell system.
Signed-off-by: Bob Nelson <rrnelson@us.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Acked-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/cell/spufs')
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/context.c | 16 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/sched.c | 29 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/syscalls.c | 1 |
3 files changed, 8 insertions, 38 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/context.c b/arch/powerpc/platforms/cell/spufs/context.c index 9cb081c26e71..adf0a030d6fe 100644 --- a/arch/powerpc/platforms/cell/spufs/context.c +++ b/arch/powerpc/platforms/cell/spufs/context.c @@ -190,19 +190,3 @@ void spu_release_saved(struct spu_context *ctx) spu_release(ctx); } -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); - - diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c index 4d257b3f9336..6e2a45e60261 100644 --- a/arch/powerpc/platforms/cell/spufs/sched.c +++ b/arch/powerpc/platforms/cell/spufs/sched.c @@ -166,15 +166,7 @@ static int node_allowed(struct spu_context *ctx, int node) return rval; } -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); -} - -static void notify_spus_active(void) +void do_notify_spus_active(void) { int node; @@ -200,22 +192,15 @@ static void notify_spus_active(void) mutex_unlock(&cbe_spu_info[node].list_mutex); } } +EXPORT_SYMBOL_GPL(do_notify_spus_active); -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) +#ifndef MODULE +void notify_spus_active(void) { - return blocking_notifier_chain_unregister(&spu_switch_notifier, n); + do_notify_spus_active(); } -EXPORT_SYMBOL_GPL(spu_switch_event_unregister); +EXPORT_SYMBOL_GPL(notify_spus_active); +#endif /** * spu_bind_context - bind spu context to physical spu diff --git a/arch/powerpc/platforms/cell/spufs/syscalls.c b/arch/powerpc/platforms/cell/spufs/syscalls.c index 2c34f7170190..430404413178 100644 --- a/arch/powerpc/platforms/cell/spufs/syscalls.c +++ b/arch/powerpc/platforms/cell/spufs/syscalls.c @@ -86,5 +86,6 @@ struct spufs_calls spufs_calls = { .spu_run = do_spu_run, .coredump_extra_notes_size = spufs_coredump_extra_notes_size, .coredump_extra_notes_write = spufs_coredump_extra_notes_write, + .notify_spus_active = do_notify_spus_active, .owner = THIS_MODULE, }; |