Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1554912

Re: [PATCH 06/12] PM / OPP: Add 'struct kref' to struct dev_pm_opp

From Viresh Kumar <viresh.kumar@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH 06/12] PM / OPP: Add 'struct kref' to struct dev_pm_opp
Date 2017-01-10 05:30 +0100
Message-ID <sXWel-53H-5@gated-at.bofh.it> (permalink)
References <sLHNL-7ku-5@gated-at.bofh.it> <sLHXs-7qQ-27@gated-at.bofh.it> <sXRRo-26v-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 09-01-17, 15:44, Stephen Boyd wrote:
> On 12/07, Viresh Kumar wrote:
> > Add kref to struct dev_pm_opp for easier accounting of the OPPs.
> > 
> > Note that the OPPs are freed under the opp_table->lock mutex only.
> 
> I'm lost. Why add another level of krefs?

Heh. The earlier krefs were for the OPP table itself, so that it gets freed once
there are no more users of it.

The kref introduced now is for individual OPPs, so that they don't disappear
while being used and gets freed once all are done.

Also note that the OPP table will get freed only after all the OPPs are freed,
plus there are no more users left, like platform code which might have set
suppoerted-hw property.

-- 
viresh

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH 06/12] PM / OPP: Add 'struct kref' to struct dev_pm_opp Stephen Boyd <sboyd@codeaurora.org> - 2017-01-10 00:50 +0100
  Re: [PATCH 06/12] PM / OPP: Add 'struct kref' to struct dev_pm_opp Viresh Kumar <viresh.kumar@linaro.org> - 2017-01-10 05:30 +0100
    Re: [PATCH 06/12] PM / OPP: Add 'struct kref' to struct dev_pm_opp Stephen Boyd <sboyd@codeaurora.org> - 2017-01-13 10:00 +0100
      Re: [PATCH 06/12] PM / OPP: Add 'struct kref' to struct dev_pm_opp Viresh Kumar <viresh.kumar@linaro.org> - 2017-01-13 10:00 +0100

csiph-web