* [GIT PULL] : clk: implement clock rate protection mechanism
@ 2017-11-27 18:25 Jerome Brunet
2017-11-29 12:07 ` Linus Walleij
2017-12-01 16:45 ` Michael Turquette
0 siblings, 2 replies; 4+ messages in thread
From: Jerome Brunet @ 2017-11-27 18:25 UTC (permalink / raw)
To: Stephen Boyd, Michael Turquette
Cc: linux-clk, Maxime Ripard, Linus Walleij, Quentin Schulz
Dear clock maintainers,
Below is a request to pull the v4 of the clock protect patchset [0].
I have done the documentation correction requested by Mike,
added his Ack and Maxime's Tested-By.
Cheers
Jerome
[0]: https://lkml.kernel.org/r/20170924200030.6227-1-jbrunet@baylibre.com
The following changes since commit 4fbd8d194f06c8a3fd2af1ce560ddb31f7ec8323:
Linux 4.15-rc1 (2017-11-26 16:01:47 -0800)
are available in the Git repository at:
git://github.com/jeromebrunet/linux.git tags/clk-protect-v4.15-rc1-v4
for you to fetch changes up to 3e127536c3642adb18cc09d82f93aa31e8364d9d:
clk: fix set_rate_range when current rate is out of range (2017-11-27 17:20:12 +0100)
----------------------------------------------------------------
This patchset introduce clock protection to the CCF core. This can then
be used for:
* Provide a way for a consumer to claim exclusivity over the rate control
of a provider. Some clock consumers require that a clock rate must not
deviate from its selected frequency. There can be several reasons for
this, not least of which is that some hardware may not be able to
handle or recover from a glitch caused by changing the clock rate while
the hardware is in operation. For such HW, The ability to get exclusive
control of a clock's rate, and release that exclusivity, could be seen
as a fundamental clock rate control primitive. The exclusivity is not
preemptible, so when claimed more than once, is rate is effectively
locked.
* Provide a similar functionality to providers themselves, fixing
CLK_SET_RATE_GATE flag (enforce clock gating along the tree). While
there might still be a few platforms relying the broken implementation,
tests done has shown this change to be pretty safe.
----------------------------------------------------------------
Jerome Brunet (10):
clk: fix incorrect usage of ENOSYS
clk: take the prepare lock out of clk_core_set_parent
clk: add clk_core_set_phase_nolock function
clk: rework calls to round and determine rate callbacks
clk: use round rate to bail out early in set_rate
clk: add clock protection mechanism to clk core
clk: cosmetic changes to clk_summary debugfs entry
clk: fix CLK_SET_RATE_GATE with clock rate protection
clk: add clk_rate_exclusive api
clk: fix set_rate_range when current rate is out of range
drivers/clk/clk.c | 509 +++++++++++++++++++++++++++++++++++++------
include/linux/clk-provider.h | 1 +
include/linux/clk.h | 62 ++++++
3 files changed, 502 insertions(+), 70 deletions(-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [GIT PULL] : clk: implement clock rate protection mechanism
2017-11-27 18:25 [GIT PULL] : clk: implement clock rate protection mechanism Jerome Brunet
@ 2017-11-29 12:07 ` Linus Walleij
2017-12-01 16:14 ` Michael Turquette
2017-12-01 16:45 ` Michael Turquette
1 sibling, 1 reply; 4+ messages in thread
From: Linus Walleij @ 2017-11-29 12:07 UTC (permalink / raw)
To: Jerome Brunet, Stephen Boyd
Cc: Michael Turquette, linux-clk, Maxime Ripard, Quentin Schulz, Opera
On Mon, Nov 27, 2017 at 7:25 PM, Jerome Brunet <jbrunet@baylibre.com> wrote:
> This patchset introduce clock protection to the CCF core. This can then
> be used for:
>
> * Provide a way for a consumer to claim exclusivity over the rate control
> of a provider. Some clock consumers require that a clock rate must not
> deviate from its selected frequency. There can be several reasons for
> this, not least of which is that some hardware may not be able to
> handle or recover from a glitch caused by changing the clock rate while
> the hardware is in operation. For such HW, The ability to get exclusive
> control of a clock's rate, and release that exclusivity, could be seen
> as a fundamental clock rate control primitive. The exclusivity is not
> preemptible, so when claimed more than once, is rate is effectively
> locked.
>
> * Provide a similar functionality to providers themselves, fixing
> CLK_SET_RATE_GATE flag (enforce clock gating along the tree). While
> there might still be a few platforms relying the broken implementation,
> tests done has shown this change to be pretty safe.
I recently brought up with Sboyd that we couldn't get some graphics
going on the qualcomms without a patch like this:
https://marc.info/?l=linux-clk&m=150708421709125&w=2
In his reply:
https://marc.info/?l=linux-clk&m=150960601110643&w=2
he said that it was blocked because it's part of clock rate protection
problems with Krait CPUfreq.
So I was wondering whether this patch set hits the nail on its head
wrt the requirements for Krait CPUfreq upstreaming too, or if it
is looking for another solution altogether?
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [GIT PULL] : clk: implement clock rate protection mechanism
2017-11-29 12:07 ` Linus Walleij
@ 2017-12-01 16:14 ` Michael Turquette
0 siblings, 0 replies; 4+ messages in thread
From: Michael Turquette @ 2017-12-01 16:14 UTC (permalink / raw)
To: Linus Walleij
Cc: Jerome Brunet, Stephen Boyd, linux-clk, Maxime Ripard,
Quentin Schulz, Opera
Hi Linus,
On Wed, Nov 29, 2017 at 4:07 AM, Linus Walleij <linus.walleij@linaro.org> wrote:
> On Mon, Nov 27, 2017 at 7:25 PM, Jerome Brunet <jbrunet@baylibre.com> wrote:
>
>> This patchset introduce clock protection to the CCF core. This can then
>> be used for:
>>
>> * Provide a way for a consumer to claim exclusivity over the rate control
>> of a provider. Some clock consumers require that a clock rate must not
>> deviate from its selected frequency. There can be several reasons for
>> this, not least of which is that some hardware may not be able to
>> handle or recover from a glitch caused by changing the clock rate while
>> the hardware is in operation. For such HW, The ability to get exclusive
>> control of a clock's rate, and release that exclusivity, could be seen
>> as a fundamental clock rate control primitive. The exclusivity is not
>> preemptible, so when claimed more than once, is rate is effectively
>> locked.
>>
>> * Provide a similar functionality to providers themselves, fixing
>> CLK_SET_RATE_GATE flag (enforce clock gating along the tree). While
>> there might still be a few platforms relying the broken implementation,
>> tests done has shown this change to be pretty safe.
>
> I recently brought up with Sboyd that we couldn't get some graphics
> going on the qualcomms without a patch like this:
> https://marc.info/?l=linux-clk&m=150708421709125&w=2
>
> In his reply:
> https://marc.info/?l=linux-clk&m=150960601110643&w=2
> he said that it was blocked because it's part of clock rate protection
> problems with Krait CPUfreq.
>
> So I was wondering whether this patch set hits the nail on its head
> wrt the requirements for Krait CPUfreq upstreaming too, or if it
> is looking for another solution altogether?
Coordinated clock rates (ccr) is the vaporware that could help with
both the high-intermediate-clock-frequency problem as well as the
Krait cpufreq problem. Problem is that it's still vaporware (or I turn
out a new spin of those patches roughly once per year).
This series from Jerome may or may not help you. If you have sibling
clocks that are changing the rate of a shared parent, then this series
should help you. Or if you have clocks whose rates are being changed
briefly during a set_rate event from another sibling clock, then this
series should help you. Or if you have multiple clock inputs/parents
to select from and you want to choose one which that is not claimed
and rate-locked by a sibling clock, then this series should help you.
I'm planning to merge this in today. Let me know if something
spectacular breaks ;-)
Best regards,
Mike
>
> Yours,
> Linus Walleij
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [GIT PULL] : clk: implement clock rate protection mechanism
2017-11-27 18:25 [GIT PULL] : clk: implement clock rate protection mechanism Jerome Brunet
2017-11-29 12:07 ` Linus Walleij
@ 2017-12-01 16:45 ` Michael Turquette
1 sibling, 0 replies; 4+ messages in thread
From: Michael Turquette @ 2017-12-01 16:45 UTC (permalink / raw)
To: Jerome Brunet
Cc: Stephen Boyd, linux-clk, Maxime Ripard, Linus Walleij, Quentin Schulz
Hi Jerome,
On Mon, Nov 27, 2017 at 10:25 AM, Jerome Brunet <jbrunet@baylibre.com> wrote:
> Dear clock maintainers,
>
> Below is a request to pull the v4 of the clock protect patchset [0].
> I have done the documentation correction requested by Mike,
> added his Ack and Maxime's Tested-By.
Pulled.
Regards,
Mike
>
> Cheers
> Jerome
>
> [0]: https://lkml.kernel.org/r/20170924200030.6227-1-jbrunet@baylibre.com
>
> The following changes since commit 4fbd8d194f06c8a3fd2af1ce560ddb31f7ec8323:
>
> Linux 4.15-rc1 (2017-11-26 16:01:47 -0800)
>
> are available in the Git repository at:
>
> git://github.com/jeromebrunet/linux.git tags/clk-protect-v4.15-rc1-v4
>
> for you to fetch changes up to 3e127536c3642adb18cc09d82f93aa31e8364d9d:
>
> clk: fix set_rate_range when current rate is out of range (2017-11-27 17:20:12 +0100)
>
> ----------------------------------------------------------------
> This patchset introduce clock protection to the CCF core. This can then
> be used for:
>
> * Provide a way for a consumer to claim exclusivity over the rate control
> of a provider. Some clock consumers require that a clock rate must not
> deviate from its selected frequency. There can be several reasons for
> this, not least of which is that some hardware may not be able to
> handle or recover from a glitch caused by changing the clock rate while
> the hardware is in operation. For such HW, The ability to get exclusive
> control of a clock's rate, and release that exclusivity, could be seen
> as a fundamental clock rate control primitive. The exclusivity is not
> preemptible, so when claimed more than once, is rate is effectively
> locked.
>
> * Provide a similar functionality to providers themselves, fixing
> CLK_SET_RATE_GATE flag (enforce clock gating along the tree). While
> there might still be a few platforms relying the broken implementation,
> tests done has shown this change to be pretty safe.
>
> ----------------------------------------------------------------
> Jerome Brunet (10):
> clk: fix incorrect usage of ENOSYS
> clk: take the prepare lock out of clk_core_set_parent
> clk: add clk_core_set_phase_nolock function
> clk: rework calls to round and determine rate callbacks
> clk: use round rate to bail out early in set_rate
> clk: add clock protection mechanism to clk core
> clk: cosmetic changes to clk_summary debugfs entry
> clk: fix CLK_SET_RATE_GATE with clock rate protection
> clk: add clk_rate_exclusive api
> clk: fix set_rate_range when current rate is out of range
>
> drivers/clk/clk.c | 509 +++++++++++++++++++++++++++++++++++++------
> include/linux/clk-provider.h | 1 +
> include/linux/clk.h | 62 ++++++
> 3 files changed, 502 insertions(+), 70 deletions(-)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-12-01 16:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-27 18:25 [GIT PULL] : clk: implement clock rate protection mechanism Jerome Brunet
2017-11-29 12:07 ` Linus Walleij
2017-12-01 16:14 ` Michael Turquette
2017-12-01 16:45 ` Michael Turquette
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.