Re: [PATCH 2/4] Add cpufreq driver for the IBM PowerPC 750GX

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Kevin Diggs
Date: Thursday, August 28, 2008 - 9:34 am

Arnd Bergmann wrote:
As you point out, there are three calls to complete().

The first is in the switch callback, in the idle_pll_off disabled branch.
This callback is triggered from the pll switch routine in pll_if. So that
means the call to _modify_PLL() in _target worked. So the complete() call
in _target will NOT be called. The complete() call in the lock callback
is only called in the idle_pll_off enabled branch.

As just mentioned, the second complete() call in the lock callback is
only called when idle_pll_off is enabled.

The final complete() call is in the unlock exit path in _target(). This
is an error path, where for one reason or another, there was no successful
call to _modify_PLL(). Thus there will be triggering of either callback.

There is another initialization of the completion:  the DECLARE_COMPLETION().
I think I will deadlock if I get unloaded before _target() is ever called.
This can happen. I may add a test_bit(...changing_pll_bit) condition on the
wait_for_completion() call.
Thanks for taking the time to review and for the comments!

kevin

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 2/4] Add cpufreq driver for the IBM PowerPC 750GX, Geert Uytterhoeven, (Wed Aug 27, 4:40 am)
Re: [PATCH 2/4] Add cpufreq driver for the IBM PowerPC 750GX, Kevin Diggs, (Thu Aug 28, 9:34 am)