From: Preeti U Murthy <preeti@linux.vnet.ibm.com>
To: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org, Anton Blanchard <anton@samba.org>,
"Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
Subject: Re: [PATCH v1 1/2] powernv: cpufreq driver for powernv platform
Date: Tue, 11 Feb 2014 14:07:30 +0530 [thread overview]
Message-ID: <52F9E14A.5090101@linux.vnet.ibm.com> (raw)
In-Reply-To: <20140211070201.21159.31101.stgit@drishya>
Hi Vaidy,
On 02/11/2014 12:32 PM, Vaidyanathan Srinivasan wrote:
> Backend driver to dynamically set voltage and frequency on
> IBM POWER non-virtualized platforms. Power management SPRs
> are used to set the required PState.
>
> This driver works in conjunction with cpufreq governors
> like 'ondemand' to provide a demand based frequency and
> voltage setting on IBM POWER non-virtualized platforms.
>
> PState table is obtained from OPAL v3 firmware through device
> tree.
>
> powernv_cpufreq back-end driver would parse the relevant device-tree
> nodes and initialise the cpufreq subsystem on powernv platform.
>
> Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
> Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
> Signed-off-by: Anton Blanchard <anton@samba.org>
> ---
<snip>
> +static int powernv_cpufreq_cpu_init(struct cpufreq_policy *policy)
> +{
> + int base, i;
> +
> +#ifdef CONFIG_SMP
> + base = cpu_first_thread_sibling(policy->cpu);
> +
> + for (i = 0; i < threads_per_core; i++)
> + cpumask_set_cpu(base + i, policy->cpus);
> +#endif
> + policy->cpuinfo.transition_latency = 25000;
Is it ok to hard code this field? How about getting this also from the
device tree?
> +
> + /* Print frequency table */
> + for (i = 0; powernv_freqs[i].frequency != CPUFREQ_TABLE_END; i++)
> + pr_debug("%d: %d\n", i, powernv_freqs[i].frequency);
The frequency table as a result will be printed on every cpu when
cpufreq gets initialized. Considering this information will not vary
across CPUs, can we print this during powernv_cpufreq_init() after
parsing the device tree for the pstates?
Thanks
Regards
Preeti U Murthy
next prev parent reply other threads:[~2014-02-11 8:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-11 7:01 [PATCH v1 0/2] powernv: cpufreq support for IBM POWERNV platform Vaidyanathan Srinivasan
2014-02-11 7:02 ` [PATCH v1 1/2] powernv: cpufreq driver for powernv platform Vaidyanathan Srinivasan
2014-02-11 8:37 ` Preeti U Murthy [this message]
2014-02-11 7:02 ` [PATCH v1 2/2] powernv, cpufreq: Add per-core locking to serialize frequency transitions Vaidyanathan Srinivasan
2014-02-11 8:15 ` Preeti U Murthy
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=52F9E14A.5090101@linux.vnet.ibm.com \
--to=preeti@linux.vnet.ibm.com \
--cc=anton@samba.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=srivatsa.bhat@linux.vnet.ibm.com \
--cc=svaidy@linux.vnet.ibm.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.