All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla@arm.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Sudeep Holla <sudeep.holla@arm.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Liviu Dudau <Liviu.Dudau@arm.com>,
	Lorenzo Pieralisi <Lorenzo.Pieralisi@arm.com>,
	"Jon Medhurst (Tixy)" <tixy@linaro.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>
Subject: Re: [PATCH 4/4] cpufreq: arm_big_little: add SCPI interface driver
Date: Wed, 29 Apr 2015 10:39:48 +0100	[thread overview]
Message-ID: <5540A6E4.8030504@arm.com> (raw)
In-Reply-To: <CAKohpondhNBhWBjspSSoBUz-V605K+4UEqQFdTCqRd=Yc-RXCg@mail.gmail.com>

Hi Viresh,

Thanks for the review.

On 29/04/15 06:44, Viresh Kumar wrote:
> On 27 April 2015 at 17:10, Sudeep Holla <sudeep.holla@arm.com> wrote:
>> diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm
>> index 4f3dbc8cf729..9e678bf1687c 100644
>> --- a/drivers/cpufreq/Kconfig.arm
>> +++ b/drivers/cpufreq/Kconfig.arm
>> @@ -24,6 +24,15 @@ config ARM_VEXPRESS_SPC_CPUFREQ
>>             This add the CPUfreq driver support for Versatile Express
>>            big.LITTLE platforms using SPC for power management.
>>
>> +config ARM_SCPI_CPUFREQ
>> +        tristate "SCPI based CPUfreq driver"
>> +       depends on ARM_BIG_LITTLE_CPUFREQ && ARM_SCPI_PROTOCOL
>> +        help
>> +          This add the CPUfreq driver support for ARM big.LITTLE platforms
>> +         using SCPI interface for CPU power management.
>> +
>> +         This driver works only if firmware the supporting CPU DVFS adhere
>> +         to SCPI protocol.
>
> Wanna reword that ?
>

Ok


[...]

>> +static int scpi_init_opp_table(struct device *cpu_dev)
>> +{
>> +       u8 domain = topology_physical_package_id(cpu_dev->id);
>> +       struct scpi_dvfs_info *info;
>> +       struct scpi_opp *opp;
>> +       int idx, ret = 0;
>> +
>> +       if ((dev_pm_opp_get_opp_count(cpu_dev)) > 0)
>> +               return 0;
>
> Why, who would have added it ?
>

IIRC, it was added to prevent spurious duplicate OPP addition messages
during CPU hotplug. I will check it again.

>> +       info = scpi_ops->dvfs_get_info(domain);
>
> Isn't calling this twice costly for getting the same information ?
>

No the SCPI protocol saves them and return just the pointer if it's
already populated.

>> +       if (IS_ERR(info))
>> +               return PTR_ERR(info);
>> +
>> +       opp = info->opps;
>> +       if (!opp)
>> +               return -EIO;
>> +
>> +       for (idx = 0; idx < info->count; idx++, opp++) {
>> +               ret = dev_pm_opp_add(cpu_dev, opp->freq, opp->m_volt * 1000);
>> +               if (ret) {
>> +                       dev_warn(cpu_dev, "failed to add opp %uHz %umV\n",
>> +                                opp->freq, opp->m_volt);
>
> Don't you want to free earlier OPPs here ?
>

Make sense will fix.

>> +static struct cpufreq_arm_bL_ops scpi_cpufreq_ops = {
>> +       .name   = "scpi",
>> +       .get_transition_latency = scpi_get_transition_latency,
>> +       .init_opp_table = scpi_init_opp_table,
>
> Don't want to free/remove OPPs ?
>

Ah I see a new function is added, will fix it. In-fact this driver was
written before that and was held up since the firmware was not stable.

[...]

>> +static struct platform_driver scpi_cpufreq_platdrv = {
>> +       .driver = {
>> +               .name   = "scpi-cpufreq",
>> +               .owner  = THIS_MODULE,
>> +       },
>> +       .probe          = scpi_cpufreq_probe,
>> +       .remove         = scpi_cpufreq_remove,
>> +};
>> +module_platform_driver(scpi_cpufreq_platdrv);
>> +
>> +MODULE_LICENSE("GPL");
>
> GPL V2 ?
>
> Author/Description missing ..
>

Will fix it in next version.

Regards,
Sudeep

  reply	other threads:[~2015-04-29  9:39 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-27 11:40 [PATCH 0/4] ARM64: add SCPI mailbox protocol, clock and CPUFreq support Sudeep Holla
     [not found] ` <1430134846-24320-1-git-send-email-sudeep.holla-5wv7dgnIgG8@public.gmane.org>
2015-04-27 11:40   ` [PATCH 1/4] mailbox: add support for System Control and Power Interface(SCPI) protocol Sudeep Holla
2015-04-27 11:40     ` Sudeep Holla
2015-04-28  7:36     ` Paul Bolle
2015-04-28  8:41       ` Sudeep Holla
2015-04-28 13:54     ` Jon Medhurst (Tixy)
2015-04-29 10:53       ` Sudeep Holla
2015-04-29 11:43         ` Jon Medhurst (Tixy)
2015-04-29 12:25           ` Jon Medhurst (Tixy)
2015-04-29 13:08             ` Sudeep Holla
2015-04-30  8:49             ` Jon Medhurst (Tixy)
2015-04-29 13:01           ` Sudeep Holla
2015-05-13 16:52     ` Jassi Brar
2015-05-13 17:09       ` Sudeep Holla
     [not found]         ` <55538540.1010505-5wv7dgnIgG8@public.gmane.org>
2015-05-14  7:02           ` Jassi Brar
2015-05-14  7:02             ` Jassi Brar
2015-05-14  7:30             ` Jassi Brar
     [not found]               ` <CABb+yY0J1j=wMaKj+1nohU7qJpVS83BD_AX3Mf56T5+6V6+NOA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-14  8:25                 ` Sudeep Holla
2015-05-14  8:25                   ` Sudeep Holla
2015-04-27 11:40 ` [PATCH 2/4] clk: add support for clocks provided by SCP(System Control Processor) Sudeep Holla
2015-05-07 10:17   ` Lorenzo Pieralisi
2015-05-20 23:43   ` Stephen Boyd
2015-05-26 13:14     ` Sudeep Holla
2015-04-27 11:40 ` [PATCH 3/4] clk: scpi: add support for cpufreq virtual device Sudeep Holla
2015-05-20 23:45   ` Stephen Boyd
2015-05-26 13:25     ` Sudeep Holla
2015-04-27 11:40 ` [PATCH 4/4] cpufreq: arm_big_little: add SCPI interface driver Sudeep Holla
2015-04-29  5:44   ` Viresh Kumar
2015-04-29  9:39     ` Sudeep Holla [this message]
2015-05-01 13:19   ` Jon Medhurst (Tixy)
2015-05-01 13:32     ` Sudeep Holla
2015-05-01 14:12       ` Jon Medhurst (Tixy)
2015-05-01 14:15         ` Sudeep Holla
2015-05-01 17:10           ` Jon Medhurst (Tixy)
2015-05-01 17:14             ` Sudeep Holla
2015-04-27 18:11 ` [PATCH 0/4] ARM64: add SCPI mailbox protocol, clock and CPUFreq support Jon Medhurst (Tixy)
2015-04-28  8:47   ` Sudeep Holla
2015-04-28 14:21   ` Sudeep Holla

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=5540A6E4.8030504@arm.com \
    --to=sudeep.holla@arm.com \
    --cc=Liviu.Dudau@arm.com \
    --cc=Lorenzo.Pieralisi@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=tixy@linaro.org \
    --cc=viresh.kumar@linaro.org \
    /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.