[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200702151913.53594.arnd@arndb.de>
Date: Thu, 15 Feb 2007 19:13:52 +0100
From: Arnd Bergmann <arnd@...db.de>
To: Maynard Johnson <maynardj@...ibm.com>
Cc: cbe-oss-dev@...abs.org, linuxppc-dev@...abs.org,
linux-kernel@...r.kernel.org, oprofile-list@...ts.sourceforge.net,
Carl Love <cel@...ibm.com>
Subject: Re: [Cbe-oss-dev] [RFC, PATCH] CELL Oprofile SPU profiling updated patch
On Thursday 15 February 2007 17:15, Maynard Johnson wrote:
> >>+void spu_set_profile_private(struct spu_context * ctx, void * profile_info,
> >>+ struct kref * prof_info_kref,
> >>+ void (* prof_info_release) (struct kref * kref))
> >>+{
> >>+ ctx->profile_private = profile_info;
> >>+ ctx->prof_priv_kref = prof_info_kref;
> >>+ ctx->prof_priv_release = prof_info_release;
> >>+}
> >>+EXPORT_SYMBOL_GPL(spu_set_profile_private);
> >>
> >>
> >
> >I think you don't need the profile_private member here, if you just use
> >container_of with ctx->prof_priv_kref in all users.
> >
> >
> Sorry, I don't follow. We want the profile_private to be stored in the
> spu_context, don't we? How else would I be able to do that? And
> besides, wouldn't container_of need the struct name of profile_private?
> SPUFS doesn't have access to the type.
The idea was to have spu_get_profile_private return the kref pointer,
and then change the user of that to do
+ if (!spu_info[spu_num] && the_spu) {
+ spu_info[spu_num] = container_of(
+ spu_get_profile_private(the_spu->ctx),
+ struct cached_info, cache_kref);
+ if (spu_info[spu_num])
+ kref_get(&spu_info[spu_num]->cache_ref);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists