From: Arnd Bergmann <arnd@arndb.de>
To: Kevin Diggs <kevdig@hypersurf.com>
Cc: linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] Add cpufreq driver for the IBM PowerPC 750GX
Date: Thu, 28 Aug 2008 09:46:09 +0200 [thread overview]
Message-ID: <200808280946.10077.arnd@arndb.de> (raw)
In-Reply-To: <48B5C0AD.9040006@hypersurf.com>
On Wednesday 27 August 2008, Kevin Diggs wrote:
> Arnd Bergmann wrote:
> >
> > Module parameter names should be short, so just "minmax" would
> > be a good name, but better put the module_param() line right
> > after that. If it's a bool type, I would just leave out the
> > initialization.
> >
> Ok. But leaving out the initialization will make me itch. Should I
> also replace "override_min_core" with "mincore" (or "min_core")? And
> "override_max_core" with "maxcore" (or "max_core")?
>
> Leaving out the initializations makes me ... uneasy. It's ok to leave
> them out if they are 0?
Yes, that's how global and static variables are defined in C.
Only automatic variables have undefined content.
> > I think the module_exit() function should leave the frequency in a
> > well-defined state, so the easiest way to get there is probably
> > to delete the timer, and then manually set the frequency.
> >
> I really don't follow you here? If I let the timer fire then the cpu
> (and the cpufreq sub-system) will be left in a well-defined state. I
> don't understand why you want me to delete the timer and then
> basically do manually what it was going to do anyway. There are two
> calls to cpufreq_notify_transition(). One just before the modify_PLL()
> call, with CPUFREQ_PRECHANGE as an argument, and one in the
> pll_switch_cb() routine, with CPUFREQ_POSTCHANGE as an argument. I
> would need to make sure that these are matched up.
>
> Even without the HRTimer stuff being used the timer fires in less than
> 4 ms (@ 250 HZ). So I can't see the user actually trying to interrupt
> a frequency change. With HRTimers it is 100 us.
>
> Can we please, please leave this part as is?
I'm still not convinced that it's actually correct if you call complete()
from the other places as well. You have three locations in your code where
you call complete() but only one for INIT_COMPLETION. The part that I don't
understand (and therefore don't expect other readers to understand) is how
the driver guarantees that only one complete() will be called on the
completion variable after it has been initialized.
What I meant with the well-defined state is that after unloading the module,
the CPU frequency should be the same as before loading the module, typically
the maximum frequency, but not the one that was set last.
Arnd <><
next prev parent reply other threads:[~2008-08-28 7:46 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-25 10:53 [PATCH 2/4] Add cpufreq driver for the IBM PowerPC 750GX Kevin Diggs
2008-08-25 11:43 ` Arnd Bergmann
2008-08-26 0:57 ` Kevin Diggs
2008-08-26 11:29 ` Arnd Bergmann
2008-08-27 9:11 ` Kevin Diggs
2008-08-27 11:34 ` Arnd Bergmann
2008-08-27 11:40 ` Geert Uytterhoeven
2008-08-27 16:08 ` Brad Boyer
2008-08-27 16:18 ` Geert Uytterhoeven
2008-08-27 21:01 ` Kevin Diggs
2008-08-28 7:46 ` Arnd Bergmann [this message]
2008-08-28 16:34 ` Kevin Diggs
2008-08-27 21:04 ` Kevin Diggs
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=200808280946.10077.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=kevdig@hypersurf.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.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 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).