[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <20130716140632.70fb2838@amdc308.digital.local>
Date: Tue, 16 Jul 2013 14:06:32 +0200
From: Lukasz Majewski <l.majewski@...sung.com>
To: Viresh Kumar <viresh.kumar@...aro.org>,
"Rafael J. Wysocki" <rjw@...k.pl>
Cc: Zhang Rui <rui.zhang@...el.com>,
Eduardo Valentin <eduardo.valentin@...com>,
"cpufreq@...r.kernel.org" <cpufreq@...r.kernel.org>,
Linux PM list <linux-pm@...r.kernel.org>,
Jonghwa Lee <jonghwa3.lee@...sung.com>, l.majewski@...ess.pl,
linux-kernel <linux-kernel@...r.kernel.org>,
Andre Przywara <andre.przywara@...aro.org>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
Kukjin Kim <kgene.kim@...sung.com>,
Myungjoo Ham <myungjoo.ham@...sung.com>
Subject: Re: [PATCH v5 2/7] cpufreq: Add boost frequency support in core
On Tue, 16 Jul 2013 15:11:54 +0530 Viresh Kumar viresh.kumar@...aro.org
wrote,
> On 4 July 2013 14:20, Lukasz Majewski <l.majewski@...sung.com> wrote:
> > diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
>
> > +int cpufreq_boost_trigger_state(int state)
> > +{
> > + unsigned long flags;
> > + int ret = 0;
> > +
> > + if (boost_enabled != state) {
> > + write_lock_irqsave(&cpufreq_driver_lock, flags);
> > + boost_enabled = state;
> > +
> > + ret = cpufreq_driver->enable_boost(state);
> > + if (ret)
> > + boost_enabled = 0;
> > +
> > + write_unlock_irqrestore(&cpufreq_driver_lock,
> > flags); +
> > + if (ret)
> > + pr_err("%s: BOOST cannot enable (%d)\n",
>
> Who said we are enabling it?
You are right here - also disablement could fail. I will fix it.
>
> > + __func__, ret);
> > + }
> > +
> > + return ret;
> > +}
> > +
> > +int cpufreq_boost_supported(void)
> > +{
> > + if (cpufreq_driver)
> > + return cpufreq_driver->boost_supported;
> > +
> > + return 0;
> > +}
> > +EXPORT_SYMBOL_GPL(cpufreq_boost_supported);
> > +
> > +int cpufreq_boost_enabled(void)
> > +{
> > + return boost_enabled;
> > +}
> > +EXPORT_SYMBOL_GPL(cpufreq_boost_enabled);
> > +
> > +void cpufreq_set_boost_enabled(int state)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [*]
>
> Maybe cpufreq_block_boost? As suggested by Rafael.
What do you mean by cpufreq_block_boost()? This name would reverse the
logic.
Function [*] is used to change boost_enabled static flag (defined at
cpufreq.c file) state according to acpi-cpufreq.c boost support status.
>
> > +{
> > + boost_enabled = state;
> > +}
> > +EXPORT_SYMBOL_GPL(cpufreq_set_boost_enabled);
> > +
> > +/*********************************************************************
> > * REGISTER / UNREGISTER CPUFREQ
> > DRIVER *
> > *********************************************************************/
> >
> > @@ -2001,6 +2094,22 @@ int cpufreq_register_driver(struct
> > cpufreq_driver *driver_data) cpufreq_driver = driver_data;
> > write_unlock_irqrestore(&cpufreq_driver_lock, flags);
> >
> > + if (cpufreq_driver->boost_supported) {
> > + /*
> > + * Check if boost driver provides function to
> > enable boost -
> > + * if not, use cpufreq_boost_enable_sw as default
> > + */
> > + if (!cpufreq_driver->enable_boost)
> > + cpufreq_driver->enable_boost =
> > &cpufreq_boost_enable_sw;
>
> & is redundant.
Yes, correct. I will change that.
--
Best regards,
Lukasz Majewski
Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
--
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