All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@codeaurora.org>
To: Ohad Ben-Cohen <ohad@wizery.com>
Cc: linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Fernando Guzman Lugo <fernando.lugo@ti.com>
Subject: Re: [PATCH 2/2] remoteproc: remove the now-redundant kref
Date: Mon, 04 Jun 2012 14:22:54 -0700	[thread overview]
Message-ID: <4FCD272E.1020300@codeaurora.org> (raw)
In-Reply-To: <CAK=WgbbwaMAnTGcivC9ZR8K-MtTqHAV3+BgUmk8WjCaayifJxw@mail.gmail.com>

On 05/30/12 05:38, Ohad Ben-Cohen wrote:
> On Wed, May 30, 2012 at 11:42 AM, Stephen Boyd <sboyd@codeaurora.org> wrote:
>>> -     /* the rproc will only be released after its refcount drops to zero */
>>> -     kref_put(&rproc->refcount, rproc_release);
>>> +     /* unroll rproc_alloc. TODO: we may want to let the users do that */
>>> +     put_device(&rproc->dev);
>> Yes I think we want rproc_free() to actually call put_device() the last
>> time and free the resources.
> Yeah that was one of the options I considered.
>
> In general, we have three options here:
> 1. Remove this last put_device invocation, and require users to call
> rproc_free() even after they call rproc_unregister().
> 2. Let rproc_unregister() still do this, by calling rproc_free().
> 3. Let rproc_unregister() still do this, by invoking put_device().
>
> I think that (1) looks better since it makes the interface symmetric
> and straight forward.
>
> (2) and (3) may be simper because users only need to call
> rproc_unregister and that's it.
>
> I eventually decided against (1) because I was concerned it will only
> confuse users at this point.
>
> But if you think that (1) is nicer too then maybe we should go ahead
> and do that change.

Option 1 is nicer and it also follows the model other subsystems have
put forth such as the input subsystem.

-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.


WARNING: multiple messages have this Message-ID (diff)
From: sboyd@codeaurora.org (Stephen Boyd)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] remoteproc: remove the now-redundant kref
Date: Mon, 04 Jun 2012 14:22:54 -0700	[thread overview]
Message-ID: <4FCD272E.1020300@codeaurora.org> (raw)
In-Reply-To: <CAK=WgbbwaMAnTGcivC9ZR8K-MtTqHAV3+BgUmk8WjCaayifJxw@mail.gmail.com>

On 05/30/12 05:38, Ohad Ben-Cohen wrote:
> On Wed, May 30, 2012 at 11:42 AM, Stephen Boyd <sboyd@codeaurora.org> wrote:
>>> -     /* the rproc will only be released after its refcount drops to zero */
>>> -     kref_put(&rproc->refcount, rproc_release);
>>> +     /* unroll rproc_alloc. TODO: we may want to let the users do that */
>>> +     put_device(&rproc->dev);
>> Yes I think we want rproc_free() to actually call put_device() the last
>> time and free the resources.
> Yeah that was one of the options I considered.
>
> In general, we have three options here:
> 1. Remove this last put_device invocation, and require users to call
> rproc_free() even after they call rproc_unregister().
> 2. Let rproc_unregister() still do this, by calling rproc_free().
> 3. Let rproc_unregister() still do this, by invoking put_device().
>
> I think that (1) looks better since it makes the interface symmetric
> and straight forward.
>
> (2) and (3) may be simper because users only need to call
> rproc_unregister and that's it.
>
> I eventually decided against (1) because I was concerned it will only
> confuse users at this point.
>
> But if you think that (1) is nicer too then maybe we should go ahead
> and do that change.

Option 1 is nicer and it also follows the model other subsystems have
put forth such as the input subsystem.

-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

  reply	other threads:[~2012-06-04 21:22 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-26  7:36 [PATCH 1/2] remoteproc: maintain a generic child device for each rproc Ohad Ben-Cohen
2012-05-26  7:36 ` Ohad Ben-Cohen
2012-05-26  7:36 ` Ohad Ben-Cohen
2012-05-26  7:36 ` [PATCH 2/2] remoteproc: remove the now-redundant kref Ohad Ben-Cohen
2012-05-26  7:36   ` Ohad Ben-Cohen
2012-05-26  7:36   ` Ohad Ben-Cohen
2012-05-30  8:42   ` Stephen Boyd
2012-05-30  8:42     ` Stephen Boyd
2012-05-30 12:38     ` Ohad Ben-Cohen
2012-05-30 12:38       ` Ohad Ben-Cohen
2012-06-04 21:22       ` Stephen Boyd [this message]
2012-06-04 21:22         ` Stephen Boyd
2012-06-05 10:25         ` Ohad Ben-Cohen
2012-06-05 10:25           ` Ohad Ben-Cohen
2012-07-02  8:52         ` Ohad Ben-Cohen
2012-07-02  8:52           ` Ohad Ben-Cohen
2012-07-02  8:59           ` Russell King - ARM Linux
2012-07-02  8:59             ` Russell King - ARM Linux
2012-07-02  9:05             ` Ohad Ben-Cohen
2012-07-02  9:05               ` Ohad Ben-Cohen
2012-07-15 10:10           ` Ohad Ben-Cohen
2012-07-15 10:10             ` Ohad Ben-Cohen
2012-07-15  9:17   ` Ohad Ben-Cohen
2012-07-15  9:17     ` Ohad Ben-Cohen
2012-05-30  8:36 ` [PATCH 1/2] remoteproc: maintain a generic child device for each rproc Stephen Boyd
2012-05-30  8:36   ` Stephen Boyd
2012-05-30 12:16   ` Ohad Ben-Cohen
2012-05-30 12:16     ` Ohad Ben-Cohen
2012-05-30 12:16     ` Ohad Ben-Cohen
2012-06-04 21:22     ` Stephen Boyd
2012-06-04 21:22       ` Stephen Boyd
2012-06-29  8:13     ` Ohad Ben-Cohen
2012-06-29  8:13       ` Ohad Ben-Cohen
2012-07-02 19:06       ` Stephen Boyd
2012-07-02 19:06         ` Stephen Boyd
2012-07-02 19:54         ` Ohad Ben-Cohen
2012-07-02 19:54           ` Ohad Ben-Cohen
2012-07-05 20:35           ` Stephen Boyd
2012-07-05 20:35             ` Stephen Boyd
2012-07-15  9:12             ` Ohad Ben-Cohen
2012-07-15  9:12               ` Ohad Ben-Cohen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FCD272E.1020300@codeaurora.org \
    --to=sboyd@codeaurora.org \
    --cc=fernando.lugo@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=ohad@wizery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.