From: paul.devriendt@AMD.com
To: linux@brodo.de, pavel@suse.cz
Cc: davej@redhat.com, linux-kernel@vger.kernel.org, aj@suse.de,
mark.langsdorf@AMD.com, richard.brunner@AMD.com,
cpufreq@www.linux.org.uk
Subject: RE: Cpufreq for opteron
Date: Tue, 26 Aug 2003 19:43:37 -0500 [thread overview]
Message-ID: <99F2150714F93F448942F9A9F112634C080EF034@txexmtae.amd.com> (raw)
> > +#define VERSION "version 1.00.06 - August 13, 2003"
>
> If AMD wants it in, let's put it into the /* comment header
> at the top */ ?
It gets written to the log file with printk ... if someone needs
to send me a log file of an error, I find it helpful to know what
version of the driver it came from.
> > +static int onbattery = 1; /* Set if running on battery,
> reset otherwise. */
> > + /* Of no relevance unless
> batterypstates < */
> > + /* numpstates, as defined in the
> PSB/PST. */
>
> I dislike this interaction between ACPI and cpufreq -- it
> should be done
> more generally. Let's discuss that seperately, though. And if
> the code is
> dead code at the moment.
The dead code has been removed in 1.00.07 of the driver. I am
happy to receive suggestions as to better ways of detecting battery
versus mains power transitions.
> > +static int
> > +drv_verify(struct cpufreq_policy *pol)
> > +{
> <snip>
> > + dprintk(KERN_DEBUG PFX
> > + "ver: cpu%d, min %d, max %d, cur %d, pol %d
> (%s)\n", pol->cpu,
> > + pol->min, pol->max, pol->cur, pol->policy,
> > + pol->policy ==
> > + CPUFREQ_POLICY_POWERSAVE ? "psave" : pol->policy ==
> > + CPUFREQ_POLICY_PERFORMANCE ? "perf" : "unk");
> > +
> > + if (pol->cpu != 0) {
> > + printk(KERN_ERR PFX "verify - cpu not 0\n");
> > + return -ENODEV;
> > + }
> > +
> > + res = find_match(&targ, &min, &max,
> > + pol->policy ==
> > + CPUFREQ_POLICY_POWERSAVE ? SEARCH_DOWN
> : SEARCH_UP, 0,
> > + 0);
>
> Why do you check for CPUFREQ_POLICY here??? In a ->target
> class cpufreq
> driver[*] you must not worry about the policy, only about min and max
> frequency.
>
> [*] ->target class cpufreq drivers [cpufreq_driver->target is
> used] have
> specific operating frequencies.
> ->setpolicy class cpufreq drivers have operating frequency ranges
> [currently only available on Transmeta Crusoe processors]
If the driver has to expand the range to find a matching frequency, it
has to know whether to expand up or down. That comes from policy.
> Also, it'd be great if this driver were converted to use the CPUfreq
> freuqency table helpers -- check drivers/cpufreq/freq_table.c in
> linux-2.6.0-test4. Using it makes the code much cleaner, easier to
> understand, and less prone to errors.
I'll look into for the next rev.
> Dominik
Thanks. Paul.
next reply other threads:[~2003-08-27 0:49 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-27 0:43 paul.devriendt [this message]
2003-08-27 5:13 ` Cpufreq for opteron Dominik Brodowski
-- strict thread matches above, loose matches on Subject: below --
2003-08-25 14:09 paul.devriendt
2003-08-25 12:53 paul.devriendt
2003-08-25 13:51 ` Pavel Machek
[not found] <99F2150714F93F448942F9A9F112634C080EF006@txexmtae.amd.com.suse.lists.linux.kernel>
[not found] ` <20030825084616.GC403@elf.ucw.cz.suse.lists.linux.kernel>
2003-08-25 10:56 ` Andi Kleen
2003-08-24 15:31 paul.devriendt
2003-08-25 9:35 ` Pavel Machek
2003-08-22 20:09 paul.devriendt
2003-08-25 8:46 ` Pavel Machek
2003-08-25 13:30 ` Valdis.Kletnieks
2003-08-22 16:25 Andi Kleen
2003-08-22 13:59 Pavel Machek
2003-08-22 14:43 ` Dave Jones
2003-08-22 19:55 ` Pavel Machek
2003-08-22 20:05 ` Pavel Machek
2003-08-26 23:02 ` Dominik Brodowski
2003-08-22 14:52 ` Christoph Hellwig
2003-08-22 14:55 ` Dave Jones
2003-08-22 19:54 ` Pavel Machek
2003-08-23 7:55 ` Rogier Wolff
2003-08-23 17:50 ` Christoph Hellwig
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=99F2150714F93F448942F9A9F112634C080EF034@txexmtae.amd.com \
--to=paul.devriendt@amd.com \
--cc=aj@suse.de \
--cc=cpufreq@www.linux.org.uk \
--cc=davej@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@brodo.de \
--cc=mark.langsdorf@AMD.com \
--cc=pavel@suse.cz \
--cc=richard.brunner@AMD.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).