~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/powerpc/platforms/cell/spu_notify.c

Version: ~ [ linux-5.5-rc1 ] ~ [ linux-5.4.2 ] ~ [ linux-5.3.15 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.88 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.158 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.206 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.206 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.78 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * Move OProfile dependencies from spufs module to the kernel so it
  3  * can run on non-cell PPC.
  4  *
  5  * Copyright (C) IBM 2005
  6  *
  7  * This program is free software; you can redistribute it and/or modify
  8  * it under the terms of the GNU General Public License as published by
  9  * the Free Software Foundation; either version 2, or (at your option)
 10  * any later version.
 11  *
 12  * This program is distributed in the hope that it will be useful,
 13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 15  * GNU General Public License for more details.
 16  *
 17  * You should have received a copy of the GNU General Public License
 18  * along with this program; if not, write to the Free Software
 19  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 20  */
 21 
 22 #undef DEBUG
 23 
 24 #include <linux/export.h>
 25 #include <linux/notifier.h>
 26 #include <asm/spu.h>
 27 #include "spufs/spufs.h"
 28 
 29 static BLOCKING_NOTIFIER_HEAD(spu_switch_notifier);
 30 
 31 void spu_switch_notify(struct spu *spu, struct spu_context *ctx)
 32 {
 33         blocking_notifier_call_chain(&spu_switch_notifier,
 34                                      ctx ? ctx->object_id : 0, spu);
 35 }
 36 EXPORT_SYMBOL_GPL(spu_switch_notify);
 37 
 38 int spu_switch_event_register(struct notifier_block *n)
 39 {
 40         int ret;
 41         ret = blocking_notifier_chain_register(&spu_switch_notifier, n);
 42         if (!ret)
 43                 notify_spus_active();
 44         return ret;
 45 }
 46 EXPORT_SYMBOL_GPL(spu_switch_event_register);
 47 
 48 int spu_switch_event_unregister(struct notifier_block *n)
 49 {
 50         return blocking_notifier_chain_unregister(&spu_switch_notifier, n);
 51 }
 52 EXPORT_SYMBOL_GPL(spu_switch_event_unregister);
 53 
 54 void spu_set_profile_private_kref(struct spu_context *ctx,
 55                                   struct kref *prof_info_kref,
 56                                   void (* prof_info_release) (struct kref *kref))
 57 {
 58         ctx->prof_priv_kref = prof_info_kref;
 59         ctx->prof_priv_release = prof_info_release;
 60 }
 61 EXPORT_SYMBOL_GPL(spu_set_profile_private_kref);
 62 
 63 void *spu_get_profile_private_kref(struct spu_context *ctx)
 64 {
 65         return ctx->prof_priv_kref;
 66 }
 67 EXPORT_SYMBOL_GPL(spu_get_profile_private_kref);
 68 
 69 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp