2018-12-11 09:43:03 -08:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-05-08 15:14:57 -03:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
2025-08-14 11:53:15 +08:00
|
|
|
|
|
|
|
|
|
2015-06-19 15:00:46 -07:00
|
|
|
|
2015-01-29 14:22:50 -08:00
|
|
|
|
2025-08-14 11:53:15 +08:00
|
|
|
|
|
|
|
|
|
2025-08-14 11:53:16 +08:00
|
|
|
|
2025-08-14 11:53:15 +08:00
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
2012-04-09 14:50:06 -05:00
|
|
|
|
2017-08-21 10:04:59 +02:00
|
|
|
|
2013-03-28 13:59:02 -07:00
|
|
|
|
2025-08-14 11:53:15 +08:00
|
|
|
|
|
|
|
|
|
2025-08-14 11:53:16 +08:00
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2013-08-23 17:03:43 +02:00
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-28 13:59:02 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-08-14 11:53:16 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clk: Get runtime PM before walking tree during disable_unused
Doug reported [1] the following hung task:
INFO: task swapper/0:1 blocked for more than 122 seconds.
Not tainted 5.15.149-21875-gf795ebc40eb8 #1
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:swapper/0 state:D stack: 0 pid: 1 ppid: 0 flags:0x00000008
Call trace:
__switch_to+0xf4/0x1f4
__schedule+0x418/0xb80
schedule+0x5c/0x10c
rpm_resume+0xe0/0x52c
rpm_resume+0x178/0x52c
__pm_runtime_resume+0x58/0x98
clk_pm_runtime_get+0x30/0xb0
clk_disable_unused_subtree+0x58/0x208
clk_disable_unused_subtree+0x38/0x208
clk_disable_unused_subtree+0x38/0x208
clk_disable_unused_subtree+0x38/0x208
clk_disable_unused_subtree+0x38/0x208
clk_disable_unused+0x4c/0xe4
do_one_initcall+0xcc/0x2d8
do_initcall_level+0xa4/0x148
do_initcalls+0x5c/0x9c
do_basic_setup+0x24/0x30
kernel_init_freeable+0xec/0x164
kernel_init+0x28/0x120
ret_from_fork+0x10/0x20
INFO: task kworker/u16:0:9 blocked for more than 122 seconds.
Not tainted 5.15.149-21875-gf795ebc40eb8 #1
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/u16:0 state:D stack: 0 pid: 9 ppid: 2 flags:0x00000008
Workqueue: events_unbound deferred_probe_work_func
Call trace:
__switch_to+0xf4/0x1f4
__schedule+0x418/0xb80
schedule+0x5c/0x10c
schedule_preempt_disabled+0x2c/0x48
__mutex_lock+0x238/0x488
__mutex_lock_slowpath+0x1c/0x28
mutex_lock+0x50/0x74
clk_prepare_lock+0x7c/0x9c
clk_core_prepare_lock+0x20/0x44
clk_prepare+0x24/0x30
clk_bulk_prepare+0x40/0xb0
mdss_runtime_resume+0x54/0x1c8
pm_generic_runtime_resume+0x30/0x44
__genpd_runtime_resume+0x68/0x7c
genpd_runtime_resume+0x108/0x1f4
__rpm_callback+0x84/0x144
rpm_callback+0x30/0x88
rpm_resume+0x1f4/0x52c
rpm_resume+0x178/0x52c
__pm_runtime_resume+0x58/0x98
__device_attach+0xe0/0x170
device_initial_probe+0x1c/0x28
bus_probe_device+0x3c/0x9c
device_add+0x644/0x814
mipi_dsi_device_register_full+0xe4/0x170
devm_mipi_dsi_device_register_full+0x28/0x70
ti_sn_bridge_probe+0x1dc/0x2c0
auxiliary_bus_probe+0x4c/0x94
really_probe+0xcc/0x2c8
__driver_probe_device+0xa8/0x130
driver_probe_device+0x48/0x110
__device_attach_driver+0xa4/0xcc
bus_for_each_drv+0x8c/0xd8
__device_attach+0xf8/0x170
device_initial_probe+0x1c/0x28
bus_probe_device+0x3c/0x9c
deferred_probe_work_func+0x9c/0xd8
process_one_work+0x148/0x518
worker_thread+0x138/0x350
kthread+0x138/0x1e0
ret_from_fork+0x10/0x20
The first thread is walking the clk tree and calling
clk_pm_runtime_get() to power on devices required to read the clk
hardware via struct clk_ops::is_enabled(). This thread holds the clk
prepare_lock, and is trying to runtime PM resume a device, when it finds
that the device is in the process of resuming so the thread schedule()s
away waiting for the device to finish resuming before continuing. The
second thread is runtime PM resuming the same device, but the runtime
resume callback is calling clk_prepare(), trying to grab the
prepare_lock waiting on the first thread.
This is a classic ABBA deadlock. To properly fix the deadlock, we must
never runtime PM resume or suspend a device with the clk prepare_lock
held. Actually doing that is near impossible today because the global
prepare_lock would have to be dropped in the middle of the tree, the
device runtime PM resumed/suspended, and then the prepare_lock grabbed
again to ensure consistency of the clk tree topology. If anything
changes with the clk tree in the meantime, we've lost and will need to
start the operation all over again.
Luckily, most of the time we're simply incrementing or decrementing the
runtime PM count on an active device, so we don't have the chance to
schedule away with the prepare_lock held. Let's fix this immediate
problem that can be triggered more easily by simply booting on Qualcomm
sc7180.
Introduce a list of clk_core structures that have been registered, or
are in the process of being registered, that require runtime PM to
operate. Iterate this list and call clk_pm_runtime_get() on each of them
without holding the prepare_lock during clk_disable_unused(). This way
we can be certain that the runtime PM state of the devices will be
active and resumed so we can't schedule away while walking the clk tree
with the prepare_lock held. Similarly, call clk_pm_runtime_put() without
the prepare_lock held to properly drop the runtime PM reference. We
remove the calls to clk_pm_runtime_{get,put}() in this path because
they're superfluous now that we know the devices are runtime resumed.
Reported-by: Douglas Anderson <dianders@chromium.org>
Closes: https://lore.kernel.org/all/20220922084322.RFC.2.I375b6b9e0a0a5348962f004beb3dafee6a12dfbb@changeid/ [1]
Closes: https://issuetracker.google.com/328070191
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Fixes: 9a34b45397e5 ("clk: Add support for runtime PM")
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/20240325184204.745706-5-sboyd@kernel.org
Reviewed-by: Douglas Anderson <dianders@chromium.org>
2024-03-25 11:41:58 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-02-17 14:05:53 -08:00
|
|
|
|
2019-08-28 11:19:59 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-29 14:22:50 -08:00
|
|
|
|
|
|
|
|
|
2019-04-12 11:31:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-04-12 11:31:49 -07:00
|
|
|
|
2019-04-12 11:31:47 -07:00
|
|
|
|
|
|
|
|
|
2015-01-29 14:22:50 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-08-21 10:04:59 +02:00
|
|
|
|
clk: Get runtime PM before walking tree during disable_unused
Doug reported [1] the following hung task:
INFO: task swapper/0:1 blocked for more than 122 seconds.
Not tainted 5.15.149-21875-gf795ebc40eb8 #1
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:swapper/0 state:D stack: 0 pid: 1 ppid: 0 flags:0x00000008
Call trace:
__switch_to+0xf4/0x1f4
__schedule+0x418/0xb80
schedule+0x5c/0x10c
rpm_resume+0xe0/0x52c
rpm_resume+0x178/0x52c
__pm_runtime_resume+0x58/0x98
clk_pm_runtime_get+0x30/0xb0
clk_disable_unused_subtree+0x58/0x208
clk_disable_unused_subtree+0x38/0x208
clk_disable_unused_subtree+0x38/0x208
clk_disable_unused_subtree+0x38/0x208
clk_disable_unused_subtree+0x38/0x208
clk_disable_unused+0x4c/0xe4
do_one_initcall+0xcc/0x2d8
do_initcall_level+0xa4/0x148
do_initcalls+0x5c/0x9c
do_basic_setup+0x24/0x30
kernel_init_freeable+0xec/0x164
kernel_init+0x28/0x120
ret_from_fork+0x10/0x20
INFO: task kworker/u16:0:9 blocked for more than 122 seconds.
Not tainted 5.15.149-21875-gf795ebc40eb8 #1
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/u16:0 state:D stack: 0 pid: 9 ppid: 2 flags:0x00000008
Workqueue: events_unbound deferred_probe_work_func
Call trace:
__switch_to+0xf4/0x1f4
__schedule+0x418/0xb80
schedule+0x5c/0x10c
schedule_preempt_disabled+0x2c/0x48
__mutex_lock+0x238/0x488
__mutex_lock_slowpath+0x1c/0x28
mutex_lock+0x50/0x74
clk_prepare_lock+0x7c/0x9c
clk_core_prepare_lock+0x20/0x44
clk_prepare+0x24/0x30
clk_bulk_prepare+0x40/0xb0
mdss_runtime_resume+0x54/0x1c8
pm_generic_runtime_resume+0x30/0x44
__genpd_runtime_resume+0x68/0x7c
genpd_runtime_resume+0x108/0x1f4
__rpm_callback+0x84/0x144
rpm_callback+0x30/0x88
rpm_resume+0x1f4/0x52c
rpm_resume+0x178/0x52c
__pm_runtime_resume+0x58/0x98
__device_attach+0xe0/0x170
device_initial_probe+0x1c/0x28
bus_probe_device+0x3c/0x9c
device_add+0x644/0x814
mipi_dsi_device_register_full+0xe4/0x170
devm_mipi_dsi_device_register_full+0x28/0x70
ti_sn_bridge_probe+0x1dc/0x2c0
auxiliary_bus_probe+0x4c/0x94
really_probe+0xcc/0x2c8
__driver_probe_device+0xa8/0x130
driver_probe_device+0x48/0x110
__device_attach_driver+0xa4/0xcc
bus_for_each_drv+0x8c/0xd8
__device_attach+0xf8/0x170
device_initial_probe+0x1c/0x28
bus_probe_device+0x3c/0x9c
deferred_probe_work_func+0x9c/0xd8
process_one_work+0x148/0x518
worker_thread+0x138/0x350
kthread+0x138/0x1e0
ret_from_fork+0x10/0x20
The first thread is walking the clk tree and calling
clk_pm_runtime_get() to power on devices required to read the clk
hardware via struct clk_ops::is_enabled(). This thread holds the clk
prepare_lock, and is trying to runtime PM resume a device, when it finds
that the device is in the process of resuming so the thread schedule()s
away waiting for the device to finish resuming before continuing. The
second thread is runtime PM resuming the same device, but the runtime
resume callback is calling clk_prepare(), trying to grab the
prepare_lock waiting on the first thread.
This is a classic ABBA deadlock. To properly fix the deadlock, we must
never runtime PM resume or suspend a device with the clk prepare_lock
held. Actually doing that is near impossible today because the global
prepare_lock would have to be dropped in the middle of the tree, the
device runtime PM resumed/suspended, and then the prepare_lock grabbed
again to ensure consistency of the clk tree topology. If anything
changes with the clk tree in the meantime, we've lost and will need to
start the operation all over again.
Luckily, most of the time we're simply incrementing or decrementing the
runtime PM count on an active device, so we don't have the chance to
schedule away with the prepare_lock held. Let's fix this immediate
problem that can be triggered more easily by simply booting on Qualcomm
sc7180.
Introduce a list of clk_core structures that have been registered, or
are in the process of being registered, that require runtime PM to
operate. Iterate this list and call clk_pm_runtime_get() on each of them
without holding the prepare_lock during clk_disable_unused(). This way
we can be certain that the runtime PM state of the devices will be
active and resumed so we can't schedule away while walking the clk tree
with the prepare_lock held. Similarly, call clk_pm_runtime_put() without
the prepare_lock held to properly drop the runtime PM reference. We
remove the calls to clk_pm_runtime_{get,put}() in this path because
they're superfluous now that we know the devices are runtime resumed.
Reported-by: Douglas Anderson <dianders@chromium.org>
Closes: https://lore.kernel.org/all/20220922084322.RFC.2.I375b6b9e0a0a5348962f004beb3dafee6a12dfbb@changeid/ [1]
Closes: https://issuetracker.google.com/328070191
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Fixes: 9a34b45397e5 ("clk: Add support for runtime PM")
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/20240325184204.745706-5-sboyd@kernel.org
Reviewed-by: Douglas Anderson <dianders@chromium.org>
2024-03-25 11:41:58 -07:00
|
|
|
|
2019-04-12 11:31:46 -07:00
|
|
|
|
2015-01-29 14:22:50 -08:00
|
|
|
|
2019-04-12 11:31:47 -07:00
|
|
|
|
2015-01-29 14:22:50 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
2015-01-29 14:22:50 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-22 22:53:05 +02:00
|
|
|
|
2018-12-04 20:24:37 +01:00
|
|
|
|
2015-01-29 14:22:50 -08:00
|
|
|
|
|
|
|
|
|
2017-12-01 22:51:56 +01:00
|
|
|
|
2015-07-16 12:50:27 -07:00
|
|
|
|
|
|
|
|
|
2015-01-29 14:22:50 -08:00
|
|
|
|
|
|
|
|
|
clk: add duty cycle support
Add the possibility to apply and query the clock signal duty cycle ratio.
This is useful when the duty cycle of the clock signal depends on some
other parameters controlled by the clock framework.
For example, the duty cycle of a divider may depends on the raw divider
setting (ratio = N / div) , which is controlled by the CCF. In such case,
going through the pwm framework to control the duty cycle ratio of this
clock would be a burden.
A clock provider is not required to implement the operation to set and get
the duty cycle. If it does not implement .get_duty_cycle(), the ratio is
assumed to be 50%.
This change also adds a new flag, CLK_DUTY_CYCLE_PARENT. This flag should
be used to indicate that a clock, such as gates and muxes, may inherit
the duty cycle ratio of its parent clock. If a clock does not provide a
get_duty_cycle() callback and has CLK_DUTY_CYCLE_PARENT, then the call
will be directly forwarded to its parent clock, if any. For
set_duty_cycle(), the clock should also have CLK_SET_RATE_PARENT for the
call to be forwarded
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Michael Turquette <mturquette@baylibre.com>
Link: lkml.kernel.org/r/20180619144141.8506-1-jbrunet@baylibre.com
2018-06-19 16:41:41 +02:00
|
|
|
|
2015-01-29 14:22:50 -08:00
|
|
|
|
|
|
|
|
|
2025-08-14 11:53:16 +08:00
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
2015-01-29 14:22:50 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-06-10 13:28:27 +02:00
|
|
|
|
2015-01-29 14:22:50 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-02-02 14:37:41 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-29 14:22:50 -08:00
|
|
|
|
|
|
|
|
|
2018-12-11 08:34:16 -08:00
|
|
|
|
2015-01-29 14:22:50 -08:00
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
|
|
|
|
|
2017-12-01 22:51:59 +01:00
|
|
|
|
2015-02-06 11:42:44 -08:00
|
|
|
|
2015-01-29 14:22:50 -08:00
|
|
|
|
|
|
|
|
|
2017-08-21 10:04:59 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-04 20:24:37 +01:00
|
|
|
|
2017-08-21 10:04:59 +02:00
|
|
|
|
|
|
|
|
|
2022-04-18 11:04:55 +00:00
|
|
|
|
2017-08-21 10:04:59 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-04 20:24:37 +01:00
|
|
|
|
2017-08-21 10:04:59 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clk: Get runtime PM before walking tree during disable_unused
Doug reported [1] the following hung task:
INFO: task swapper/0:1 blocked for more than 122 seconds.
Not tainted 5.15.149-21875-gf795ebc40eb8 #1
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:swapper/0 state:D stack: 0 pid: 1 ppid: 0 flags:0x00000008
Call trace:
__switch_to+0xf4/0x1f4
__schedule+0x418/0xb80
schedule+0x5c/0x10c
rpm_resume+0xe0/0x52c
rpm_resume+0x178/0x52c
__pm_runtime_resume+0x58/0x98
clk_pm_runtime_get+0x30/0xb0
clk_disable_unused_subtree+0x58/0x208
clk_disable_unused_subtree+0x38/0x208
clk_disable_unused_subtree+0x38/0x208
clk_disable_unused_subtree+0x38/0x208
clk_disable_unused_subtree+0x38/0x208
clk_disable_unused+0x4c/0xe4
do_one_initcall+0xcc/0x2d8
do_initcall_level+0xa4/0x148
do_initcalls+0x5c/0x9c
do_basic_setup+0x24/0x30
kernel_init_freeable+0xec/0x164
kernel_init+0x28/0x120
ret_from_fork+0x10/0x20
INFO: task kworker/u16:0:9 blocked for more than 122 seconds.
Not tainted 5.15.149-21875-gf795ebc40eb8 #1
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/u16:0 state:D stack: 0 pid: 9 ppid: 2 flags:0x00000008
Workqueue: events_unbound deferred_probe_work_func
Call trace:
__switch_to+0xf4/0x1f4
__schedule+0x418/0xb80
schedule+0x5c/0x10c
schedule_preempt_disabled+0x2c/0x48
__mutex_lock+0x238/0x488
__mutex_lock_slowpath+0x1c/0x28
mutex_lock+0x50/0x74
clk_prepare_lock+0x7c/0x9c
clk_core_prepare_lock+0x20/0x44
clk_prepare+0x24/0x30
clk_bulk_prepare+0x40/0xb0
mdss_runtime_resume+0x54/0x1c8
pm_generic_runtime_resume+0x30/0x44
__genpd_runtime_resume+0x68/0x7c
genpd_runtime_resume+0x108/0x1f4
__rpm_callback+0x84/0x144
rpm_callback+0x30/0x88
rpm_resume+0x1f4/0x52c
rpm_resume+0x178/0x52c
__pm_runtime_resume+0x58/0x98
__device_attach+0xe0/0x170
device_initial_probe+0x1c/0x28
bus_probe_device+0x3c/0x9c
device_add+0x644/0x814
mipi_dsi_device_register_full+0xe4/0x170
devm_mipi_dsi_device_register_full+0x28/0x70
ti_sn_bridge_probe+0x1dc/0x2c0
auxiliary_bus_probe+0x4c/0x94
really_probe+0xcc/0x2c8
__driver_probe_device+0xa8/0x130
driver_probe_device+0x48/0x110
__device_attach_driver+0xa4/0xcc
bus_for_each_drv+0x8c/0xd8
__device_attach+0xf8/0x170
device_initial_probe+0x1c/0x28
bus_probe_device+0x3c/0x9c
deferred_probe_work_func+0x9c/0xd8
process_one_work+0x148/0x518
worker_thread+0x138/0x350
kthread+0x138/0x1e0
ret_from_fork+0x10/0x20
The first thread is walking the clk tree and calling
clk_pm_runtime_get() to power on devices required to read the clk
hardware via struct clk_ops::is_enabled(). This thread holds the clk
prepare_lock, and is trying to runtime PM resume a device, when it finds
that the device is in the process of resuming so the thread schedule()s
away waiting for the device to finish resuming before continuing. The
second thread is runtime PM resuming the same device, but the runtime
resume callback is calling clk_prepare(), trying to grab the
prepare_lock waiting on the first thread.
This is a classic ABBA deadlock. To properly fix the deadlock, we must
never runtime PM resume or suspend a device with the clk prepare_lock
held. Actually doing that is near impossible today because the global
prepare_lock would have to be dropped in the middle of the tree, the
device runtime PM resumed/suspended, and then the prepare_lock grabbed
again to ensure consistency of the clk tree topology. If anything
changes with the clk tree in the meantime, we've lost and will need to
start the operation all over again.
Luckily, most of the time we're simply incrementing or decrementing the
runtime PM count on an active device, so we don't have the chance to
schedule away with the prepare_lock held. Let's fix this immediate
problem that can be triggered more easily by simply booting on Qualcomm
sc7180.
Introduce a list of clk_core structures that have been registered, or
are in the process of being registered, that require runtime PM to
operate. Iterate this list and call clk_pm_runtime_get() on each of them
without holding the prepare_lock during clk_disable_unused(). This way
we can be certain that the runtime PM state of the devices will be
active and resumed so we can't schedule away while walking the clk tree
with the prepare_lock held. Similarly, call clk_pm_runtime_put() without
the prepare_lock held to properly drop the runtime PM reference. We
remove the calls to clk_pm_runtime_{get,put}() in this path because
they're superfluous now that we know the devices are runtime resumed.
Reported-by: Douglas Anderson <dianders@chromium.org>
Closes: https://lore.kernel.org/all/20220922084322.RFC.2.I375b6b9e0a0a5348962f004beb3dafee6a12dfbb@changeid/ [1]
Closes: https://issuetracker.google.com/328070191
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Fixes: 9a34b45397e5 ("clk: Add support for runtime PM")
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/20240325184204.745706-5-sboyd@kernel.org
Reviewed-by: Douglas Anderson <dianders@chromium.org>
2024-03-25 11:41:58 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-28 13:59:01 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-28 13:59:02 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-28 13:59:01 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-28 13:59:02 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-28 13:59:01 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-07-24 12:24:48 -07:00
|
|
|
|
2013-03-28 13:59:01 -07:00
|
|
|
|
|
|
|
|
|
2013-03-28 13:59:02 -07:00
|
|
|
|
2018-01-04 19:46:08 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-28 13:59:02 -07:00
|
|
|
|
|
|
|
|
|
2015-07-24 12:24:48 -07:00
|
|
|
|
2018-01-04 19:46:08 -06:00
|
|
|
|
|
|
|
|
|
2013-03-28 13:59:02 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-28 13:59:01 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-07-24 12:24:48 -07:00
|
|
|
|
2013-03-28 13:59:01 -07:00
|
|
|
|
2013-03-28 13:59:02 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-07-24 12:24:48 -07:00
|
|
|
|
|
|
|
|
|
2013-03-28 13:59:02 -07:00
|
|
|
|
2015-07-24 12:24:48 -07:00
|
|
|
|
2013-03-28 13:59:02 -07:00
|
|
|
|
2013-03-28 13:59:01 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-12-01 22:51:56 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
2012-12-26 19:16:22 +05:30
|
|
|
|
2017-08-21 10:04:59 +02:00
|
|
|
|
|
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-12-26 19:16:22 +05:30
|
|
|
|
2017-08-21 10:04:59 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-12-26 19:16:22 +05:30
|
|
|
|
|
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
2012-12-26 19:16:22 +05:30
|
|
|
|
2017-08-21 10:04:59 +02:00
|
|
|
|
|
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-12-26 19:16:22 +05:30
|
|
|
|
2017-08-21 10:04:59 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-04 20:24:37 +01:00
|
|
|
|
2017-08-21 10:04:59 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-01-03 17:23:30 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-08-21 10:04:59 +02:00
|
|
|
|
|
|
|
|
|
2018-12-04 20:24:37 +01:00
|
|
|
|
2017-12-22 17:46:04 +08:00
|
|
|
|
2017-08-21 10:04:59 +02:00
|
|
|
|
|
|
|
|
|
2012-12-26 19:16:22 +05:30
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
2015-10-16 14:35:21 +02:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2012-12-13 13:12:25 +01:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2015-08-12 13:04:56 -07:00
|
|
|
|
2015-06-25 15:55:14 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-17 15:44:22 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-26 11:20:09 -08:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2014-01-17 19:47:17 -08:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2015-08-12 13:04:56 -07:00
|
|
|
|
2015-06-25 15:55:14 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-08-12 13:04:56 -07:00
|
|
|
|
2015-06-25 15:55:14 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
|
|
|
|
|
2025-08-14 11:53:16 +08:00
|
|
|
|
|
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-08-14 11:53:16 +08:00
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
2025-08-14 11:53:16 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-08-13 14:41:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-04-12 11:31:47 -07:00
|
|
|
|
2019-04-12 11:31:48 -07:00
|
|
|
|
2019-04-12 11:31:47 -07:00
|
|
|
|
2019-04-30 10:22:30 -07:00
|
|
|
|
2019-04-12 11:31:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-04-12 11:31:48 -07:00
|
|
|
|
|
|
|
|
|
2019-04-12 11:31:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-08-13 14:41:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-04-12 11:31:47 -07:00
|
|
|
|
|
|
|
|
|
2019-04-30 10:22:30 -07:00
|
|
|
|
2019-04-12 11:31:47 -07:00
|
|
|
|
2019-04-30 10:22:30 -07:00
|
|
|
|
|
|
|
|
|
2019-04-12 11:31:48 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-04-12 11:31:47 -07:00
|
|
|
|
2019-08-13 14:41:47 -07:00
|
|
|
|
2019-04-12 11:31:47 -07:00
|
|
|
|
2019-08-13 14:41:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-04-12 11:31:48 -07:00
|
|
|
|
2019-08-13 14:41:47 -07:00
|
|
|
|
2019-04-12 11:31:48 -07:00
|
|
|
|
|
|
|
|
|
2019-04-12 11:31:47 -07:00
|
|
|
|
|
|
|
|
|
2024-03-02 00:52:14 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-04-12 11:31:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-06 10:48:20 +01:00
|
|
|
|
2019-04-12 11:31:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-04-30 10:22:30 -07:00
|
|
|
|
2020-02-03 17:37:45 -08:00
|
|
|
|
2019-04-12 11:31:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-12-07 20:15:33 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-04-12 11:31:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2013-07-29 12:24:58 +01:00
|
|
|
|
2019-04-12 11:31:47 -07:00
|
|
|
|
2013-07-29 12:24:58 +01:00
|
|
|
|
2015-12-28 19:23:01 +09:00
|
|
|
|
2019-04-12 11:31:47 -07:00
|
|
|
|
|
|
|
|
|
2015-12-28 19:23:01 +09:00
|
|
|
|
2019-04-12 11:31:47 -07:00
|
|
|
|
2013-07-29 12:24:58 +01:00
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2015-08-12 13:04:56 -07:00
|
|
|
|
|
|
|
|
|
2015-06-25 15:55:14 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-26 11:20:09 -08:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2019-02-01 15:39:50 -08:00
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2019-02-01 15:39:50 -08:00
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2019-02-01 15:39:50 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2015-08-12 13:04:56 -07:00
|
|
|
|
2015-06-25 15:55:14 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-02-05 15:28:01 -08:00
|
|
|
|
2013-12-21 10:34:47 +01:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2013-12-21 10:34:47 +01:00
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2013-12-21 10:34:47 +01:00
|
|
|
|
|
|
|
|
|
2015-08-12 13:04:56 -07:00
|
|
|
|
2015-06-25 15:55:14 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-08-12 13:04:56 -07:00
|
|
|
|
2015-06-25 15:55:14 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-02-01 13:58:38 +01:00
|
|
|
|
2015-06-25 15:55:14 -07:00
|
|
|
|
2015-10-24 18:55:22 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-02-01 13:58:38 +01:00
|
|
|
|
2015-10-24 18:55:22 +02:00
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-01-17 19:47:17 -08:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2015-01-19 18:05:28 -08:00
|
|
|
|
|
|
|
|
|
2013-07-29 12:25:02 +01:00
|
|
|
|
2015-01-19 18:05:28 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clk: Stop forwarding clk_rate_requests to the parent
If the clock cannot modify its rate and has CLK_SET_RATE_PARENT,
clk_mux_determine_rate_flags(), clk_core_round_rate_nolock() and a
number of drivers will forward the clk_rate_request to the parent clock.
clk_core_round_rate_nolock() will pass the pointer directly, which means
that we pass a clk_rate_request to the parent that has the rate,
min_rate and max_rate of the child, and the best_parent_rate and
best_parent_hw fields will be relative to the child as well, so will
point to our current clock and its rate. The most common case for
CLK_SET_RATE_PARENT is that the child and parent clock rates will be
equal, so the rate field isn't a worry, but the other fields are.
Similarly, if the parent clock driver ever modifies the best_parent_rate
or best_parent_hw, this will be applied to the child once the call to
clk_core_round_rate_nolock() is done. best_parent_hw is probably not
going to be a valid parent, and best_parent_rate might lead to a parent
rate change different to the one that was initially computed.
clk_mux_determine_rate_flags() and the affected drivers will copy the
request before forwarding it to the parents, so they won't be affected
by the latter issue, but the former is still going to be there and will
lead to erroneous data and context being passed to the various clock
drivers in the same sub-tree.
Let's create two new functions, clk_core_forward_rate_req() and
clk_hw_forward_rate_request() for the framework and the clock providers
that will copy a request from a child clock and update the context to
match the parent's. We also update the relevant call sites in the
framework and drivers to use that new function.
Let's also add a test to make sure we avoid regressions there.
Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com> # imx8mp
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> # exynos4210, meson g12b
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20220816112530.1837489-22-maxime@cerno.tech
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Tested-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2022-08-16 13:25:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-08-16 13:25:23 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-08-16 13:25:24 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clk: Stop forwarding clk_rate_requests to the parent
If the clock cannot modify its rate and has CLK_SET_RATE_PARENT,
clk_mux_determine_rate_flags(), clk_core_round_rate_nolock() and a
number of drivers will forward the clk_rate_request to the parent clock.
clk_core_round_rate_nolock() will pass the pointer directly, which means
that we pass a clk_rate_request to the parent that has the rate,
min_rate and max_rate of the child, and the best_parent_rate and
best_parent_hw fields will be relative to the child as well, so will
point to our current clock and its rate. The most common case for
CLK_SET_RATE_PARENT is that the child and parent clock rates will be
equal, so the rate field isn't a worry, but the other fields are.
Similarly, if the parent clock driver ever modifies the best_parent_rate
or best_parent_hw, this will be applied to the child once the call to
clk_core_round_rate_nolock() is done. best_parent_hw is probably not
going to be a valid parent, and best_parent_rate might lead to a parent
rate change different to the one that was initially computed.
clk_mux_determine_rate_flags() and the affected drivers will copy the
request before forwarding it to the parents, so they won't be affected
by the latter issue, but the former is still going to be there and will
lead to erroneous data and context being passed to the various clock
drivers in the same sub-tree.
Let's create two new functions, clk_core_forward_rate_req() and
clk_hw_forward_rate_request() for the framework and the clock providers
that will copy a request from a child clock and update the context to
match the parent's. We also update the relevant call sites in the
framework and drivers to use that new function.
Let's also add a test to make sure we avoid regressions there.
Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com> # imx8mp
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> # exynos4210, meson g12b
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20220816112530.1837489-22-maxime@cerno.tech
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Tested-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2022-08-16 13:25:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-05-05 13:25:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-06-13 15:16:31 +02:00
|
|
|
|
2023-05-05 13:25:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-04-09 15:59:20 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-07-29 12:25:02 +01:00
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2015-07-07 20:48:08 +02:00
|
|
|
|
|
|
|
|
|
2013-07-29 12:25:02 +01:00
|
|
|
|
|
|
|
|
|
2023-05-05 13:25:05 +02:00
|
|
|
|
|
|
|
|
|
2013-07-29 12:25:02 +01:00
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2013-07-29 12:25:02 +01:00
|
|
|
|
clk: Stop forwarding clk_rate_requests to the parent
If the clock cannot modify its rate and has CLK_SET_RATE_PARENT,
clk_mux_determine_rate_flags(), clk_core_round_rate_nolock() and a
number of drivers will forward the clk_rate_request to the parent clock.
clk_core_round_rate_nolock() will pass the pointer directly, which means
that we pass a clk_rate_request to the parent that has the rate,
min_rate and max_rate of the child, and the best_parent_rate and
best_parent_hw fields will be relative to the child as well, so will
point to our current clock and its rate. The most common case for
CLK_SET_RATE_PARENT is that the child and parent clock rates will be
equal, so the rate field isn't a worry, but the other fields are.
Similarly, if the parent clock driver ever modifies the best_parent_rate
or best_parent_hw, this will be applied to the child once the call to
clk_core_round_rate_nolock() is done. best_parent_hw is probably not
going to be a valid parent, and best_parent_rate might lead to a parent
rate change different to the one that was initially computed.
clk_mux_determine_rate_flags() and the affected drivers will copy the
request before forwarding it to the parents, so they won't be affected
by the latter issue, but the former is still going to be there and will
lead to erroneous data and context being passed to the various clock
drivers in the same sub-tree.
Let's create two new functions, clk_core_forward_rate_req() and
clk_hw_forward_rate_request() for the framework and the clock providers
that will copy a request from a child clock and update the context to
match the parent's. We also update the relevant call sites in the
framework and drivers to use that new function.
Let's also add a test to make sure we avoid regressions there.
Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com> # imx8mp
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> # exynos4210, meson g12b
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20220816112530.1837489-22-maxime@cerno.tech
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Tested-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2022-08-16 13:25:26 +02:00
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2013-07-29 12:25:02 +01:00
|
|
|
|
|
|
|
|
|
2015-07-07 20:48:08 +02:00
|
|
|
|
|
|
|
|
|
clk: Stop forwarding clk_rate_requests to the parent
If the clock cannot modify its rate and has CLK_SET_RATE_PARENT,
clk_mux_determine_rate_flags(), clk_core_round_rate_nolock() and a
number of drivers will forward the clk_rate_request to the parent clock.
clk_core_round_rate_nolock() will pass the pointer directly, which means
that we pass a clk_rate_request to the parent that has the rate,
min_rate and max_rate of the child, and the best_parent_rate and
best_parent_hw fields will be relative to the child as well, so will
point to our current clock and its rate. The most common case for
CLK_SET_RATE_PARENT is that the child and parent clock rates will be
equal, so the rate field isn't a worry, but the other fields are.
Similarly, if the parent clock driver ever modifies the best_parent_rate
or best_parent_hw, this will be applied to the child once the call to
clk_core_round_rate_nolock() is done. best_parent_hw is probably not
going to be a valid parent, and best_parent_rate might lead to a parent
rate change different to the one that was initially computed.
clk_mux_determine_rate_flags() and the affected drivers will copy the
request before forwarding it to the parents, so they won't be affected
by the latter issue, but the former is still going to be there and will
lead to erroneous data and context being passed to the various clock
drivers in the same sub-tree.
Let's create two new functions, clk_core_forward_rate_req() and
clk_hw_forward_rate_request() for the framework and the clock providers
that will copy a request from a child clock and update the context to
match the parent's. We also update the relevant call sites in the
framework and drivers to use that new function.
Let's also add a test to make sure we avoid regressions there.
Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com> # imx8mp
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> # exynos4210, meson g12b
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20220816112530.1837489-22-maxime@cerno.tech
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Tested-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2022-08-16 13:25:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-10-26 15:46:59 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-08-16 13:25:23 +02:00
|
|
|
|
2015-07-07 20:48:08 +02:00
|
|
|
|
|
|
|
|
|
clk: Stop forwarding clk_rate_requests to the parent
If the clock cannot modify its rate and has CLK_SET_RATE_PARENT,
clk_mux_determine_rate_flags(), clk_core_round_rate_nolock() and a
number of drivers will forward the clk_rate_request to the parent clock.
clk_core_round_rate_nolock() will pass the pointer directly, which means
that we pass a clk_rate_request to the parent that has the rate,
min_rate and max_rate of the child, and the best_parent_rate and
best_parent_hw fields will be relative to the child as well, so will
point to our current clock and its rate. The most common case for
CLK_SET_RATE_PARENT is that the child and parent clock rates will be
equal, so the rate field isn't a worry, but the other fields are.
Similarly, if the parent clock driver ever modifies the best_parent_rate
or best_parent_hw, this will be applied to the child once the call to
clk_core_round_rate_nolock() is done. best_parent_hw is probably not
going to be a valid parent, and best_parent_rate might lead to a parent
rate change different to the one that was initially computed.
clk_mux_determine_rate_flags() and the affected drivers will copy the
request before forwarding it to the parents, so they won't be affected
by the latter issue, but the former is still going to be there and will
lead to erroneous data and context being passed to the various clock
drivers in the same sub-tree.
Let's create two new functions, clk_core_forward_rate_req() and
clk_hw_forward_rate_request() for the framework and the clock providers
that will copy a request from a child clock and update the context to
match the parent's. We also update the relevant call sites in the
framework and drivers to use that new function.
Let's also add a test to make sure we avoid regressions there.
Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com> # imx8mp
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> # exynos4210, meson g12b
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20220816112530.1837489-22-maxime@cerno.tech
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Tested-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2022-08-16 13:25:26 +02:00
|
|
|
|
2022-10-26 15:46:59 +02:00
|
|
|
|
|
|
|
|
|
clk: Stop forwarding clk_rate_requests to the parent
If the clock cannot modify its rate and has CLK_SET_RATE_PARENT,
clk_mux_determine_rate_flags(), clk_core_round_rate_nolock() and a
number of drivers will forward the clk_rate_request to the parent clock.
clk_core_round_rate_nolock() will pass the pointer directly, which means
that we pass a clk_rate_request to the parent that has the rate,
min_rate and max_rate of the child, and the best_parent_rate and
best_parent_hw fields will be relative to the child as well, so will
point to our current clock and its rate. The most common case for
CLK_SET_RATE_PARENT is that the child and parent clock rates will be
equal, so the rate field isn't a worry, but the other fields are.
Similarly, if the parent clock driver ever modifies the best_parent_rate
or best_parent_hw, this will be applied to the child once the call to
clk_core_round_rate_nolock() is done. best_parent_hw is probably not
going to be a valid parent, and best_parent_rate might lead to a parent
rate change different to the one that was initially computed.
clk_mux_determine_rate_flags() and the affected drivers will copy the
request before forwarding it to the parents, so they won't be affected
by the latter issue, but the former is still going to be there and will
lead to erroneous data and context being passed to the various clock
drivers in the same sub-tree.
Let's create two new functions, clk_core_forward_rate_req() and
clk_hw_forward_rate_request() for the framework and the clock providers
that will copy a request from a child clock and update the context to
match the parent's. We also update the relevant call sites in the
framework and drivers to use that new function.
Let's also add a test to make sure we avoid regressions there.
Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com> # imx8mp
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> # exynos4210, meson g12b
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20220816112530.1837489-22-maxime@cerno.tech
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Tested-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2022-08-16 13:25:26 +02:00
|
|
|
|
2015-07-07 20:48:08 +02:00
|
|
|
|
clk: Stop forwarding clk_rate_requests to the parent
If the clock cannot modify its rate and has CLK_SET_RATE_PARENT,
clk_mux_determine_rate_flags(), clk_core_round_rate_nolock() and a
number of drivers will forward the clk_rate_request to the parent clock.
clk_core_round_rate_nolock() will pass the pointer directly, which means
that we pass a clk_rate_request to the parent that has the rate,
min_rate and max_rate of the child, and the best_parent_rate and
best_parent_hw fields will be relative to the child as well, so will
point to our current clock and its rate. The most common case for
CLK_SET_RATE_PARENT is that the child and parent clock rates will be
equal, so the rate field isn't a worry, but the other fields are.
Similarly, if the parent clock driver ever modifies the best_parent_rate
or best_parent_hw, this will be applied to the child once the call to
clk_core_round_rate_nolock() is done. best_parent_hw is probably not
going to be a valid parent, and best_parent_rate might lead to a parent
rate change different to the one that was initially computed.
clk_mux_determine_rate_flags() and the affected drivers will copy the
request before forwarding it to the parents, so they won't be affected
by the latter issue, but the former is still going to be there and will
lead to erroneous data and context being passed to the various clock
drivers in the same sub-tree.
Let's create two new functions, clk_core_forward_rate_req() and
clk_hw_forward_rate_request() for the framework and the clock providers
that will copy a request from a child clock and update the context to
match the parent's. We also update the relevant call sites in the
framework and drivers to use that new function.
Let's also add a test to make sure we avoid regressions there.
Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com> # imx8mp
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> # exynos4210, meson g12b
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20220816112530.1837489-22-maxime@cerno.tech
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Tested-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2022-08-16 13:25:26 +02:00
|
|
|
|
2015-07-07 20:48:08 +02:00
|
|
|
|
|
|
|
|
|
clk: Stop forwarding clk_rate_requests to the parent
If the clock cannot modify its rate and has CLK_SET_RATE_PARENT,
clk_mux_determine_rate_flags(), clk_core_round_rate_nolock() and a
number of drivers will forward the clk_rate_request to the parent clock.
clk_core_round_rate_nolock() will pass the pointer directly, which means
that we pass a clk_rate_request to the parent that has the rate,
min_rate and max_rate of the child, and the best_parent_rate and
best_parent_hw fields will be relative to the child as well, so will
point to our current clock and its rate. The most common case for
CLK_SET_RATE_PARENT is that the child and parent clock rates will be
equal, so the rate field isn't a worry, but the other fields are.
Similarly, if the parent clock driver ever modifies the best_parent_rate
or best_parent_hw, this will be applied to the child once the call to
clk_core_round_rate_nolock() is done. best_parent_hw is probably not
going to be a valid parent, and best_parent_rate might lead to a parent
rate change different to the one that was initially computed.
clk_mux_determine_rate_flags() and the affected drivers will copy the
request before forwarding it to the parents, so they won't be affected
by the latter issue, but the former is still going to be there and will
lead to erroneous data and context being passed to the various clock
drivers in the same sub-tree.
Let's create two new functions, clk_core_forward_rate_req() and
clk_hw_forward_rate_request() for the framework and the clock providers
that will copy a request from a child clock and update the context to
match the parent's. We also update the relevant call sites in the
framework and drivers to use that new function.
Let's also add a test to make sure we avoid regressions there.
Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com> # imx8mp
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> # exynos4210, meson g12b
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20220816112530.1837489-22-maxime@cerno.tech
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Tested-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2022-08-16 13:25:26 +02:00
|
|
|
|
2015-07-07 20:48:08 +02:00
|
|
|
|
2013-07-29 12:25:02 +01:00
|
|
|
|
clk: Stop forwarding clk_rate_requests to the parent
If the clock cannot modify its rate and has CLK_SET_RATE_PARENT,
clk_mux_determine_rate_flags(), clk_core_round_rate_nolock() and a
number of drivers will forward the clk_rate_request to the parent clock.
clk_core_round_rate_nolock() will pass the pointer directly, which means
that we pass a clk_rate_request to the parent that has the rate,
min_rate and max_rate of the child, and the best_parent_rate and
best_parent_hw fields will be relative to the child as well, so will
point to our current clock and its rate. The most common case for
CLK_SET_RATE_PARENT is that the child and parent clock rates will be
equal, so the rate field isn't a worry, but the other fields are.
Similarly, if the parent clock driver ever modifies the best_parent_rate
or best_parent_hw, this will be applied to the child once the call to
clk_core_round_rate_nolock() is done. best_parent_hw is probably not
going to be a valid parent, and best_parent_rate might lead to a parent
rate change different to the one that was initially computed.
clk_mux_determine_rate_flags() and the affected drivers will copy the
request before forwarding it to the parents, so they won't be affected
by the latter issue, but the former is still going to be there and will
lead to erroneous data and context being passed to the various clock
drivers in the same sub-tree.
Let's create two new functions, clk_core_forward_rate_req() and
clk_hw_forward_rate_request() for the framework and the clock providers
that will copy a request from a child clock and update the context to
match the parent's. We also update the relevant call sites in the
framework and drivers to use that new function.
Let's also add a test to make sure we avoid regressions there.
Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com> # imx8mp
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> # exynos4210, meson g12b
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20220816112530.1837489-22-maxime@cerno.tech
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Tested-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2022-08-16 13:25:26 +02:00
|
|
|
|
2013-07-29 12:25:02 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-07-09 22:39:38 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-05-05 13:25:05 +02:00
|
|
|
|
2015-07-07 20:48:08 +02:00
|
|
|
|
|
|
|
|
|
2013-07-29 12:25:02 +01:00
|
|
|
|
2015-07-07 20:48:08 +02:00
|
|
|
|
2013-07-29 12:25:02 +01:00
|
|
|
|
2018-04-09 15:59:20 +02:00
|
|
|
|
2015-01-19 18:05:28 -08:00
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-07-02 16:27:10 +03:00
|
|
|
|
|
|
|
|
|
2015-07-16 12:50:27 -07:00
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-08-16 13:25:28 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clk: Enforce that disjoints limits are invalid
If we were to have two users of the same clock, doing something like:
clk_set_rate_range(user1, 1000, 2000);
clk_set_rate_range(user2, 3000, 4000);
The second call would fail with -EINVAL, preventing from getting in a
situation where we end up with impossible limits.
However, this is never explicitly checked against and enforced, and
works by relying on an undocumented behaviour of clk_set_rate().
Indeed, on the first clk_set_rate_range will make sure the current clock
rate is within the new range, so it will be between 1000 and 2000Hz. On
the second clk_set_rate_range(), it will consider (rightfully), that our
current clock is outside of the 3000-4000Hz range, and will call
clk_core_set_rate_nolock() to set it to 3000Hz.
clk_core_set_rate_nolock() will then call clk_calc_new_rates() that will
eventually check that our rate 3000Hz rate is outside the min 3000Hz max
2000Hz range, will bail out, the error will propagate and we'll
eventually return -EINVAL.
This solely relies on the fact that clk_calc_new_rates(), and in
particular clk_core_determine_round_nolock(), won't modify the new rate
allowing the error to be reported. That assumption won't be true for all
drivers, and most importantly we'll break that assumption in a later
patch.
It can also be argued that we shouldn't even reach the point where we're
calling clk_core_set_rate_nolock().
Let's make an explicit check for disjoints range before we're doing
anything.
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20220225143534.405820-4-maxime@cerno.tech
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2022-02-25 15:35:25 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-07-16 12:50:27 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-19 18:05:28 -08:00
|
|
|
|
2018-12-11 13:24:50 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-19 18:05:28 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-11 13:24:50 -08:00
|
|
|
|
|
|
|
|
|
2015-01-19 18:05:28 -08:00
|
|
|
|
2015-07-07 20:48:08 +02:00
|
|
|
|
|
|
|
|
|
2015-01-19 18:05:28 -08:00
|
|
|
|
2015-07-07 20:48:08 +02:00
|
|
|
|
2015-01-19 18:05:28 -08:00
|
|
|
|
2014-01-17 19:47:17 -08:00
|
|
|
|
2013-07-29 12:25:02 +01:00
|
|
|
|
2015-07-07 20:48:08 +02:00
|
|
|
|
|
|
|
|
|
2015-01-19 18:05:28 -08:00
|
|
|
|
2015-07-07 20:48:08 +02:00
|
|
|
|
2015-01-19 18:05:28 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-05-05 13:25:06 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
2017-12-01 22:51:56 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-01-16 10:50:34 -02:00
|
|
|
|
|
|
|
|
|
2017-12-01 22:51:56 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-12-01 22:51:59 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-12-01 22:51:56 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-12-01 22:51:59 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-10 15:55:07 +02:00
|
|
|
|
2017-12-01 22:51:59 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-01-04 23:55:11 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2015-05-06 17:00:54 -07:00
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
2018-01-16 10:50:34 -02:00
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
2018-01-16 10:50:34 -02:00
|
|
|
|
|
|
|
|
|
2016-02-11 13:19:10 -08:00
|
|
|
|
|
|
|
|
|
2018-06-19 15:40:51 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
2018-01-16 10:50:34 -02:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2015-02-02 14:37:41 -08:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
|
|
|
|
|
2022-08-22 16:14:24 +08:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
2016-06-30 17:31:11 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
2013-06-29 15:14:19 +02:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-03-26 16:06:37 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-30 17:31:11 +08:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-06 17:00:54 -07:00
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2017-08-21 10:04:59 +02:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-08-21 10:04:59 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2015-02-02 14:37:41 -08:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
|
|
|
|
|
2015-02-02 14:37:41 -08:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2015-02-02 14:37:41 -08:00
|
|
|
|
2017-08-21 10:04:59 +02:00
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2018-06-19 15:40:51 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2017-08-21 10:04:59 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
2016-06-30 17:31:11 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-30 17:31:11 +08:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2015-05-06 17:00:54 -07:00
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
2018-01-16 10:50:34 -02:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
2018-01-16 10:50:34 -02:00
|
|
|
|
|
|
|
|
|
2016-02-11 13:19:10 -08:00
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
2023-01-12 20:43:55 +01:00
|
|
|
|
2015-02-02 14:37:41 -08:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2023-01-12 20:43:55 +01:00
|
|
|
|
2015-02-02 14:37:41 -08:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
|
|
|
|
|
2016-06-30 17:31:11 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-03-26 16:06:37 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-30 17:31:11 +08:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-06 17:00:54 -07:00
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
2018-01-16 10:50:34 -02:00
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-01-12 20:43:55 +01:00
|
|
|
|
2015-02-02 14:37:41 -08:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
|
|
|
|
|
2015-02-02 14:37:41 -08:00
|
|
|
|
2023-01-12 20:43:55 +01:00
|
|
|
|
2015-02-02 14:37:41 -08:00
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2015-02-02 14:37:41 -08:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-30 17:31:11 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-04 12:19:36 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-11 09:28:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-04 12:19:36 +05:30
|
|
|
|
2018-10-11 09:28:13 -07:00
|
|
|
|
2018-09-04 12:19:36 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-11 09:28:13 -07:00
|
|
|
|
2018-09-04 12:19:35 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-11 09:28:13 -07:00
|
|
|
|
|
|
|
|
|
2018-09-04 12:19:35 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-11 09:28:13 -07:00
|
|
|
|
|
|
|
|
|
2018-09-04 12:19:35 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-11 09:28:13 -07:00
|
|
|
|
2018-09-04 12:19:35 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-11 09:28:13 -07:00
|
|
|
|
|
|
|
|
|
2018-09-04 12:19:35 +05:30
|
|
|
|
2018-10-11 09:28:13 -07:00
|
|
|
|
|
|
|
|
|
2018-09-04 12:19:35 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-11 09:28:13 -07:00
|
|
|
|
2018-09-04 12:19:35 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-11 09:28:13 -07:00
|
|
|
|
2018-09-04 12:19:35 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-11 09:28:13 -07:00
|
|
|
|
2018-09-04 12:19:35 +05:30
|
|
|
|
2018-10-11 09:28:13 -07:00
|
|
|
|
|
|
|
|
|
2018-09-04 12:19:35 +05:30
|
|
|
|
2018-10-11 09:28:13 -07:00
|
|
|
|
|
|
|
|
|
2018-09-04 12:19:35 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 14:02:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-30 17:31:11 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-01-25 14:29:18 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-30 17:31:11 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-30 17:31:11 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2019-10-04 11:48:25 +02:00
|
|
|
|
2016-06-30 17:31:12 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-10-04 11:48:25 +02:00
|
|
|
|
2016-06-30 17:31:12 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clk: core: support clocks which requires parents enable (part 1)
On Freescale i.MX7D platform, all clocks operations, including
enable/disable, rate change and re-parent, requires its parent
clock enable. Current clock core can not support it well.
This patch introduce a new flag CLK_OPS_PARENT_ENABLE to handle this
special case in clock core that enable its parent clock firstly for
each operation and disable it later after operation complete.
The patch part 1 fixes the possible disabling clocks while its parent
is off during kernel booting phase in clk_disable_unused_subtree().
Before the completion of kernel booting, clock tree is still not built
completely, there may be a case that the child clock is on but its
parent is off which could be caused by either HW initial reset state
or bootloader initialization.
Taking bootloader as an example, we may enable all clocks in HW by default.
And during kernel booting time, the parent clock could be disabled in its
driver probe due to calling clk_prepare_enable and clk_disable_unprepare.
Because it's child clock is only enabled in HW while its SW usecount
in clock tree is still 0, so clk_disable of parent clock will gate
the parent clock in both HW and SW usecount ultimately. Then there will
be a child clock is still on in HW but its parent is already off.
Later in clk_disable_unused(), this clock disable accessing while its
parent off will cause system hang due to the limitation of HW which
must require its parent on.
This patch simply enables the parent clock first before disabling
if flag CLK_OPS_PARENT_ENABLE is set in clk_disable_unused_subtree().
This is a simple solution and only affects booting time.
After kernel booting up the clock tree is already created, there will
be no case that child is off but its parent is off.
So no need do this checking for normal clk_disable() later.
Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2016-06-30 17:31:13 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-30 17:31:12 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clk: core: support clocks which requires parents enable (part 1)
On Freescale i.MX7D platform, all clocks operations, including
enable/disable, rate change and re-parent, requires its parent
clock enable. Current clock core can not support it well.
This patch introduce a new flag CLK_OPS_PARENT_ENABLE to handle this
special case in clock core that enable its parent clock firstly for
each operation and disable it later after operation complete.
The patch part 1 fixes the possible disabling clocks while its parent
is off during kernel booting phase in clk_disable_unused_subtree().
Before the completion of kernel booting, clock tree is still not built
completely, there may be a case that the child clock is on but its
parent is off which could be caused by either HW initial reset state
or bootloader initialization.
Taking bootloader as an example, we may enable all clocks in HW by default.
And during kernel booting time, the parent clock could be disabled in its
driver probe due to calling clk_prepare_enable and clk_disable_unprepare.
Because it's child clock is only enabled in HW while its SW usecount
in clock tree is still 0, so clk_disable of parent clock will gate
the parent clock in both HW and SW usecount ultimately. Then there will
be a child clock is still on in HW but its parent is already off.
Later in clk_disable_unused(), this clock disable accessing while its
parent off will cause system hang due to the limitation of HW which
must require its parent on.
This patch simply enables the parent clock first before disabling
if flag CLK_OPS_PARENT_ENABLE is set in clk_disable_unused_subtree().
This is a simple solution and only affects booting time.
After kernel booting up the clock tree is already created, there will
be no case that child is off but its parent is off.
So no need do this checking for normal clk_disable() later.
Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2016-06-30 17:31:13 +08:00
|
|
|
|
|
|
|
|
|
2016-06-30 17:31:12 +08:00
|
|
|
|
|
|
|
|
|
2019-10-04 11:48:25 +02:00
|
|
|
|
2016-06-30 17:31:12 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-10-04 11:48:25 +02:00
|
|
|
|
2016-06-30 17:31:12 +08:00
|
|
|
|
|
|
|
|
|
clk: Get runtime PM before walking tree during disable_unused
Doug reported [1] the following hung task:
INFO: task swapper/0:1 blocked for more than 122 seconds.
Not tainted 5.15.149-21875-gf795ebc40eb8 #1
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:swapper/0 state:D stack: 0 pid: 1 ppid: 0 flags:0x00000008
Call trace:
__switch_to+0xf4/0x1f4
__schedule+0x418/0xb80
schedule+0x5c/0x10c
rpm_resume+0xe0/0x52c
rpm_resume+0x178/0x52c
__pm_runtime_resume+0x58/0x98
clk_pm_runtime_get+0x30/0xb0
clk_disable_unused_subtree+0x58/0x208
clk_disable_unused_subtree+0x38/0x208
clk_disable_unused_subtree+0x38/0x208
clk_disable_unused_subtree+0x38/0x208
clk_disable_unused_subtree+0x38/0x208
clk_disable_unused+0x4c/0xe4
do_one_initcall+0xcc/0x2d8
do_initcall_level+0xa4/0x148
do_initcalls+0x5c/0x9c
do_basic_setup+0x24/0x30
kernel_init_freeable+0xec/0x164
kernel_init+0x28/0x120
ret_from_fork+0x10/0x20
INFO: task kworker/u16:0:9 blocked for more than 122 seconds.
Not tainted 5.15.149-21875-gf795ebc40eb8 #1
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/u16:0 state:D stack: 0 pid: 9 ppid: 2 flags:0x00000008
Workqueue: events_unbound deferred_probe_work_func
Call trace:
__switch_to+0xf4/0x1f4
__schedule+0x418/0xb80
schedule+0x5c/0x10c
schedule_preempt_disabled+0x2c/0x48
__mutex_lock+0x238/0x488
__mutex_lock_slowpath+0x1c/0x28
mutex_lock+0x50/0x74
clk_prepare_lock+0x7c/0x9c
clk_core_prepare_lock+0x20/0x44
clk_prepare+0x24/0x30
clk_bulk_prepare+0x40/0xb0
mdss_runtime_resume+0x54/0x1c8
pm_generic_runtime_resume+0x30/0x44
__genpd_runtime_resume+0x68/0x7c
genpd_runtime_resume+0x108/0x1f4
__rpm_callback+0x84/0x144
rpm_callback+0x30/0x88
rpm_resume+0x1f4/0x52c
rpm_resume+0x178/0x52c
__pm_runtime_resume+0x58/0x98
__device_attach+0xe0/0x170
device_initial_probe+0x1c/0x28
bus_probe_device+0x3c/0x9c
device_add+0x644/0x814
mipi_dsi_device_register_full+0xe4/0x170
devm_mipi_dsi_device_register_full+0x28/0x70
ti_sn_bridge_probe+0x1dc/0x2c0
auxiliary_bus_probe+0x4c/0x94
really_probe+0xcc/0x2c8
__driver_probe_device+0xa8/0x130
driver_probe_device+0x48/0x110
__device_attach_driver+0xa4/0xcc
bus_for_each_drv+0x8c/0xd8
__device_attach+0xf8/0x170
device_initial_probe+0x1c/0x28
bus_probe_device+0x3c/0x9c
deferred_probe_work_func+0x9c/0xd8
process_one_work+0x148/0x518
worker_thread+0x138/0x350
kthread+0x138/0x1e0
ret_from_fork+0x10/0x20
The first thread is walking the clk tree and calling
clk_pm_runtime_get() to power on devices required to read the clk
hardware via struct clk_ops::is_enabled(). This thread holds the clk
prepare_lock, and is trying to runtime PM resume a device, when it finds
that the device is in the process of resuming so the thread schedule()s
away waiting for the device to finish resuming before continuing. The
second thread is runtime PM resuming the same device, but the runtime
resume callback is calling clk_prepare(), trying to grab the
prepare_lock waiting on the first thread.
This is a classic ABBA deadlock. To properly fix the deadlock, we must
never runtime PM resume or suspend a device with the clk prepare_lock
held. Actually doing that is near impossible today because the global
prepare_lock would have to be dropped in the middle of the tree, the
device runtime PM resumed/suspended, and then the prepare_lock grabbed
again to ensure consistency of the clk tree topology. If anything
changes with the clk tree in the meantime, we've lost and will need to
start the operation all over again.
Luckily, most of the time we're simply incrementing or decrementing the
runtime PM count on an active device, so we don't have the chance to
schedule away with the prepare_lock held. Let's fix this immediate
problem that can be triggered more easily by simply booting on Qualcomm
sc7180.
Introduce a list of clk_core structures that have been registered, or
are in the process of being registered, that require runtime PM to
operate. Iterate this list and call clk_pm_runtime_get() on each of them
without holding the prepare_lock during clk_disable_unused(). This way
we can be certain that the runtime PM state of the devices will be
active and resumed so we can't schedule away while walking the clk tree
with the prepare_lock held. Similarly, call clk_pm_runtime_put() without
the prepare_lock held to properly drop the runtime PM reference. We
remove the calls to clk_pm_runtime_{get,put}() in this path because
they're superfluous now that we know the devices are runtime resumed.
Reported-by: Douglas Anderson <dianders@chromium.org>
Closes: https://lore.kernel.org/all/20220922084322.RFC.2.I375b6b9e0a0a5348962f004beb3dafee6a12dfbb@changeid/ [1]
Closes: https://issuetracker.google.com/328070191
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Fixes: 9a34b45397e5 ("clk: Add support for runtime PM")
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/20240325184204.745706-5-sboyd@kernel.org
Reviewed-by: Douglas Anderson <dianders@chromium.org>
2024-03-25 11:41:58 -07:00
|
|
|
|
2016-06-30 17:31:12 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-03-07 14:29:28 +01:00
|
|
|
|
|
|
|
|
|
clk: Get runtime PM before walking tree during disable_unused
Doug reported [1] the following hung task:
INFO: task swapper/0:1 blocked for more than 122 seconds.
Not tainted 5.15.149-21875-gf795ebc40eb8 #1
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:swapper/0 state:D stack: 0 pid: 1 ppid: 0 flags:0x00000008
Call trace:
__switch_to+0xf4/0x1f4
__schedule+0x418/0xb80
schedule+0x5c/0x10c
rpm_resume+0xe0/0x52c
rpm_resume+0x178/0x52c
__pm_runtime_resume+0x58/0x98
clk_pm_runtime_get+0x30/0xb0
clk_disable_unused_subtree+0x58/0x208
clk_disable_unused_subtree+0x38/0x208
clk_disable_unused_subtree+0x38/0x208
clk_disable_unused_subtree+0x38/0x208
clk_disable_unused_subtree+0x38/0x208
clk_disable_unused+0x4c/0xe4
do_one_initcall+0xcc/0x2d8
do_initcall_level+0xa4/0x148
do_initcalls+0x5c/0x9c
do_basic_setup+0x24/0x30
kernel_init_freeable+0xec/0x164
kernel_init+0x28/0x120
ret_from_fork+0x10/0x20
INFO: task kworker/u16:0:9 blocked for more than 122 seconds.
Not tainted 5.15.149-21875-gf795ebc40eb8 #1
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/u16:0 state:D stack: 0 pid: 9 ppid: 2 flags:0x00000008
Workqueue: events_unbound deferred_probe_work_func
Call trace:
__switch_to+0xf4/0x1f4
__schedule+0x418/0xb80
schedule+0x5c/0x10c
schedule_preempt_disabled+0x2c/0x48
__mutex_lock+0x238/0x488
__mutex_lock_slowpath+0x1c/0x28
mutex_lock+0x50/0x74
clk_prepare_lock+0x7c/0x9c
clk_core_prepare_lock+0x20/0x44
clk_prepare+0x24/0x30
clk_bulk_prepare+0x40/0xb0
mdss_runtime_resume+0x54/0x1c8
pm_generic_runtime_resume+0x30/0x44
__genpd_runtime_resume+0x68/0x7c
genpd_runtime_resume+0x108/0x1f4
__rpm_callback+0x84/0x144
rpm_callback+0x30/0x88
rpm_resume+0x1f4/0x52c
rpm_resume+0x178/0x52c
__pm_runtime_resume+0x58/0x98
__device_attach+0xe0/0x170
device_initial_probe+0x1c/0x28
bus_probe_device+0x3c/0x9c
device_add+0x644/0x814
mipi_dsi_device_register_full+0xe4/0x170
devm_mipi_dsi_device_register_full+0x28/0x70
ti_sn_bridge_probe+0x1dc/0x2c0
auxiliary_bus_probe+0x4c/0x94
really_probe+0xcc/0x2c8
__driver_probe_device+0xa8/0x130
driver_probe_device+0x48/0x110
__device_attach_driver+0xa4/0xcc
bus_for_each_drv+0x8c/0xd8
__device_attach+0xf8/0x170
device_initial_probe+0x1c/0x28
bus_probe_device+0x3c/0x9c
deferred_probe_work_func+0x9c/0xd8
process_one_work+0x148/0x518
worker_thread+0x138/0x350
kthread+0x138/0x1e0
ret_from_fork+0x10/0x20
The first thread is walking the clk tree and calling
clk_pm_runtime_get() to power on devices required to read the clk
hardware via struct clk_ops::is_enabled(). This thread holds the clk
prepare_lock, and is trying to runtime PM resume a device, when it finds
that the device is in the process of resuming so the thread schedule()s
away waiting for the device to finish resuming before continuing. The
second thread is runtime PM resuming the same device, but the runtime
resume callback is calling clk_prepare(), trying to grab the
prepare_lock waiting on the first thread.
This is a classic ABBA deadlock. To properly fix the deadlock, we must
never runtime PM resume or suspend a device with the clk prepare_lock
held. Actually doing that is near impossible today because the global
prepare_lock would have to be dropped in the middle of the tree, the
device runtime PM resumed/suspended, and then the prepare_lock grabbed
again to ensure consistency of the clk tree topology. If anything
changes with the clk tree in the meantime, we've lost and will need to
start the operation all over again.
Luckily, most of the time we're simply incrementing or decrementing the
runtime PM count on an active device, so we don't have the chance to
schedule away with the prepare_lock held. Let's fix this immediate
problem that can be triggered more easily by simply booting on Qualcomm
sc7180.
Introduce a list of clk_core structures that have been registered, or
are in the process of being registered, that require runtime PM to
operate. Iterate this list and call clk_pm_runtime_get() on each of them
without holding the prepare_lock during clk_disable_unused(). This way
we can be certain that the runtime PM state of the devices will be
active and resumed so we can't schedule away while walking the clk tree
with the prepare_lock held. Similarly, call clk_pm_runtime_put() without
the prepare_lock held to properly drop the runtime PM reference. We
remove the calls to clk_pm_runtime_{get,put}() in this path because
they're superfluous now that we know the devices are runtime resumed.
Reported-by: Douglas Anderson <dianders@chromium.org>
Closes: https://lore.kernel.org/all/20220922084322.RFC.2.I375b6b9e0a0a5348962f004beb3dafee6a12dfbb@changeid/ [1]
Closes: https://issuetracker.google.com/328070191
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Fixes: 9a34b45397e5 ("clk: Add support for runtime PM")
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/20240325184204.745706-5-sboyd@kernel.org
Reviewed-by: Douglas Anderson <dianders@chromium.org>
2024-03-25 11:41:58 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-30 17:31:12 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clk: Get runtime PM before walking tree during disable_unused
Doug reported [1] the following hung task:
INFO: task swapper/0:1 blocked for more than 122 seconds.
Not tainted 5.15.149-21875-gf795ebc40eb8 #1
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:swapper/0 state:D stack: 0 pid: 1 ppid: 0 flags:0x00000008
Call trace:
__switch_to+0xf4/0x1f4
__schedule+0x418/0xb80
schedule+0x5c/0x10c
rpm_resume+0xe0/0x52c
rpm_resume+0x178/0x52c
__pm_runtime_resume+0x58/0x98
clk_pm_runtime_get+0x30/0xb0
clk_disable_unused_subtree+0x58/0x208
clk_disable_unused_subtree+0x38/0x208
clk_disable_unused_subtree+0x38/0x208
clk_disable_unused_subtree+0x38/0x208
clk_disable_unused_subtree+0x38/0x208
clk_disable_unused+0x4c/0xe4
do_one_initcall+0xcc/0x2d8
do_initcall_level+0xa4/0x148
do_initcalls+0x5c/0x9c
do_basic_setup+0x24/0x30
kernel_init_freeable+0xec/0x164
kernel_init+0x28/0x120
ret_from_fork+0x10/0x20
INFO: task kworker/u16:0:9 blocked for more than 122 seconds.
Not tainted 5.15.149-21875-gf795ebc40eb8 #1
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/u16:0 state:D stack: 0 pid: 9 ppid: 2 flags:0x00000008
Workqueue: events_unbound deferred_probe_work_func
Call trace:
__switch_to+0xf4/0x1f4
__schedule+0x418/0xb80
schedule+0x5c/0x10c
schedule_preempt_disabled+0x2c/0x48
__mutex_lock+0x238/0x488
__mutex_lock_slowpath+0x1c/0x28
mutex_lock+0x50/0x74
clk_prepare_lock+0x7c/0x9c
clk_core_prepare_lock+0x20/0x44
clk_prepare+0x24/0x30
clk_bulk_prepare+0x40/0xb0
mdss_runtime_resume+0x54/0x1c8
pm_generic_runtime_resume+0x30/0x44
__genpd_runtime_resume+0x68/0x7c
genpd_runtime_resume+0x108/0x1f4
__rpm_callback+0x84/0x144
rpm_callback+0x30/0x88
rpm_resume+0x1f4/0x52c
rpm_resume+0x178/0x52c
__pm_runtime_resume+0x58/0x98
__device_attach+0xe0/0x170
device_initial_probe+0x1c/0x28
bus_probe_device+0x3c/0x9c
device_add+0x644/0x814
mipi_dsi_device_register_full+0xe4/0x170
devm_mipi_dsi_device_register_full+0x28/0x70
ti_sn_bridge_probe+0x1dc/0x2c0
auxiliary_bus_probe+0x4c/0x94
really_probe+0xcc/0x2c8
__driver_probe_device+0xa8/0x130
driver_probe_device+0x48/0x110
__device_attach_driver+0xa4/0xcc
bus_for_each_drv+0x8c/0xd8
__device_attach+0xf8/0x170
device_initial_probe+0x1c/0x28
bus_probe_device+0x3c/0x9c
deferred_probe_work_func+0x9c/0xd8
process_one_work+0x148/0x518
worker_thread+0x138/0x350
kthread+0x138/0x1e0
ret_from_fork+0x10/0x20
The first thread is walking the clk tree and calling
clk_pm_runtime_get() to power on devices required to read the clk
hardware via struct clk_ops::is_enabled(). This thread holds the clk
prepare_lock, and is trying to runtime PM resume a device, when it finds
that the device is in the process of resuming so the thread schedule()s
away waiting for the device to finish resuming before continuing. The
second thread is runtime PM resuming the same device, but the runtime
resume callback is calling clk_prepare(), trying to grab the
prepare_lock waiting on the first thread.
This is a classic ABBA deadlock. To properly fix the deadlock, we must
never runtime PM resume or suspend a device with the clk prepare_lock
held. Actually doing that is near impossible today because the global
prepare_lock would have to be dropped in the middle of the tree, the
device runtime PM resumed/suspended, and then the prepare_lock grabbed
again to ensure consistency of the clk tree topology. If anything
changes with the clk tree in the meantime, we've lost and will need to
start the operation all over again.
Luckily, most of the time we're simply incrementing or decrementing the
runtime PM count on an active device, so we don't have the chance to
schedule away with the prepare_lock held. Let's fix this immediate
problem that can be triggered more easily by simply booting on Qualcomm
sc7180.
Introduce a list of clk_core structures that have been registered, or
are in the process of being registered, that require runtime PM to
operate. Iterate this list and call clk_pm_runtime_get() on each of them
without holding the prepare_lock during clk_disable_unused(). This way
we can be certain that the runtime PM state of the devices will be
active and resumed so we can't schedule away while walking the clk tree
with the prepare_lock held. Similarly, call clk_pm_runtime_put() without
the prepare_lock held to properly drop the runtime PM reference. We
remove the calls to clk_pm_runtime_{get,put}() in this path because
they're superfluous now that we know the devices are runtime resumed.
Reported-by: Douglas Anderson <dianders@chromium.org>
Closes: https://lore.kernel.org/all/20220922084322.RFC.2.I375b6b9e0a0a5348962f004beb3dafee6a12dfbb@changeid/ [1]
Closes: https://issuetracker.google.com/328070191
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Fixes: 9a34b45397e5 ("clk: Add support for runtime PM")
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/20240325184204.745706-5-sboyd@kernel.org
Reviewed-by: Douglas Anderson <dianders@chromium.org>
2024-03-25 11:41:58 -07:00
|
|
|
|
|
|
|
|
|
2016-06-30 17:31:12 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-12-01 22:51:54 +01:00
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2015-01-09 09:28:10 +01:00
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2012-10-03 23:38:55 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2022-08-16 13:25:08 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-02-25 15:35:26 +01:00
|
|
|
|
2017-12-01 22:51:59 +01:00
|
|
|
|
2021-03-26 13:08:33 +01:00
|
|
|
|
2017-12-01 22:51:59 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-12-01 22:51:56 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-07-07 20:48:08 +02:00
|
|
|
|
|
|
|
|
|
2017-12-01 22:51:54 +01:00
|
|
|
|
2015-07-07 20:48:08 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2017-12-01 22:51:54 +01:00
|
|
|
|
2022-08-16 13:25:19 +02:00
|
|
|
|
|
|
|
|
|
2017-12-01 22:51:54 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-10-18 15:52:57 +02:00
|
|
|
|
2017-12-01 22:51:54 +01:00
|
|
|
|
|
|
|
|
|
2022-08-16 13:25:27 +02:00
|
|
|
|
2022-10-18 15:52:58 +02:00
|
|
|
|
2022-08-16 13:25:27 +02:00
|
|
|
|
2022-10-18 15:52:57 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-10-26 15:46:58 +02:00
|
|
|
|
2022-08-16 13:25:19 +02:00
|
|
|
|
2022-08-16 13:25:22 +02:00
|
|
|
|
2022-08-16 13:25:19 +02:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2015-07-07 20:48:08 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-12-01 22:51:54 +01:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2022-08-16 13:25:21 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clk: Stop forwarding clk_rate_requests to the parent
If the clock cannot modify its rate and has CLK_SET_RATE_PARENT,
clk_mux_determine_rate_flags(), clk_core_round_rate_nolock() and a
number of drivers will forward the clk_rate_request to the parent clock.
clk_core_round_rate_nolock() will pass the pointer directly, which means
that we pass a clk_rate_request to the parent that has the rate,
min_rate and max_rate of the child, and the best_parent_rate and
best_parent_hw fields will be relative to the child as well, so will
point to our current clock and its rate. The most common case for
CLK_SET_RATE_PARENT is that the child and parent clock rates will be
equal, so the rate field isn't a worry, but the other fields are.
Similarly, if the parent clock driver ever modifies the best_parent_rate
or best_parent_hw, this will be applied to the child once the call to
clk_core_round_rate_nolock() is done. best_parent_hw is probably not
going to be a valid parent, and best_parent_rate might lead to a parent
rate change different to the one that was initially computed.
clk_mux_determine_rate_flags() and the affected drivers will copy the
request before forwarding it to the parents, so they won't be affected
by the latter issue, but the former is still going to be there and will
lead to erroneous data and context being passed to the various clock
drivers in the same sub-tree.
Let's create two new functions, clk_core_forward_rate_req() and
clk_hw_forward_rate_request() for the framework and the clock providers
that will copy a request from a child clock and update the context to
match the parent's. We also update the relevant call sites in the
framework and drivers to use that new function.
Let's also add a test to make sure we avoid regressions there.
Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com> # imx8mp
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> # exynos4210, meson g12b
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20220816112530.1837489-22-maxime@cerno.tech
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Tested-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2022-08-16 13:25:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-05-05 13:25:03 +02:00
|
|
|
|
clk: Stop forwarding clk_rate_requests to the parent
If the clock cannot modify its rate and has CLK_SET_RATE_PARENT,
clk_mux_determine_rate_flags(), clk_core_round_rate_nolock() and a
number of drivers will forward the clk_rate_request to the parent clock.
clk_core_round_rate_nolock() will pass the pointer directly, which means
that we pass a clk_rate_request to the parent that has the rate,
min_rate and max_rate of the child, and the best_parent_rate and
best_parent_hw fields will be relative to the child as well, so will
point to our current clock and its rate. The most common case for
CLK_SET_RATE_PARENT is that the child and parent clock rates will be
equal, so the rate field isn't a worry, but the other fields are.
Similarly, if the parent clock driver ever modifies the best_parent_rate
or best_parent_hw, this will be applied to the child once the call to
clk_core_round_rate_nolock() is done. best_parent_hw is probably not
going to be a valid parent, and best_parent_rate might lead to a parent
rate change different to the one that was initially computed.
clk_mux_determine_rate_flags() and the affected drivers will copy the
request before forwarding it to the parents, so they won't be affected
by the latter issue, but the former is still going to be there and will
lead to erroneous data and context being passed to the various clock
drivers in the same sub-tree.
Let's create two new functions, clk_core_forward_rate_req() and
clk_hw_forward_rate_request() for the framework and the clock providers
that will copy a request from a child clock and update the context to
match the parent's. We also update the relevant call sites in the
framework and drivers to use that new function.
Let's also add a test to make sure we avoid regressions there.
Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com> # imx8mp
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> # exynos4210, meson g12b
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20220816112530.1837489-22-maxime@cerno.tech
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Tested-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2022-08-16 13:25:26 +02:00
|
|
|
|
2017-12-01 22:51:54 +01:00
|
|
|
|
|
|
|
|
|
2025-12-12 08:41:42 +09:00
|
|
|
|
2017-12-01 22:51:54 +01:00
|
|
|
|
2015-07-07 20:48:08 +02:00
|
|
|
|
2017-12-01 22:51:54 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clk: Stop forwarding clk_rate_requests to the parent
If the clock cannot modify its rate and has CLK_SET_RATE_PARENT,
clk_mux_determine_rate_flags(), clk_core_round_rate_nolock() and a
number of drivers will forward the clk_rate_request to the parent clock.
clk_core_round_rate_nolock() will pass the pointer directly, which means
that we pass a clk_rate_request to the parent that has the rate,
min_rate and max_rate of the child, and the best_parent_rate and
best_parent_hw fields will be relative to the child as well, so will
point to our current clock and its rate. The most common case for
CLK_SET_RATE_PARENT is that the child and parent clock rates will be
equal, so the rate field isn't a worry, but the other fields are.
Similarly, if the parent clock driver ever modifies the best_parent_rate
or best_parent_hw, this will be applied to the child once the call to
clk_core_round_rate_nolock() is done. best_parent_hw is probably not
going to be a valid parent, and best_parent_rate might lead to a parent
rate change different to the one that was initially computed.
clk_mux_determine_rate_flags() and the affected drivers will copy the
request before forwarding it to the parents, so they won't be affected
by the latter issue, but the former is still going to be there and will
lead to erroneous data and context being passed to the various clock
drivers in the same sub-tree.
Let's create two new functions, clk_core_forward_rate_req() and
clk_hw_forward_rate_request() for the framework and the clock providers
that will copy a request from a child clock and update the context to
match the parent's. We also update the relevant call sites in the
framework and drivers to use that new function.
Let's also add a test to make sure we avoid regressions there.
Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com> # imx8mp
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> # exynos4210, meson g12b
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20220816112530.1837489-22-maxime@cerno.tech
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Tested-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2022-08-16 13:25:26 +02:00
|
|
|
|
|
|
|
|
|
2017-12-01 22:51:54 +01:00
|
|
|
|
|
|
|
|
|
2018-02-14 14:43:35 +01:00
|
|
|
|
|
|
|
|
|
2017-12-01 22:51:54 +01:00
|
|
|
|
2018-02-14 14:43:35 +01:00
|
|
|
|
2017-12-01 22:51:54 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clk: Stop forwarding clk_rate_requests to the parent
If the clock cannot modify its rate and has CLK_SET_RATE_PARENT,
clk_mux_determine_rate_flags(), clk_core_round_rate_nolock() and a
number of drivers will forward the clk_rate_request to the parent clock.
clk_core_round_rate_nolock() will pass the pointer directly, which means
that we pass a clk_rate_request to the parent that has the rate,
min_rate and max_rate of the child, and the best_parent_rate and
best_parent_hw fields will be relative to the child as well, so will
point to our current clock and its rate. The most common case for
CLK_SET_RATE_PARENT is that the child and parent clock rates will be
equal, so the rate field isn't a worry, but the other fields are.
Similarly, if the parent clock driver ever modifies the best_parent_rate
or best_parent_hw, this will be applied to the child once the call to
clk_core_round_rate_nolock() is done. best_parent_hw is probably not
going to be a valid parent, and best_parent_rate might lead to a parent
rate change different to the one that was initially computed.
clk_mux_determine_rate_flags() and the affected drivers will copy the
request before forwarding it to the parents, so they won't be affected
by the latter issue, but the former is still going to be there and will
lead to erroneous data and context being passed to the various clock
drivers in the same sub-tree.
Let's create two new functions, clk_core_forward_rate_req() and
clk_hw_forward_rate_request() for the framework and the clock providers
that will copy a request from a child clock and update the context to
match the parent's. We also update the relevant call sites in the
framework and drivers to use that new function.
Let's also add a test to make sure we avoid regressions there.
Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com> # imx8mp
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> # exynos4210, meson g12b
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20220816112530.1837489-22-maxime@cerno.tech
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Tested-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2022-08-16 13:25:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-10-26 15:46:59 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clk: Stop forwarding clk_rate_requests to the parent
If the clock cannot modify its rate and has CLK_SET_RATE_PARENT,
clk_mux_determine_rate_flags(), clk_core_round_rate_nolock() and a
number of drivers will forward the clk_rate_request to the parent clock.
clk_core_round_rate_nolock() will pass the pointer directly, which means
that we pass a clk_rate_request to the parent that has the rate,
min_rate and max_rate of the child, and the best_parent_rate and
best_parent_hw fields will be relative to the child as well, so will
point to our current clock and its rate. The most common case for
CLK_SET_RATE_PARENT is that the child and parent clock rates will be
equal, so the rate field isn't a worry, but the other fields are.
Similarly, if the parent clock driver ever modifies the best_parent_rate
or best_parent_hw, this will be applied to the child once the call to
clk_core_round_rate_nolock() is done. best_parent_hw is probably not
going to be a valid parent, and best_parent_rate might lead to a parent
rate change different to the one that was initially computed.
clk_mux_determine_rate_flags() and the affected drivers will copy the
request before forwarding it to the parents, so they won't be affected
by the latter issue, but the former is still going to be there and will
lead to erroneous data and context being passed to the various clock
drivers in the same sub-tree.
Let's create two new functions, clk_core_forward_rate_req() and
clk_hw_forward_rate_request() for the framework and the clock providers
that will copy a request from a child clock and update the context to
match the parent's. We also update the relevant call sites in the
framework and drivers to use that new function.
Let's also add a test to make sure we avoid regressions there.
Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com> # imx8mp
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> # exynos4210, meson g12b
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20220816112530.1837489-22-maxime@cerno.tech
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Tested-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2022-08-16 13:25:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-10-26 15:46:59 +02:00
|
|
|
|
|
|
|
|
|
clk: Stop forwarding clk_rate_requests to the parent
If the clock cannot modify its rate and has CLK_SET_RATE_PARENT,
clk_mux_determine_rate_flags(), clk_core_round_rate_nolock() and a
number of drivers will forward the clk_rate_request to the parent clock.
clk_core_round_rate_nolock() will pass the pointer directly, which means
that we pass a clk_rate_request to the parent that has the rate,
min_rate and max_rate of the child, and the best_parent_rate and
best_parent_hw fields will be relative to the child as well, so will
point to our current clock and its rate. The most common case for
CLK_SET_RATE_PARENT is that the child and parent clock rates will be
equal, so the rate field isn't a worry, but the other fields are.
Similarly, if the parent clock driver ever modifies the best_parent_rate
or best_parent_hw, this will be applied to the child once the call to
clk_core_round_rate_nolock() is done. best_parent_hw is probably not
going to be a valid parent, and best_parent_rate might lead to a parent
rate change different to the one that was initially computed.
clk_mux_determine_rate_flags() and the affected drivers will copy the
request before forwarding it to the parents, so they won't be affected
by the latter issue, but the former is still going to be there and will
lead to erroneous data and context being passed to the various clock
drivers in the same sub-tree.
Let's create two new functions, clk_core_forward_rate_req() and
clk_hw_forward_rate_request() for the framework and the clock providers
that will copy a request from a child clock and update the context to
match the parent's. We also update the relevant call sites in the
framework and drivers to use that new function.
Let's also add a test to make sure we avoid regressions there.
Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com> # imx8mp
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> # exynos4210, meson g12b
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20220816112530.1837489-22-maxime@cerno.tech
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Tested-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2022-08-16 13:25:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-12-01 22:51:54 +01:00
|
|
|
|
|
|
|
|
|
2015-07-07 20:48:08 +02:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-13 19:34:21 +08:00
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
2015-04-30 15:11:31 -07:00
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
2015-07-07 20:48:08 +02:00
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
2015-07-07 20:48:08 +02:00
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
2015-07-07 20:48:08 +02:00
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
2015-07-07 20:48:08 +02:00
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-06-10 21:19:41 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-12-12 08:41:42 +09:00
|
|
|
|
2020-06-10 21:19:41 -05:00
|
|
|
|
|
|
|
|
|
2025-12-12 08:41:42 +09:00
|
|
|
|
|
|
|
|
|
2020-06-10 21:19:41 -05:00
|
|
|
|
2015-06-25 15:55:14 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clk: Move clk_core_init_rate_req() from clk_core_round_rate_nolock() to its caller
The clk_rate_request structure is used internally as an argument for
the clk_core_determine_round_nolock() and clk_core_round_rate_nolock().
In both cases, the clk_core_init_rate_req() function is used to
initialize the clk_rate_request structure.
However, the expectation on who gets to call that function is
inconsistent between those two functions. Indeed,
clk_core_determine_round_nolock() will assume the structure is properly
initialized and will just use it.
On the other hand, clk_core_round_rate_nolock() will call
clk_core_init_rate_req() itself, expecting the caller to have filled
only a minimal set of parameters (rate, min_rate and max_rate).
If we ignore the calling convention inconsistency, this leads to a
second inconsistency for drivers:
* If they get called by the framework through
clk_core_round_rate_nolock(), the rate, min_rate and max_rate
fields will be filled by the caller, and the best_parent_rate and
best_parent_hw fields will get filled by clk_core_init_rate_req().
* If they get called by a driver through __clk_determine_rate (and
thus clk_core_round_rate_nolock), only best_parent_rate and
best_parent_hw are being explicitly set by the framework. Even
though we can reasonably expect rate to be set, only one of the 6
in-tree users explicitly set min_rate and max_rate.
* If they get called by the framework through
clk_core_determine_round_nolock(), then we have two callpaths.
Either it will be called by clk_core_round_rate_nolock() itself, or
it will be called by clk_calc_new_rates(), which will properly
initialize rate, min_rate, max_rate itself, and best_parent_rate
and best_parent_hw through clk_core_init_rate_req().
Even though the first and third case seems equivalent, they aren't when
the clock has CLK_SET_RATE_PARENT. Indeed, in such a case
clk_core_round_rate_nolock() will call itself on the current parent
clock with the same clk_rate_request structure.
The clk_core_init_rate_req() function will then be called on the parent
clock, with the child clk_rate_request pointer and will fill the
best_parent_rate and best_parent_hw fields with the parent context.
When the whole recursion stops and the call returns, the initial caller
will end up with a clk_rate_request structure with some information of
the child clock (rate, min_rate, max_rate) and some others of the last
clock up the tree whose child had CLK_SET_RATE_PARENT (best_parent_hw,
best_parent_rate).
In the most common case, best_parent_rate is going to be equal on all
the parent clocks so it's not a big deal. However, best_parent_hw is
going to point to a clock that never has been a valid parent for that
clock which is definitely confusing.
In order to fix the calling inconsistency, let's move the
clk_core_init_rate_req() calls to the callers, which will also help a
bit with the clk_core_round_rate_nolock() recursion.
Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com> # imx8mp
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> # exynos4210, meson g12b
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20220816112530.1837489-16-maxime@cerno.tech
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Tested-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2022-08-16 13:25:20 +02:00
|
|
|
|
2015-06-25 15:55:14 -07:00
|
|
|
|
2022-10-26 15:46:59 +02:00
|
|
|
|
|
|
|
|
|
2015-06-25 15:55:14 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-10-26 15:46:59 +02:00
|
|
|
|
|
|
|
|
|
2015-06-25 15:55:14 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-06-25 17:24:15 -07:00
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-28 13:59:01 -07:00
|
|
|
|
2015-06-25 17:24:15 -07:00
|
|
|
|
2017-12-01 22:51:59 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clk: Move clk_core_init_rate_req() from clk_core_round_rate_nolock() to its caller
The clk_rate_request structure is used internally as an argument for
the clk_core_determine_round_nolock() and clk_core_round_rate_nolock().
In both cases, the clk_core_init_rate_req() function is used to
initialize the clk_rate_request structure.
However, the expectation on who gets to call that function is
inconsistent between those two functions. Indeed,
clk_core_determine_round_nolock() will assume the structure is properly
initialized and will just use it.
On the other hand, clk_core_round_rate_nolock() will call
clk_core_init_rate_req() itself, expecting the caller to have filled
only a minimal set of parameters (rate, min_rate and max_rate).
If we ignore the calling convention inconsistency, this leads to a
second inconsistency for drivers:
* If they get called by the framework through
clk_core_round_rate_nolock(), the rate, min_rate and max_rate
fields will be filled by the caller, and the best_parent_rate and
best_parent_hw fields will get filled by clk_core_init_rate_req().
* If they get called by a driver through __clk_determine_rate (and
thus clk_core_round_rate_nolock), only best_parent_rate and
best_parent_hw are being explicitly set by the framework. Even
though we can reasonably expect rate to be set, only one of the 6
in-tree users explicitly set min_rate and max_rate.
* If they get called by the framework through
clk_core_determine_round_nolock(), then we have two callpaths.
Either it will be called by clk_core_round_rate_nolock() itself, or
it will be called by clk_calc_new_rates(), which will properly
initialize rate, min_rate, max_rate itself, and best_parent_rate
and best_parent_hw through clk_core_init_rate_req().
Even though the first and third case seems equivalent, they aren't when
the clock has CLK_SET_RATE_PARENT. Indeed, in such a case
clk_core_round_rate_nolock() will call itself on the current parent
clock with the same clk_rate_request structure.
The clk_core_init_rate_req() function will then be called on the parent
clock, with the child clk_rate_request pointer and will fill the
best_parent_rate and best_parent_hw fields with the parent context.
When the whole recursion stops and the call returns, the initial caller
will end up with a clk_rate_request structure with some information of
the child clock (rate, min_rate, max_rate) and some others of the last
clock up the tree whose child had CLK_SET_RATE_PARENT (best_parent_hw,
best_parent_rate).
In the most common case, best_parent_rate is going to be equal on all
the parent clocks so it's not a big deal. However, best_parent_hw is
going to point to a clock that never has been a valid parent for that
clock which is definitely confusing.
In order to fix the calling inconsistency, let's move the
clk_core_init_rate_req() calls to the callers, which will also help a
bit with the clk_core_round_rate_nolock() recursion.
Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com> # imx8mp
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> # exynos4210, meson g12b
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20220816112530.1837489-16-maxime@cerno.tech
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Tested-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2022-08-16 13:25:20 +02:00
|
|
|
|
2015-06-25 17:24:15 -07:00
|
|
|
|
2022-10-26 15:46:59 +02:00
|
|
|
|
|
|
|
|
|
2015-06-25 17:24:15 -07:00
|
|
|
|
2017-12-01 22:51:59 +01:00
|
|
|
|
2022-10-26 15:46:59 +02:00
|
|
|
|
|
|
|
|
|
2017-12-01 22:51:59 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-28 13:59:01 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2015-06-25 17:24:15 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
2017-03-21 12:16:26 +02:00
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-21 10:34:47 +01:00
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2013-12-21 10:34:47 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 15:11:31 -07:00
|
|
|
|
2013-12-21 10:34:47 +01:00
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2013-12-21 10:34:47 +01:00
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2013-12-21 10:34:47 +01:00
|
|
|
|
2015-01-09 09:28:10 +01:00
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
|
|
|
|
|
2013-12-21 10:34:47 +01:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
|
|
|
|
|
2013-12-21 10:34:47 +01:00
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2013-12-21 10:34:47 +01:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2013-12-21 10:34:47 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-02-05 15:28:01 -08:00
|
|
|
|
2013-12-21 10:34:47 +01:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
|
|
|
|
|
2013-12-21 10:34:47 +01:00
|
|
|
|
2020-02-05 15:28:01 -08:00
|
|
|
|
2013-12-21 10:34:47 +01:00
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-02-05 15:28:01 -08:00
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-02-05 15:28:01 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2013-12-21 10:34:47 +01:00
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2014-03-26 16:06:36 -07:00
|
|
|
|
2017-08-21 10:04:59 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-03-26 16:06:36 -07:00
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
clk: Update req_rate on __clk_recalc_rates()
Commit cb1b1dd96241 ("clk: Set req_rate on reparenting") introduced a
new function, clk_core_update_orphan_child_rates(), that updates the
req_rate field on reparenting.
It turns out that that function will interfere with the clock notifying
done by __clk_recalc_rates(). This ends up reporting the new rate in
both the old_rate and new_rate fields of struct clk_notifier_data.
Since clk_core_update_orphan_child_rates() is basically
__clk_recalc_rates() without the notifiers, and with the req_rate field
update, we can drop clk_core_update_orphan_child_rates() entirely, and
make __clk_recalc_rates() update req_rate.
However, __clk_recalc_rates() is being called in several code paths:
when retrieving a rate (most likely through clk_get_rate()), when changing
parents (through clk_set_rate() or clk_hw_reparent()), or when updating
the orphan status (through clk_core_reparent_orphans_nolock(), called at
registration).
Updating req_rate on reparenting or initialisation makes sense, but we
shouldn't do it on clk_get_rate(). Thus an extra flag has been added to
update or not req_rate depending on the context.
Fixes: cb1b1dd96241 ("clk: Set req_rate on reparenting")
Link: https://lore.kernel.org/linux-clk/0acc7217-762c-7c0d-45a0-55c384824ce4@samsung.com/
Link: https://lore.kernel.org/linux-clk/Y0QNSx+ZgqKSvPOC@sirena.org.uk/
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reported-by: Mark Brown <broonie@kernel.org>
Suggested-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20221010-rpi-clk-fixes-again-v1-1-d87ba82ac404@cerno.tech
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2022-10-10 16:47:38 +02:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-06-29 15:14:19 +02:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clk: Update req_rate on __clk_recalc_rates()
Commit cb1b1dd96241 ("clk: Set req_rate on reparenting") introduced a
new function, clk_core_update_orphan_child_rates(), that updates the
req_rate field on reparenting.
It turns out that that function will interfere with the clock notifying
done by __clk_recalc_rates(). This ends up reporting the new rate in
both the old_rate and new_rate fields of struct clk_notifier_data.
Since clk_core_update_orphan_child_rates() is basically
__clk_recalc_rates() without the notifiers, and with the req_rate field
update, we can drop clk_core_update_orphan_child_rates() entirely, and
make __clk_recalc_rates() update req_rate.
However, __clk_recalc_rates() is being called in several code paths:
when retrieving a rate (most likely through clk_get_rate()), when changing
parents (through clk_set_rate() or clk_hw_reparent()), or when updating
the orphan status (through clk_core_reparent_orphans_nolock(), called at
registration).
Updating req_rate on reparenting or initialisation makes sense, but we
shouldn't do it on clk_get_rate(). Thus an extra flag has been added to
update or not req_rate depending on the context.
Fixes: cb1b1dd96241 ("clk: Set req_rate on reparenting")
Link: https://lore.kernel.org/linux-clk/0acc7217-762c-7c0d-45a0-55c384824ce4@samsung.com/
Link: https://lore.kernel.org/linux-clk/Y0QNSx+ZgqKSvPOC@sirena.org.uk/
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reported-by: Mark Brown <broonie@kernel.org>
Suggested-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20221010-rpi-clk-fixes-again-v1-1-d87ba82ac404@cerno.tech
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2022-10-10 16:47:38 +02:00
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2015-01-09 09:28:10 +01:00
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
clk: Update req_rate on __clk_recalc_rates()
Commit cb1b1dd96241 ("clk: Set req_rate on reparenting") introduced a
new function, clk_core_update_orphan_child_rates(), that updates the
req_rate field on reparenting.
It turns out that that function will interfere with the clock notifying
done by __clk_recalc_rates(). This ends up reporting the new rate in
both the old_rate and new_rate fields of struct clk_notifier_data.
Since clk_core_update_orphan_child_rates() is basically
__clk_recalc_rates() without the notifiers, and with the req_rate field
update, we can drop clk_core_update_orphan_child_rates() entirely, and
make __clk_recalc_rates() update req_rate.
However, __clk_recalc_rates() is being called in several code paths:
when retrieving a rate (most likely through clk_get_rate()), when changing
parents (through clk_set_rate() or clk_hw_reparent()), or when updating
the orphan status (through clk_core_reparent_orphans_nolock(), called at
registration).
Updating req_rate on reparenting or initialisation makes sense, but we
shouldn't do it on clk_get_rate(). Thus an extra flag has been added to
update or not req_rate depending on the context.
Fixes: cb1b1dd96241 ("clk: Set req_rate on reparenting")
Link: https://lore.kernel.org/linux-clk/0acc7217-762c-7c0d-45a0-55c384824ce4@samsung.com/
Link: https://lore.kernel.org/linux-clk/Y0QNSx+ZgqKSvPOC@sirena.org.uk/
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reported-by: Mark Brown <broonie@kernel.org>
Suggested-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20221010-rpi-clk-fixes-again-v1-1-d87ba82ac404@cerno.tech
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2022-10-10 16:47:38 +02:00
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
clk: Update req_rate on __clk_recalc_rates()
Commit cb1b1dd96241 ("clk: Set req_rate on reparenting") introduced a
new function, clk_core_update_orphan_child_rates(), that updates the
req_rate field on reparenting.
It turns out that that function will interfere with the clock notifying
done by __clk_recalc_rates(). This ends up reporting the new rate in
both the old_rate and new_rate fields of struct clk_notifier_data.
Since clk_core_update_orphan_child_rates() is basically
__clk_recalc_rates() without the notifiers, and with the req_rate field
update, we can drop clk_core_update_orphan_child_rates() entirely, and
make __clk_recalc_rates() update req_rate.
However, __clk_recalc_rates() is being called in several code paths:
when retrieving a rate (most likely through clk_get_rate()), when changing
parents (through clk_set_rate() or clk_hw_reparent()), or when updating
the orphan status (through clk_core_reparent_orphans_nolock(), called at
registration).
Updating req_rate on reparenting or initialisation makes sense, but we
shouldn't do it on clk_get_rate(). Thus an extra flag has been added to
update or not req_rate depending on the context.
Fixes: cb1b1dd96241 ("clk: Set req_rate on reparenting")
Link: https://lore.kernel.org/linux-clk/0acc7217-762c-7c0d-45a0-55c384824ce4@samsung.com/
Link: https://lore.kernel.org/linux-clk/Y0QNSx+ZgqKSvPOC@sirena.org.uk/
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reported-by: Mark Brown <broonie@kernel.org>
Suggested-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20221010-rpi-clk-fixes-again-v1-1-d87ba82ac404@cerno.tech
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2022-10-10 16:47:38 +02:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
2020-02-05 15:28:01 -08:00
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
clk: Update req_rate on __clk_recalc_rates()
Commit cb1b1dd96241 ("clk: Set req_rate on reparenting") introduced a
new function, clk_core_update_orphan_child_rates(), that updates the
req_rate field on reparenting.
It turns out that that function will interfere with the clock notifying
done by __clk_recalc_rates(). This ends up reporting the new rate in
both the old_rate and new_rate fields of struct clk_notifier_data.
Since clk_core_update_orphan_child_rates() is basically
__clk_recalc_rates() without the notifiers, and with the req_rate field
update, we can drop clk_core_update_orphan_child_rates() entirely, and
make __clk_recalc_rates() update req_rate.
However, __clk_recalc_rates() is being called in several code paths:
when retrieving a rate (most likely through clk_get_rate()), when changing
parents (through clk_set_rate() or clk_hw_reparent()), or when updating
the orphan status (through clk_core_reparent_orphans_nolock(), called at
registration).
Updating req_rate on reparenting or initialisation makes sense, but we
shouldn't do it on clk_get_rate(). Thus an extra flag has been added to
update or not req_rate depending on the context.
Fixes: cb1b1dd96241 ("clk: Set req_rate on reparenting")
Link: https://lore.kernel.org/linux-clk/0acc7217-762c-7c0d-45a0-55c384824ce4@samsung.com/
Link: https://lore.kernel.org/linux-clk/Y0QNSx+ZgqKSvPOC@sirena.org.uk/
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reported-by: Mark Brown <broonie@kernel.org>
Suggested-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20221010-rpi-clk-fixes-again-v1-1-d87ba82ac404@cerno.tech
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2022-10-10 16:47:38 +02:00
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2020-02-05 15:28:01 -08:00
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
|
|
|
|
|
2012-08-31 14:21:28 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-08-16 13:25:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-08-31 14:21:28 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-02-05 15:28:01 -08:00
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
|
|
|
|
|
2012-08-31 14:21:28 +02:00
|
|
|
|
2020-02-05 15:28:01 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-08-31 14:21:28 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2013-07-29 12:24:59 +01:00
|
|
|
|
2013-09-29 02:37:14 +02:00
|
|
|
|
2013-07-29 12:24:59 +01:00
|
|
|
|
2015-12-28 19:23:08 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-20 16:31:00 -08:00
|
|
|
|
2019-04-30 10:22:30 -07:00
|
|
|
|
2019-04-12 11:31:47 -07:00
|
|
|
|
2013-09-29 02:37:14 +02:00
|
|
|
|
2013-09-29 02:37:16 +02:00
|
|
|
|
2019-04-30 10:22:30 -07:00
|
|
|
|
2019-04-12 11:31:47 -07:00
|
|
|
|
2018-12-20 16:31:00 -08:00
|
|
|
|
|
|
|
|
|
2019-04-30 10:22:30 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-20 16:31:00 -08:00
|
|
|
|
2019-04-30 10:22:30 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-08-16 00:31:55 +02:00
|
|
|
|
|
|
|
|
|
2019-04-30 10:22:30 -07:00
|
|
|
|
2018-12-20 16:31:00 -08:00
|
|
|
|
|
|
|
|
|
2019-04-30 10:22:30 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-07-29 12:24:59 +01:00
|
|
|
|
|
|
|
|
|
2019-08-16 12:41:52 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-22 22:53:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2013-07-29 12:24:59 +01:00
|
|
|
|
2015-04-22 22:53:05 +02:00
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2013-07-29 12:24:59 +01:00
|
|
|
|
2013-08-29 12:10:51 +01:00
|
|
|
|
2015-04-22 22:53:05 +02:00
|
|
|
|
|
|
|
|
|
2013-08-29 12:10:51 +01:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2013-08-29 12:10:51 +01:00
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2015-04-22 22:53:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-29 12:10:51 +01:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2015-04-22 22:53:05 +02:00
|
|
|
|
|
|
|
|
|
2013-08-29 12:10:51 +01:00
|
|
|
|
2013-07-29 12:24:59 +01:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2013-07-29 12:24:59 +01:00
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2013-07-29 12:24:59 +01:00
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2013-07-29 12:24:59 +01:00
|
|
|
|
|
|
|
|
|
2016-06-30 17:31:14 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-07-29 12:24:59 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-30 17:31:14 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2016-06-30 17:31:14 +08:00
|
|
|
|
|
|
|
|
|
2013-07-29 12:24:59 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2013-07-29 12:24:59 +01:00
|
|
|
|
|
|
|
|
|
2014-01-15 10:47:22 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-01-15 10:47:22 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2016-06-30 17:31:14 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-01-15 10:47:22 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2014-01-15 10:47:22 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2014-01-15 10:47:22 -08:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2014-01-15 10:47:22 -08:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2015-02-02 14:37:41 -08:00
|
|
|
|
2013-07-29 12:24:59 +01:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
|
|
|
|
|
2013-07-29 12:24:59 +01:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2015-02-02 14:37:41 -08:00
|
|
|
|
2013-07-29 12:24:59 +01:00
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2013-07-29 12:24:59 +01:00
|
|
|
|
clk: Set req_rate on reparenting
If a non-rate clock started by default with a parent that never
registered, core->req_rate will be 0. The expectation is that whenever
the parent will be registered, req_rate will be updated with the new
value that has just been computed.
However, if that clock is a mux, clk_set_parent() can also make that
clock no longer orphan. In this case however, we never update req_rate.
The natural solution to this would be to update core->rate and
core->req_rate in clk_reparent() by calling clk_recalc().
However, this doesn't work in all cases. Indeed, clk_recalc() is called
by __clk_set_parent_before(), __clk_set_parent() and
clk_core_reparent(). Both __clk_set_parent_before() and __clk_set_parent
will call clk_recalc() with the enable_lock taken through a call to
clk_enable_lock(), the underlying locking primitive being a spinlock.
clk_recalc() calls the backing driver .recalc_rate hook, and that
implementation might sleep if the underlying device uses a bus with
accesses that might sleep, such as i2c.
In such a situation, we would end up sleeping while holding a spinlock,
and thus in an atomic section.
In order to work around this, we can move the core->rate and
core->req_rate update to the clk_recalc() calling sites, after the
enable_lock has been released if it was taken.
The only situation that could still be problematic is the
clk_core_reparent() -> clk_reparent() case that doesn't have any
locking. clk_core_reparent() is itself called by clk_hw_reparent(),
which is then called by 4 drivers:
* clk-stm32mp1.c, stm32/clk-stm32-core.c and tegra/clk-tegra210-emc.c
use it in their set_parent implementation. The set_parent hook is
only called by __clk_set_parent() and clk_change_rate(), both of
them calling it without the enable_lock taken.
* clk/tegra/clk-tegra124-emc.c calls it as part of its set_rate
implementation. set_rate is only called by clk_change_rate(), again
without the enable_lock taken.
In both cases we can't end up in a situation where the clk_hw_reparent()
caller would hold a spinlock, so it seems like this is a good
workaround.
Let's also add some unit tests to make sure we cover the original bug.
Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com> # imx8mp
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> # exynos4210, meson g12b
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20220816112530.1837489-14-maxime@cerno.tech
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Tested-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2022-08-16 13:25:18 +02:00
|
|
|
|
2015-07-28 21:19:41 +08:00
|
|
|
|
2013-07-29 12:24:59 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2013-07-29 12:24:59 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-06-29 15:14:19 +02:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-09 09:28:10 +01:00
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2013-04-03 12:17:12 -07:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2014-02-24 16:08:41 -08:00
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2014-02-24 16:08:41 -08:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2013-04-03 12:17:12 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-07-29 12:25:00 +01:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2014-03-26 16:06:36 -07:00
|
|
|
|
2013-07-29 12:25:00 +01:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2012-04-12 20:50:17 +08:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
|
|
|
|
|
2013-09-29 02:37:14 +02:00
|
|
|
|
2025-02-07 17:36:10 +08:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2012-03-26 14:45:36 -07:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2012-03-26 14:45:36 -07:00
|
|
|
|
|
|
|
|
|
2012-05-02 16:23:43 -07:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2013-07-29 12:25:00 +01:00
|
|
|
|
|
|
|
|
|
2012-05-02 16:23:43 -07:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
2013-07-29 12:25:00 +01:00
|
|
|
|
2017-12-01 22:51:54 +01:00
|
|
|
|
2015-07-07 20:48:08 +02:00
|
|
|
|
|
|
|
|
|
2022-08-16 13:25:19 +02:00
|
|
|
|
2017-12-01 22:51:54 +01:00
|
|
|
|
2022-10-26 15:46:59 +02:00
|
|
|
|
|
|
|
|
|
2017-12-01 22:51:54 +01:00
|
|
|
|
2015-03-29 03:48:48 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-10-26 15:46:59 +02:00
|
|
|
|
|
|
|
|
|
2015-07-07 20:48:08 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-03-29 03:48:48 +02:00
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2013-07-29 12:25:00 +01:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2013-07-29 12:25:00 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-02 16:23:43 -07:00
|
|
|
|
2012-03-26 14:45:36 -07:00
|
|
|
|
|
|
|
|
|
2013-07-29 12:25:00 +01:00
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2013-07-29 12:25:00 +01:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-07-29 12:25:00 +01:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
|
|
|
|
|
2013-09-29 02:37:14 +02:00
|
|
|
|
2013-07-29 12:25:00 +01:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2013-07-29 12:25:00 +01:00
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2013-07-29 12:25:00 +01:00
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2013-03-13 15:17:49 +05:30
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
|
|
|
|
|
2013-04-03 12:17:12 -07:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2013-07-29 12:25:00 +01:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2013-07-29 12:25:00 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-07-29 12:25:00 +01:00
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2014-08-21 16:47:45 +03:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2012-06-08 14:04:06 +01:00
|
|
|
|
2014-01-15 10:47:22 -08:00
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2016-06-30 17:31:14 +08:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2016-06-30 17:31:14 +08:00
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2016-06-30 17:31:14 +08:00
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2016-06-30 17:31:14 +08:00
|
|
|
|
2012-06-08 14:04:06 +01:00
|
|
|
|
2017-11-30 13:14:51 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-12-22 22:27:58 +01:00
|
|
|
|
|
|
|
|
|
2021-03-05 01:33:34 +01:00
|
|
|
|
2015-12-22 22:27:58 +01:00
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-01-15 10:47:22 -08:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2014-01-15 10:47:22 -08:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2014-01-15 10:47:22 -08:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-01-15 10:47:22 -08:00
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
|
|
|
|
|
2014-01-15 10:47:22 -08:00
|
|
|
|
|
|
|
|
|
2016-06-30 17:31:14 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2015-02-02 14:37:41 -08:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2015-02-02 14:37:41 -08:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2015-12-22 22:27:58 +01:00
|
|
|
|
2021-03-05 01:33:34 +01:00
|
|
|
|
2015-12-22 22:27:58 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-30 17:31:14 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2015-06-20 12:18:03 -07:00
|
|
|
|
|
|
|
|
|
2015-04-03 18:43:44 +02:00
|
|
|
|
2014-08-21 16:47:45 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2013-07-29 12:25:00 +01:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2013-07-29 12:25:00 +01:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2013-07-29 12:25:00 +01:00
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-11-30 13:14:51 +01:00
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
2017-12-01 22:51:55 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-12-01 22:51:56 +01:00
|
|
|
|
2017-12-01 22:51:55 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-12-01 22:51:56 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clk: Move clk_core_init_rate_req() from clk_core_round_rate_nolock() to its caller
The clk_rate_request structure is used internally as an argument for
the clk_core_determine_round_nolock() and clk_core_round_rate_nolock().
In both cases, the clk_core_init_rate_req() function is used to
initialize the clk_rate_request structure.
However, the expectation on who gets to call that function is
inconsistent between those two functions. Indeed,
clk_core_determine_round_nolock() will assume the structure is properly
initialized and will just use it.
On the other hand, clk_core_round_rate_nolock() will call
clk_core_init_rate_req() itself, expecting the caller to have filled
only a minimal set of parameters (rate, min_rate and max_rate).
If we ignore the calling convention inconsistency, this leads to a
second inconsistency for drivers:
* If they get called by the framework through
clk_core_round_rate_nolock(), the rate, min_rate and max_rate
fields will be filled by the caller, and the best_parent_rate and
best_parent_hw fields will get filled by clk_core_init_rate_req().
* If they get called by a driver through __clk_determine_rate (and
thus clk_core_round_rate_nolock), only best_parent_rate and
best_parent_hw are being explicitly set by the framework. Even
though we can reasonably expect rate to be set, only one of the 6
in-tree users explicitly set min_rate and max_rate.
* If they get called by the framework through
clk_core_determine_round_nolock(), then we have two callpaths.
Either it will be called by clk_core_round_rate_nolock() itself, or
it will be called by clk_calc_new_rates(), which will properly
initialize rate, min_rate, max_rate itself, and best_parent_rate
and best_parent_hw through clk_core_init_rate_req().
Even though the first and third case seems equivalent, they aren't when
the clock has CLK_SET_RATE_PARENT. Indeed, in such a case
clk_core_round_rate_nolock() will call itself on the current parent
clock with the same clk_rate_request structure.
The clk_core_init_rate_req() function will then be called on the parent
clock, with the child clk_rate_request pointer and will fill the
best_parent_rate and best_parent_hw fields with the parent context.
When the whole recursion stops and the call returns, the initial caller
will end up with a clk_rate_request structure with some information of
the child clock (rate, min_rate, max_rate) and some others of the last
clock up the tree whose child had CLK_SET_RATE_PARENT (best_parent_hw,
best_parent_rate).
In the most common case, best_parent_rate is going to be equal on all
the parent clocks so it's not a big deal. However, best_parent_hw is
going to point to a clock that never has been a valid parent for that
clock which is definitely confusing.
In order to fix the calling inconsistency, let's move the
clk_core_init_rate_req() calls to the callers, which will also help a
bit with the clk_core_round_rate_nolock() recursion.
Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com> # imx8mp
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> # exynos4210, meson g12b
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20220816112530.1837489-16-maxime@cerno.tech
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Tested-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2022-08-16 13:25:20 +02:00
|
|
|
|
2017-12-01 22:51:55 +01:00
|
|
|
|
2022-10-26 15:46:59 +02:00
|
|
|
|
|
|
|
|
|
2017-12-01 22:51:55 +01:00
|
|
|
|
|
|
|
|
|
2022-10-26 15:46:59 +02:00
|
|
|
|
|
|
|
|
|
2017-12-01 22:51:56 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-12-01 22:51:55 +01:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-12-01 22:51:55 +01:00
|
|
|
|
2022-06-30 18:12:05 +03:00
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
|
|
|
|
|
2017-12-01 22:51:55 +01:00
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
2024-12-02 11:06:21 +01:00
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
|
|
|
|
|
2017-12-01 22:51:56 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
2017-12-01 22:51:55 +01:00
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-08-21 10:04:59 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-08-21 10:04:59 +02:00
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2017-08-21 10:04:59 +02:00
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
2017-08-21 10:04:59 +02:00
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-26 11:51:34 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2012-03-26 11:51:34 -07:00
|
|
|
|
|
|
|
|
|
2025-12-12 08:41:42 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2012-03-26 11:51:34 -07:00
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2013-08-21 23:58:09 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2013-03-28 13:59:01 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2017-12-01 22:51:59 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2017-12-01 22:51:59 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-28 13:59:01 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-12-01 22:51:59 +01:00
|
|
|
|
2019-06-17 15:56:02 +02:00
|
|
|
|
2017-12-01 22:51:59 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-06-17 15:56:02 +02:00
|
|
|
|
2017-12-01 22:51:59 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-08-16 13:25:07 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
|
|
|
|
|
2017-12-01 22:52:00 +01:00
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
2022-08-16 13:25:07 +02:00
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-12-07 11:50:50 +01:00
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-12-01 22:51:59 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-12-01 22:52:00 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clk: Enforce that disjoints limits are invalid
If we were to have two users of the same clock, doing something like:
clk_set_rate_range(user1, 1000, 2000);
clk_set_rate_range(user2, 3000, 4000);
The second call would fail with -EINVAL, preventing from getting in a
situation where we end up with impossible limits.
However, this is never explicitly checked against and enforced, and
works by relying on an undocumented behaviour of clk_set_rate().
Indeed, on the first clk_set_rate_range will make sure the current clock
rate is within the new range, so it will be between 1000 and 2000Hz. On
the second clk_set_rate_range(), it will consider (rightfully), that our
current clock is outside of the 3000-4000Hz range, and will call
clk_core_set_rate_nolock() to set it to 3000Hz.
clk_core_set_rate_nolock() will then call clk_calc_new_rates() that will
eventually check that our rate 3000Hz rate is outside the min 3000Hz max
2000Hz range, will bail out, the error will propagate and we'll
eventually return -EINVAL.
This solely relies on the fact that clk_calc_new_rates(), and in
particular clk_core_determine_round_nolock(), won't modify the new rate
allowing the error to be reported. That assumption won't be true for all
drivers, and most importantly we'll break that assumption in a later
patch.
It can also be argued that we shouldn't even reach the point where we're
calling clk_core_set_rate_nolock().
Let's make an explicit check for disjoints range before we're doing
anything.
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20220225143534.405820-4-maxime@cerno.tech
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2022-02-25 15:35:25 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
|
|
|
|
|
2022-08-16 13:25:17 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-02-25 15:35:28 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-08-16 13:25:17 +02:00
|
|
|
|
2022-02-25 15:35:28 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
|
|
|
|
|
clk: Enforce that disjoints limits are invalid
If we were to have two users of the same clock, doing something like:
clk_set_rate_range(user1, 1000, 2000);
clk_set_rate_range(user2, 3000, 4000);
The second call would fail with -EINVAL, preventing from getting in a
situation where we end up with impossible limits.
However, this is never explicitly checked against and enforced, and
works by relying on an undocumented behaviour of clk_set_rate().
Indeed, on the first clk_set_rate_range will make sure the current clock
rate is within the new range, so it will be between 1000 and 2000Hz. On
the second clk_set_rate_range(), it will consider (rightfully), that our
current clock is outside of the 3000-4000Hz range, and will call
clk_core_set_rate_nolock() to set it to 3000Hz.
clk_core_set_rate_nolock() will then call clk_calc_new_rates() that will
eventually check that our rate 3000Hz rate is outside the min 3000Hz max
2000Hz range, will bail out, the error will propagate and we'll
eventually return -EINVAL.
This solely relies on the fact that clk_calc_new_rates(), and in
particular clk_core_determine_round_nolock(), won't modify the new rate
allowing the error to be reported. That assumption won't be true for all
drivers, and most importantly we'll break that assumption in a later
patch.
It can also be argued that we shouldn't even reach the point where we're
calling clk_core_set_rate_nolock().
Let's make an explicit check for disjoints range before we're doing
anything.
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20220225143534.405820-4-maxime@cerno.tech
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2022-02-25 15:35:25 +01:00
|
|
|
|
2017-12-01 22:51:59 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-08-16 13:25:07 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-12-07 11:50:50 +01:00
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-12-07 11:50:50 +01:00
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-06-25 17:24:15 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-28 13:59:01 -07:00
|
|
|
|
2015-06-25 17:24:15 -07:00
|
|
|
|
|
|
|
|
|
2013-03-28 13:59:01 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2015-12-28 19:23:04 +09:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2016-02-09 20:19:14 +09:00
|
|
|
|
2015-12-28 19:23:04 +09:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2015-12-28 19:23:04 +09:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2013-04-02 23:09:37 +02:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
|
|
|
|
|
clk: Update req_rate on __clk_recalc_rates()
Commit cb1b1dd96241 ("clk: Set req_rate on reparenting") introduced a
new function, clk_core_update_orphan_child_rates(), that updates the
req_rate field on reparenting.
It turns out that that function will interfere with the clock notifying
done by __clk_recalc_rates(). This ends up reporting the new rate in
both the old_rate and new_rate fields of struct clk_notifier_data.
Since clk_core_update_orphan_child_rates() is basically
__clk_recalc_rates() without the notifiers, and with the req_rate field
update, we can drop clk_core_update_orphan_child_rates() entirely, and
make __clk_recalc_rates() update req_rate.
However, __clk_recalc_rates() is being called in several code paths:
when retrieving a rate (most likely through clk_get_rate()), when changing
parents (through clk_set_rate() or clk_hw_reparent()), or when updating
the orphan status (through clk_core_reparent_orphans_nolock(), called at
registration).
Updating req_rate on reparenting or initialisation makes sense, but we
shouldn't do it on clk_get_rate(). Thus an extra flag has been added to
update or not req_rate depending on the context.
Fixes: cb1b1dd96241 ("clk: Set req_rate on reparenting")
Link: https://lore.kernel.org/linux-clk/0acc7217-762c-7c0d-45a0-55c384824ce4@samsung.com/
Link: https://lore.kernel.org/linux-clk/Y0QNSx+ZgqKSvPOC@sirena.org.uk/
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reported-by: Mark Brown <broonie@kernel.org>
Suggested-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20221010-rpi-clk-fixes-again-v1-1-d87ba82ac404@cerno.tech
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2022-10-10 16:47:38 +02:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
2015-03-11 11:34:25 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2015-01-21 17:13:00 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2015-01-21 17:13:00 +01:00
|
|
|
|
|
|
|
|
|
2013-05-15 21:07:24 -07:00
|
|
|
|
2015-01-21 17:13:00 +01:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2022-08-16 13:25:25 +02:00
|
|
|
|
2015-01-21 17:13:00 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-08-16 13:25:24 +02:00
|
|
|
|
2015-01-21 17:13:00 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-12-01 22:51:52 +01:00
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
2013-09-29 02:37:14 +02:00
|
|
|
|
2013-04-02 23:09:38 +02:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2017-12-01 22:51:52 +01:00
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2013-08-21 23:58:09 -07:00
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2017-12-01 22:51:52 +01:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2019-08-17 12:05:59 +05:30
|
|
|
|
2017-12-01 22:51:52 +01:00
|
|
|
|
|
|
|
|
|
2015-02-02 14:11:25 -08:00
|
|
|
|
2013-04-02 23:09:38 +02:00
|
|
|
|
2017-12-01 22:51:52 +01:00
|
|
|
|
|
|
|
|
|
2013-04-02 23:09:38 +02:00
|
|
|
|
2017-12-01 22:51:56 +01:00
|
|
|
|
|
|
|
|
|
2013-04-02 23:09:38 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2013-09-29 02:37:14 +02:00
|
|
|
|
2013-04-02 23:09:38 +02:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2017-12-01 22:51:52 +01:00
|
|
|
|
2013-04-02 23:09:38 +02:00
|
|
|
|
2015-12-28 19:23:10 +09:00
|
|
|
|
2013-04-02 23:09:38 +02:00
|
|
|
|
|
|
|
|
|
2017-08-21 10:04:59 +02:00
|
|
|
|
|
|
|
|
|
2017-12-01 22:51:52 +01:00
|
|
|
|
2017-08-21 10:04:59 +02:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
2013-04-03 12:17:12 -07:00
|
|
|
|
2017-08-21 10:04:59 +02:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2013-04-02 23:09:38 +02:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2013-12-21 10:34:47 +01:00
|
|
|
|
|
|
|
|
|
clk: Update req_rate on __clk_recalc_rates()
Commit cb1b1dd96241 ("clk: Set req_rate on reparenting") introduced a
new function, clk_core_update_orphan_child_rates(), that updates the
req_rate field on reparenting.
It turns out that that function will interfere with the clock notifying
done by __clk_recalc_rates(). This ends up reporting the new rate in
both the old_rate and new_rate fields of struct clk_notifier_data.
Since clk_core_update_orphan_child_rates() is basically
__clk_recalc_rates() without the notifiers, and with the req_rate field
update, we can drop clk_core_update_orphan_child_rates() entirely, and
make __clk_recalc_rates() update req_rate.
However, __clk_recalc_rates() is being called in several code paths:
when retrieving a rate (most likely through clk_get_rate()), when changing
parents (through clk_set_rate() or clk_hw_reparent()), or when updating
the orphan status (through clk_core_reparent_orphans_nolock(), called at
registration).
Updating req_rate on reparenting or initialisation makes sense, but we
shouldn't do it on clk_get_rate(). Thus an extra flag has been added to
update or not req_rate depending on the context.
Fixes: cb1b1dd96241 ("clk: Set req_rate on reparenting")
Link: https://lore.kernel.org/linux-clk/0acc7217-762c-7c0d-45a0-55c384824ce4@samsung.com/
Link: https://lore.kernel.org/linux-clk/Y0QNSx+ZgqKSvPOC@sirena.org.uk/
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reported-by: Mark Brown <broonie@kernel.org>
Suggested-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20221010-rpi-clk-fixes-again-v1-1-d87ba82ac404@cerno.tech
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2022-10-10 16:47:38 +02:00
|
|
|
|
2013-12-21 10:34:47 +01:00
|
|
|
|
clk: Update req_rate on __clk_recalc_rates()
Commit cb1b1dd96241 ("clk: Set req_rate on reparenting") introduced a
new function, clk_core_update_orphan_child_rates(), that updates the
req_rate field on reparenting.
It turns out that that function will interfere with the clock notifying
done by __clk_recalc_rates(). This ends up reporting the new rate in
both the old_rate and new_rate fields of struct clk_notifier_data.
Since clk_core_update_orphan_child_rates() is basically
__clk_recalc_rates() without the notifiers, and with the req_rate field
update, we can drop clk_core_update_orphan_child_rates() entirely, and
make __clk_recalc_rates() update req_rate.
However, __clk_recalc_rates() is being called in several code paths:
when retrieving a rate (most likely through clk_get_rate()), when changing
parents (through clk_set_rate() or clk_hw_reparent()), or when updating
the orphan status (through clk_core_reparent_orphans_nolock(), called at
registration).
Updating req_rate on reparenting or initialisation makes sense, but we
shouldn't do it on clk_get_rate(). Thus an extra flag has been added to
update or not req_rate depending on the context.
Fixes: cb1b1dd96241 ("clk: Set req_rate on reparenting")
Link: https://lore.kernel.org/linux-clk/0acc7217-762c-7c0d-45a0-55c384824ce4@samsung.com/
Link: https://lore.kernel.org/linux-clk/Y0QNSx+ZgqKSvPOC@sirena.org.uk/
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reported-by: Mark Brown <broonie@kernel.org>
Suggested-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20221010-rpi-clk-fixes-again-v1-1-d87ba82ac404@cerno.tech
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2022-10-10 16:47:38 +02:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2013-12-21 10:34:47 +01:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2017-08-21 10:04:59 +02:00
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2019-07-31 10:40:16 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-12-01 22:51:52 +01:00
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-12-01 22:51:52 +01:00
|
|
|
|
2017-12-01 22:51:59 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-12-01 22:51:52 +01:00
|
|
|
|
|
|
|
|
|
2017-12-01 22:51:59 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-12-01 22:51:52 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
2017-12-01 22:51:53 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-12-01 22:51:56 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-12-01 22:51:53 +01:00
|
|
|
|
|
|
|
|
|
2018-03-08 14:49:41 +08:00
|
|
|
|
2017-12-01 22:51:53 +01:00
|
|
|
|
2018-03-08 14:49:41 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-12-01 22:51:53 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-18 21:21:25 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-12-01 22:51:53 +01:00
|
|
|
|
2014-02-18 21:21:25 -08:00
|
|
|
|
|
|
|
|
|
2015-02-02 14:09:43 -08:00
|
|
|
|
2014-02-18 21:21:25 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-12-01 22:51:59 +01:00
|
|
|
|
|
|
|
|
|
2015-02-02 14:37:41 -08:00
|
|
|
|
2017-12-01 22:51:53 +01:00
|
|
|
|
2014-02-18 21:21:25 -08:00
|
|
|
|
2017-12-01 22:51:59 +01:00
|
|
|
|
|
|
|
|
|
2014-02-18 21:21:25 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-20 22:23:43 +01:00
|
|
|
|
2014-02-18 21:21:25 -08:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2014-02-18 21:21:25 -08:00
|
|
|
|
2015-04-30 14:21:56 -07:00
|
|
|
|
2014-02-18 21:21:25 -08:00
|
|
|
|
2020-02-05 15:27:59 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clk: Don't show the incorrect clock phase
It's found that the clock phase output from clk_summary is
wrong compared to the actual phase reading from the register.
cat /sys/kernel/debug/clk/clk_summary | grep sdio_sample
sdio_sample 0 1 0 50000000 0 -22
It exposes an issue that clk core, clk_core_get_phase, always
returns the cached core->phase which should be either updated
by calling clk_set_phase or directly from the first place the
clk was registered.
When registering the clk, the core->phase geting from ->get_phase()
may return negative value indicating error. This is quite common
since the clk's phase may be highly related to its parent chain,
but it was temporarily orphan when registered, since its parent
chains hadn't be ready at that time, so the clk drivers decide to
return error in this case. However, if no clk_set_phase is called or
maybe the ->set_phase() isn't even implemented, the core->phase would
never be updated. This is wrong, and we should try to update it when
all its parent chains are settled down, like the way of updating clock
rate for that. But it's not deserved to complicate the code now and
just update it anyway when calling clk_core_get_phase, which would be
much simple and enough.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Acked-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2018-03-14 08:28:31 +08:00
|
|
|
|
2020-02-05 15:27:59 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-18 21:21:25 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-02-05 15:27:59 -08:00
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-02-05 15:27:59 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
2014-02-18 21:21:25 -08:00
|
|
|
|
clk: add duty cycle support
Add the possibility to apply and query the clock signal duty cycle ratio.
This is useful when the duty cycle of the clock signal depends on some
other parameters controlled by the clock framework.
For example, the duty cycle of a divider may depends on the raw divider
setting (ratio = N / div) , which is controlled by the CCF. In such case,
going through the pwm framework to control the duty cycle ratio of this
clock would be a burden.
A clock provider is not required to implement the operation to set and get
the duty cycle. If it does not implement .get_duty_cycle(), the ratio is
assumed to be 50%.
This change also adds a new flag, CLK_DUTY_CYCLE_PARENT. This flag should
be used to indicate that a clock, such as gates and muxes, may inherit
the duty cycle ratio of its parent clock. If a clock does not provide a
get_duty_cycle() callback and has CLK_DUTY_CYCLE_PARENT, then the call
will be directly forwarded to its parent clock, if any. For
set_duty_cycle(), the clock should also have CLK_SET_RATE_PARENT for the
call to be forwarded
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Michael Turquette <mturquette@baylibre.com>
Link: lkml.kernel.org/r/20180619144141.8506-1-jbrunet@baylibre.com
2018-06-19 16:41:41 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-02-25 09:11:01 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-10-29 20:55:00 +01:00
|
|
|
|
2026-03-05 11:12:33 +01:00
|
|
|
|
|
|
|
|
|
2015-02-25 09:11:01 -08:00
|
|
|
|
2026-03-05 11:12:33 +01:00
|
|
|
|
2015-02-25 09:11:01 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-02-05 15:27:59 -08:00
|
|
|
|
2022-11-27 22:53:19 +05:30
|
|
|
|
|
|
|
|
|
2020-02-05 15:27:59 -08:00
|
|
|
|
2022-11-27 22:53:19 +05:30
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
2022-11-27 22:53:19 +05:30
|
|
|
|
2017-12-01 22:51:56 +01:00
|
|
|
|
2020-02-05 15:28:01 -08:00
|
|
|
|
|
|
|
|
|
2020-02-05 15:27:59 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-11-27 22:53:19 +05:30
|
|
|
|
2020-02-05 15:27:59 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-11-27 22:53:19 +05:30
|
|
|
|
2020-11-15 23:34:32 +03:00
|
|
|
|
|
|
|
|
|
2022-11-27 22:53:19 +05:30
|
|
|
|
2020-11-15 23:34:32 +03:00
|
|
|
|
2022-11-27 22:53:19 +05:30
|
|
|
|
2020-11-15 23:34:32 +03:00
|
|
|
|
2022-11-27 22:53:19 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-03-16 15:58:26 +08:00
|
|
|
|
2024-03-25 11:41:59 -07:00
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
2022-11-27 22:53:19 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-25 11:41:59 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-25 11:41:59 -07:00
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-02-14 17:48:00 +02:00
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-02-05 15:27:59 -08:00
|
|
|
|
2019-07-02 16:27:09 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
2015-04-29 16:36:43 +00:00
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-12-01 22:51:56 +01:00
|
|
|
|
2020-02-05 15:28:01 -08:00
|
|
|
|
2019-07-02 16:27:09 +03:00
|
|
|
|
|
|
|
|
|
2020-02-05 15:28:01 -08:00
|
|
|
|
2020-02-05 15:27:59 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clk: add duty cycle support
Add the possibility to apply and query the clock signal duty cycle ratio.
This is useful when the duty cycle of the clock signal depends on some
other parameters controlled by the clock framework.
For example, the duty cycle of a divider may depends on the raw divider
setting (ratio = N / div) , which is controlled by the CCF. In such case,
going through the pwm framework to control the duty cycle ratio of this
clock would be a burden.
A clock provider is not required to implement the operation to set and get
the duty cycle. If it does not implement .get_duty_cycle(), the ratio is
assumed to be 50%.
This change also adds a new flag, CLK_DUTY_CYCLE_PARENT. This flag should
be used to indicate that a clock, such as gates and muxes, may inherit
the duty cycle ratio of its parent clock. If a clock does not provide a
get_duty_cycle() callback and has CLK_DUTY_CYCLE_PARENT, then the call
will be directly forwarded to its parent clock, if any. For
set_duty_cycle(), the clock should also have CLK_SET_RATE_PARENT for the
call to be forwarded
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Michael Turquette <mturquette@baylibre.com>
Link: lkml.kernel.org/r/20180619144141.8506-1-jbrunet@baylibre.com
2018-06-19 16:41:41 +02:00
|
|
|
|
|
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-04-20 08:45:43 +02:00
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-04-20 08:45:43 +02:00
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
|
|
|
|
|
2018-02-14 17:48:00 +02:00
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-03-16 15:58:26 +08:00
|
|
|
|
2024-03-25 11:41:59 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
2017-04-20 08:45:43 +02:00
|
|
|
|
2024-03-25 11:41:59 -07:00
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-04-20 08:45:43 +02:00
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-25 11:41:59 -07:00
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
2015-05-01 09:48:37 -05:00
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
|
|
|
|
|
2018-02-14 17:48:00 +02:00
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
2019-08-28 15:23:06 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-06-29 17:30:24 -07:00
|
|
|
|
2023-04-20 11:38:04 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-06-29 17:30:24 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-08-28 15:23:06 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-04-20 11:38:04 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-08-28 15:23:06 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-10-11 14:27:19 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-08-28 15:23:06 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-04-20 11:38:04 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-01-03 12:06:16 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-07-06 17:16:54 +02:00
|
|
|
|
2018-01-03 12:06:16 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clk: add duty cycle support
Add the possibility to apply and query the clock signal duty cycle ratio.
This is useful when the duty cycle of the clock signal depends on some
other parameters controlled by the clock framework.
For example, the duty cycle of a divider may depends on the raw divider
setting (ratio = N / div) , which is controlled by the CCF. In such case,
going through the pwm framework to control the duty cycle ratio of this
clock would be a burden.
A clock provider is not required to implement the operation to set and get
the duty cycle. If it does not implement .get_duty_cycle(), the ratio is
assumed to be 50%.
This change also adds a new flag, CLK_DUTY_CYCLE_PARENT. This flag should
be used to indicate that a clock, such as gates and muxes, may inherit
the duty cycle ratio of its parent clock. If a clock does not provide a
get_duty_cycle() callback and has CLK_DUTY_CYCLE_PARENT, then the call
will be directly forwarded to its parent clock, if any. For
set_duty_cycle(), the clock should also have CLK_SET_RATE_PARENT for the
call to be forwarded
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Michael Turquette <mturquette@baylibre.com>
Link: lkml.kernel.org/r/20180619144141.8506-1-jbrunet@baylibre.com
2018-06-19 16:41:41 +02:00
|
|
|
|
2018-01-03 12:06:16 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-02-14 17:48:00 +02:00
|
|
|
|
2018-01-03 12:06:16 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-02-14 17:48:00 +02:00
|
|
|
|
2018-01-03 12:06:16 +01:00
|
|
|
|
2019-06-24 20:01:55 -07:00
|
|
|
|
|
|
|
|
|
2017-03-21 15:20:31 +02:00
|
|
|
|
2019-05-03 11:15:09 +08:00
|
|
|
|
2023-09-21 07:32:17 +00:00
|
|
|
|
2017-03-21 15:20:31 +02:00
|
|
|
|
2019-05-03 11:15:09 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-09-21 07:32:17 +00:00
|
|
|
|
2019-07-01 22:20:40 +02:00
|
|
|
|
2023-09-21 07:32:17 +00:00
|
|
|
|
2019-07-01 22:20:40 +02:00
|
|
|
|
2023-09-21 07:32:17 +00:00
|
|
|
|
2019-05-03 11:15:09 +08:00
|
|
|
|
2023-09-21 07:32:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-03-21 15:20:31 +02:00
|
|
|
|
2019-06-24 20:01:55 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-02-14 17:48:00 +02:00
|
|
|
|
2017-03-21 15:20:31 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-06-24 20:01:55 -07:00
|
|
|
|
2017-03-21 15:20:31 +02:00
|
|
|
|
2019-06-24 20:01:55 -07:00
|
|
|
|
2017-03-21 15:20:31 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-02-14 17:48:00 +02:00
|
|
|
|
2017-03-21 15:20:31 +02:00
|
|
|
|
2019-06-10 14:06:38 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-10-13 20:20:42 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clk: add duty cycle support
Add the possibility to apply and query the clock signal duty cycle ratio.
This is useful when the duty cycle of the clock signal depends on some
other parameters controlled by the clock framework.
For example, the duty cycle of a divider may depends on the raw divider
setting (ratio = N / div) , which is controlled by the CCF. In such case,
going through the pwm framework to control the duty cycle ratio of this
clock would be a burden.
A clock provider is not required to implement the operation to set and get
the duty cycle. If it does not implement .get_duty_cycle(), the ratio is
assumed to be 50%.
This change also adds a new flag, CLK_DUTY_CYCLE_PARENT. This flag should
be used to indicate that a clock, such as gates and muxes, may inherit
the duty cycle ratio of its parent clock. If a clock does not provide a
get_duty_cycle() callback and has CLK_DUTY_CYCLE_PARENT, then the call
will be directly forwarded to its parent clock, if any. For
set_duty_cycle(), the clock should also have CLK_SET_RATE_PARENT for the
call to be forwarded
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Michael Turquette <mturquette@baylibre.com>
Link: lkml.kernel.org/r/20180619144141.8506-1-jbrunet@baylibre.com
2018-06-19 16:41:41 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-07-02 16:27:09 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-05-29 18:08:00 +02:00
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
2018-05-29 18:08:00 +02:00
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
2018-05-29 18:08:00 +02:00
|
|
|
|
|
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
2018-05-29 18:08:00 +02:00
|
|
|
|
|
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
2019-08-28 15:23:06 +02:00
|
|
|
|
|
|
|
|
|
2019-07-02 16:27:09 +03:00
|
|
|
|
|
|
|
|
|
2018-05-29 18:08:00 +02:00
|
|
|
|
2023-04-20 11:38:04 +01:00
|
|
|
|
|
|
|
|
|
2018-05-29 18:08:00 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clk: add duty cycle support
Add the possibility to apply and query the clock signal duty cycle ratio.
This is useful when the duty cycle of the clock signal depends on some
other parameters controlled by the clock framework.
For example, the duty cycle of a divider may depends on the raw divider
setting (ratio = N / div) , which is controlled by the CCF. In such case,
going through the pwm framework to control the duty cycle ratio of this
clock would be a burden.
A clock provider is not required to implement the operation to set and get
the duty cycle. If it does not implement .get_duty_cycle(), the ratio is
assumed to be 50%.
This change also adds a new flag, CLK_DUTY_CYCLE_PARENT. This flag should
be used to indicate that a clock, such as gates and muxes, may inherit
the duty cycle ratio of its parent clock. If a clock does not provide a
get_duty_cycle() callback and has CLK_DUTY_CYCLE_PARENT, then the call
will be directly forwarded to its parent clock, if any. For
set_duty_cycle(), the clock should also have CLK_SET_RATE_PARENT for the
call to be forwarded
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Michael Turquette <mturquette@baylibre.com>
Link: lkml.kernel.org/r/20180619144141.8506-1-jbrunet@baylibre.com
2018-06-19 16:41:41 +02:00
|
|
|
|
|
|
|
|
|
2020-06-29 17:30:24 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
2021-10-13 20:20:42 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-06-10 14:06:38 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-05-29 18:08:00 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
2018-05-29 18:08:00 +02:00
|
|
|
|
|
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 15:11:31 -07:00
|
|
|
|
|
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
2015-04-30 15:11:31 -07:00
|
|
|
|
|
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
|
|
|
|
|
2018-05-29 18:08:00 +02:00
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-01-03 16:44:37 -08:00
|
|
|
|
2018-05-29 18:08:00 +02:00
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 15:11:31 -07:00
|
|
|
|
|
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
2015-04-30 15:11:31 -07:00
|
|
|
|
|
|
|
|
|
2016-02-22 15:43:41 -08:00
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 15:11:31 -07:00
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
2015-04-30 15:11:31 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-12-09 17:34:05 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
|
|
|
|
|
2018-05-29 18:08:00 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-05-29 18:08:00 +02:00
|
|
|
|
2015-04-30 14:43:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-12-03 09:08:05 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-08-11 22:00:30 +08:00
|
|
|
|
2019-12-03 09:08:05 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clk: Update req_rate on __clk_recalc_rates()
Commit cb1b1dd96241 ("clk: Set req_rate on reparenting") introduced a
new function, clk_core_update_orphan_child_rates(), that updates the
req_rate field on reparenting.
It turns out that that function will interfere with the clock notifying
done by __clk_recalc_rates(). This ends up reporting the new rate in
both the old_rate and new_rate fields of struct clk_notifier_data.
Since clk_core_update_orphan_child_rates() is basically
__clk_recalc_rates() without the notifiers, and with the req_rate field
update, we can drop clk_core_update_orphan_child_rates() entirely, and
make __clk_recalc_rates() update req_rate.
However, __clk_recalc_rates() is being called in several code paths:
when retrieving a rate (most likely through clk_get_rate()), when changing
parents (through clk_set_rate() or clk_hw_reparent()), or when updating
the orphan status (through clk_core_reparent_orphans_nolock(), called at
registration).
Updating req_rate on reparenting or initialisation makes sense, but we
shouldn't do it on clk_get_rate(). Thus an extra flag has been added to
update or not req_rate depending on the context.
Fixes: cb1b1dd96241 ("clk: Set req_rate on reparenting")
Link: https://lore.kernel.org/linux-clk/0acc7217-762c-7c0d-45a0-55c384824ce4@samsung.com/
Link: https://lore.kernel.org/linux-clk/Y0QNSx+ZgqKSvPOC@sirena.org.uk/
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reported-by: Mark Brown <broonie@kernel.org>
Suggested-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20221010-rpi-clk-fixes-again-v1-1-d87ba82ac404@cerno.tech
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2022-10-10 16:47:38 +02:00
|
|
|
|
2022-03-25 17:11:42 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-12-03 09:08:05 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2015-12-28 19:22:57 +09:00
|
|
|
|
2015-12-28 19:22:56 +09:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
2015-12-28 19:22:57 +09:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2019-04-12 11:31:47 -07:00
|
|
|
|
2020-02-05 15:28:00 -08:00
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
2020-02-25 14:42:48 +01:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2013-03-28 13:59:01 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2021-11-08 20:34:38 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-08-21 10:04:59 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2012-03-29 14:30:40 -07:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2012-03-29 14:30:40 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2012-03-29 14:30:40 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2018-05-08 15:14:57 -03:00
|
|
|
|
2025-12-12 08:41:42 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-12-28 19:23:03 +09:00
|
|
|
|
2012-03-29 14:30:40 -07:00
|
|
|
|
2012-03-26 16:15:52 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2015-12-28 19:23:03 +09:00
|
|
|
|
|
|
|
|
|
2012-03-29 14:30:40 -07:00
|
|
|
|
2012-03-26 16:15:52 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-05-05 13:26:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-12-28 19:23:04 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
|
|
|
|
|
2015-12-28 19:23:03 +09:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2014-01-15 10:47:22 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-09-24 14:39:52 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-09-24 14:39:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-09-24 14:39:52 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-09-24 14:39:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-09-24 14:39:52 +02:00
|
|
|
|
2020-02-05 15:28:00 -08:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
2016-02-22 15:43:41 -08:00
|
|
|
|
|
|
|
|
|
2016-02-02 17:24:56 -08:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-02-05 15:28:00 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-02 17:24:56 -08:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2015-04-22 22:53:05 +02:00
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2015-04-22 22:53:05 +02:00
|
|
|
|
|
|
|
|
|
2025-08-14 11:53:16 +08:00
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2013-12-21 10:34:47 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
|
|
|
|
|
2020-02-05 15:28:01 -08:00
|
|
|
|
2020-02-05 15:28:00 -08:00
|
|
|
|
|
|
|
|
|
2013-12-21 10:34:47 +01:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2013-12-21 10:34:47 +01:00
|
|
|
|
2014-07-14 13:53:27 +02:00
|
|
|
|
2020-02-05 15:27:59 -08:00
|
|
|
|
2014-07-14 13:53:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-02-25 14:42:48 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-02-05 15:28:02 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-07-14 13:53:27 +02:00
|
|
|
|
clk: add duty cycle support
Add the possibility to apply and query the clock signal duty cycle ratio.
This is useful when the duty cycle of the clock signal depends on some
other parameters controlled by the clock framework.
For example, the duty cycle of a divider may depends on the raw divider
setting (ratio = N / div) , which is controlled by the CCF. In such case,
going through the pwm framework to control the duty cycle ratio of this
clock would be a burden.
A clock provider is not required to implement the operation to set and get
the duty cycle. If it does not implement .get_duty_cycle(), the ratio is
assumed to be 50%.
This change also adds a new flag, CLK_DUTY_CYCLE_PARENT. This flag should
be used to indicate that a clock, such as gates and muxes, may inherit
the duty cycle ratio of its parent clock. If a clock does not provide a
get_duty_cycle() callback and has CLK_DUTY_CYCLE_PARENT, then the call
will be directly forwarded to its parent clock, if any. For
set_duty_cycle(), the clock should also have CLK_SET_RATE_PARENT for the
call to be forwarded
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Michael Turquette <mturquette@baylibre.com>
Link: lkml.kernel.org/r/20180619144141.8506-1-jbrunet@baylibre.com
2018-06-19 16:41:41 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
|
|
|
|
|
2020-02-05 15:28:00 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
clk: migrate the count of orphaned clocks at init
The orphan clocks reparents should migrate any existing count from the
orphan clock to its new acestor clocks, otherwise we may have
inconsistent counts in the tree and end-up with gated critical clocks
Assuming we have two clocks, A and B.
* Clock A has CLK_IS_CRITICAL flag set.
* Clock B is an ancestor of A which can gate. Clock B gate is left
enabled by the bootloader.
Step 1: Clock A is registered. Since it is a critical clock, it is
enabled. The clock being still an orphan, no parent are enabled.
Step 2: Clock B is registered and reparented to clock A (potentially
through several other clocks). We are now in situation where the enable
count of clock A is 1 while the enable count of its ancestors is 0, which
is not good.
Step 3: in lateinit, clk_disable_unused() is called, the enable_count of
clock B being 0, clock B is gated and and critical clock A actually gets
disabled.
This situation was found while adding fdiv_clk gates to the meson8b
platform. These clocks parent clk81 critical clock, which is the mother
of all peripheral clocks in this system. Because of the issue described
here, the system is crashing when clk_disable_unused() is called.
The situation is solved by reverting
commit f8f8f1d04494 ("clk: Don't touch hardware when reparenting during registration").
To avoid breaking again the situation described in this commit
description, enabling critical clock should be done before walking the
orphan list. This way, a parent critical clock may not be accidentally
disabled due to the CLK_OPS_PARENT_ENABLE mechanism.
Fixes: f8f8f1d04494 ("clk: Don't touch hardware when reparenting during registration")
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Michael Turquette <mturquette@baylibre.com>
2018-02-14 14:43:36 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-12-25 08:34:29 -08:00
|
|
|
|
2019-12-26 14:09:27 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-12-25 08:34:29 -08:00
|
|
|
|
2019-12-26 14:09:27 -08:00
|
|
|
|
clk: migrate the count of orphaned clocks at init
The orphan clocks reparents should migrate any existing count from the
orphan clock to its new acestor clocks, otherwise we may have
inconsistent counts in the tree and end-up with gated critical clocks
Assuming we have two clocks, A and B.
* Clock A has CLK_IS_CRITICAL flag set.
* Clock B is an ancestor of A which can gate. Clock B gate is left
enabled by the bootloader.
Step 1: Clock A is registered. Since it is a critical clock, it is
enabled. The clock being still an orphan, no parent are enabled.
Step 2: Clock B is registered and reparented to clock A (potentially
through several other clocks). We are now in situation where the enable
count of clock A is 1 while the enable count of its ancestors is 0, which
is not good.
Step 3: in lateinit, clk_disable_unused() is called, the enable_count of
clock B being 0, clock B is gated and and critical clock A actually gets
disabled.
This situation was found while adding fdiv_clk gates to the meson8b
platform. These clocks parent clk81 critical clock, which is the mother
of all peripheral clocks in this system. Because of the issue described
here, the system is crashing when clk_disable_unused() is called.
The situation is solved by reverting
commit f8f8f1d04494 ("clk: Don't touch hardware when reparenting during registration").
To avoid breaking again the situation described in this commit
description, enabling critical clock should be done before walking the
orphan list. This way, a parent critical clock may not be accidentally
disabled due to the CLK_OPS_PARENT_ENABLE mechanism.
Fixes: f8f8f1d04494 ("clk: Don't touch hardware when reparenting during registration")
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Michael Turquette <mturquette@baylibre.com>
2018-02-14 14:43:36 +01:00
|
|
|
|
2021-03-05 01:33:34 +01:00
|
|
|
|
2019-12-25 08:34:29 -08:00
|
|
|
|
2019-12-26 14:09:27 -08:00
|
|
|
|
|
|
|
|
|
2019-12-25 08:34:29 -08:00
|
|
|
|
|
|
|
|
|
2016-07-08 16:32:10 -07:00
|
|
|
|
2015-12-28 19:23:07 +09:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2019-12-03 09:08:05 +01:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2017-08-21 10:04:59 +02:00
|
|
|
|
|
|
|
|
|
2021-11-08 20:34:38 -08:00
|
|
|
|
2025-08-14 11:53:16 +08:00
|
|
|
|
2020-05-05 15:09:53 +01:00
|
|
|
|
2021-11-08 20:34:38 -08:00
|
|
|
|
|
|
|
|
|
2020-05-05 15:09:53 +01:00
|
|
|
|
2013-03-28 13:59:01 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2014-12-12 15:04:16 -08:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2014-12-12 15:04:16 -08:00
|
|
|
|
2012-03-29 14:30:40 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
2018-12-11 08:32:04 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2012-04-25 22:58:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-02-21 16:37:42 -08:00
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-11 08:32:04 -08:00
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2017-02-20 15:20:56 +02:00
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
|
|
|
|
|
2012-04-25 22:58:56 -07:00
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2018-12-11 08:32:04 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
2017-02-20 15:20:56 +02:00
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
|
|
|
|
|
2012-04-25 22:58:56 -07:00
|
|
|
|
2018-12-11 08:32:04 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-11 08:34:16 -08:00
|
|
|
|
2018-12-11 08:32:04 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-11 08:34:16 -08:00
|
|
|
|
2018-12-11 08:32:04 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-11 08:34:16 -08:00
|
|
|
|
2018-12-11 08:32:04 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-10-21 18:21:46 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-02-25 15:35:23 +01:00
|
|
|
|
2020-10-21 18:21:46 +02:00
|
|
|
|
2022-02-25 15:35:23 +01:00
|
|
|
|
2020-10-21 18:21:46 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-04-12 11:31:47 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2019-04-12 11:31:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-07-31 12:35:17 -07:00
|
|
|
|
|
|
|
|
|
2019-04-12 11:31:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-02-21 16:37:42 -08:00
|
|
|
|
2019-04-12 11:31:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-04-12 11:31:49 -07:00
|
|
|
|
2019-04-12 11:31:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-04-12 11:31:49 -07:00
|
|
|
|
2019-04-12 11:31:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-25 11:41:57 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clk: Get runtime PM before walking tree during disable_unused
Doug reported [1] the following hung task:
INFO: task swapper/0:1 blocked for more than 122 seconds.
Not tainted 5.15.149-21875-gf795ebc40eb8 #1
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:swapper/0 state:D stack: 0 pid: 1 ppid: 0 flags:0x00000008
Call trace:
__switch_to+0xf4/0x1f4
__schedule+0x418/0xb80
schedule+0x5c/0x10c
rpm_resume+0xe0/0x52c
rpm_resume+0x178/0x52c
__pm_runtime_resume+0x58/0x98
clk_pm_runtime_get+0x30/0xb0
clk_disable_unused_subtree+0x58/0x208
clk_disable_unused_subtree+0x38/0x208
clk_disable_unused_subtree+0x38/0x208
clk_disable_unused_subtree+0x38/0x208
clk_disable_unused_subtree+0x38/0x208
clk_disable_unused+0x4c/0xe4
do_one_initcall+0xcc/0x2d8
do_initcall_level+0xa4/0x148
do_initcalls+0x5c/0x9c
do_basic_setup+0x24/0x30
kernel_init_freeable+0xec/0x164
kernel_init+0x28/0x120
ret_from_fork+0x10/0x20
INFO: task kworker/u16:0:9 blocked for more than 122 seconds.
Not tainted 5.15.149-21875-gf795ebc40eb8 #1
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/u16:0 state:D stack: 0 pid: 9 ppid: 2 flags:0x00000008
Workqueue: events_unbound deferred_probe_work_func
Call trace:
__switch_to+0xf4/0x1f4
__schedule+0x418/0xb80
schedule+0x5c/0x10c
schedule_preempt_disabled+0x2c/0x48
__mutex_lock+0x238/0x488
__mutex_lock_slowpath+0x1c/0x28
mutex_lock+0x50/0x74
clk_prepare_lock+0x7c/0x9c
clk_core_prepare_lock+0x20/0x44
clk_prepare+0x24/0x30
clk_bulk_prepare+0x40/0xb0
mdss_runtime_resume+0x54/0x1c8
pm_generic_runtime_resume+0x30/0x44
__genpd_runtime_resume+0x68/0x7c
genpd_runtime_resume+0x108/0x1f4
__rpm_callback+0x84/0x144
rpm_callback+0x30/0x88
rpm_resume+0x1f4/0x52c
rpm_resume+0x178/0x52c
__pm_runtime_resume+0x58/0x98
__device_attach+0xe0/0x170
device_initial_probe+0x1c/0x28
bus_probe_device+0x3c/0x9c
device_add+0x644/0x814
mipi_dsi_device_register_full+0xe4/0x170
devm_mipi_dsi_device_register_full+0x28/0x70
ti_sn_bridge_probe+0x1dc/0x2c0
auxiliary_bus_probe+0x4c/0x94
really_probe+0xcc/0x2c8
__driver_probe_device+0xa8/0x130
driver_probe_device+0x48/0x110
__device_attach_driver+0xa4/0xcc
bus_for_each_drv+0x8c/0xd8
__device_attach+0xf8/0x170
device_initial_probe+0x1c/0x28
bus_probe_device+0x3c/0x9c
deferred_probe_work_func+0x9c/0xd8
process_one_work+0x148/0x518
worker_thread+0x138/0x350
kthread+0x138/0x1e0
ret_from_fork+0x10/0x20
The first thread is walking the clk tree and calling
clk_pm_runtime_get() to power on devices required to read the clk
hardware via struct clk_ops::is_enabled(). This thread holds the clk
prepare_lock, and is trying to runtime PM resume a device, when it finds
that the device is in the process of resuming so the thread schedule()s
away waiting for the device to finish resuming before continuing. The
second thread is runtime PM resuming the same device, but the runtime
resume callback is calling clk_prepare(), trying to grab the
prepare_lock waiting on the first thread.
This is a classic ABBA deadlock. To properly fix the deadlock, we must
never runtime PM resume or suspend a device with the clk prepare_lock
held. Actually doing that is near impossible today because the global
prepare_lock would have to be dropped in the middle of the tree, the
device runtime PM resumed/suspended, and then the prepare_lock grabbed
again to ensure consistency of the clk tree topology. If anything
changes with the clk tree in the meantime, we've lost and will need to
start the operation all over again.
Luckily, most of the time we're simply incrementing or decrementing the
runtime PM count on an active device, so we don't have the chance to
schedule away with the prepare_lock held. Let's fix this immediate
problem that can be triggered more easily by simply booting on Qualcomm
sc7180.
Introduce a list of clk_core structures that have been registered, or
are in the process of being registered, that require runtime PM to
operate. Iterate this list and call clk_pm_runtime_get() on each of them
without holding the prepare_lock during clk_disable_unused(). This way
we can be certain that the runtime PM state of the devices will be
active and resumed so we can't schedule away while walking the clk tree
with the prepare_lock held. Similarly, call clk_pm_runtime_put() without
the prepare_lock held to properly drop the runtime PM reference. We
remove the calls to clk_pm_runtime_{get,put}() in this path because
they're superfluous now that we know the devices are runtime resumed.
Reported-by: Douglas Anderson <dianders@chromium.org>
Closes: https://lore.kernel.org/all/20220922084322.RFC.2.I375b6b9e0a0a5348962f004beb3dafee6a12dfbb@changeid/ [1]
Closes: https://issuetracker.google.com/328070191
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Fixes: 9a34b45397e5 ("clk: Add support for runtime PM")
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/20240325184204.745706-5-sboyd@kernel.org
Reviewed-by: Douglas Anderson <dianders@chromium.org>
2024-03-25 11:41:58 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-25 11:41:57 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-04-12 11:31:46 -07:00
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2019-04-12 11:31:47 -07:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2019-07-31 12:35:17 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-04-18 16:29:42 -07:00
|
|
|
|
2026-02-21 16:37:42 -08:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2014-04-18 16:29:42 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2024-03-25 11:41:57 -07:00
|
|
|
|
|
|
|
|
|
2019-07-31 12:35:17 -07:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2012-04-25 22:58:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-12-19 09:33:29 +01:00
|
|
|
|
2019-07-31 12:35:17 -07:00
|
|
|
|
2017-12-19 09:33:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-07-31 12:35:17 -07:00
|
|
|
|
2017-12-19 09:33:29 +01:00
|
|
|
|
2018-12-04 20:24:37 +01:00
|
|
|
|
clk: Get runtime PM before walking tree during disable_unused
Doug reported [1] the following hung task:
INFO: task swapper/0:1 blocked for more than 122 seconds.
Not tainted 5.15.149-21875-gf795ebc40eb8 #1
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:swapper/0 state:D stack: 0 pid: 1 ppid: 0 flags:0x00000008
Call trace:
__switch_to+0xf4/0x1f4
__schedule+0x418/0xb80
schedule+0x5c/0x10c
rpm_resume+0xe0/0x52c
rpm_resume+0x178/0x52c
__pm_runtime_resume+0x58/0x98
clk_pm_runtime_get+0x30/0xb0
clk_disable_unused_subtree+0x58/0x208
clk_disable_unused_subtree+0x38/0x208
clk_disable_unused_subtree+0x38/0x208
clk_disable_unused_subtree+0x38/0x208
clk_disable_unused_subtree+0x38/0x208
clk_disable_unused+0x4c/0xe4
do_one_initcall+0xcc/0x2d8
do_initcall_level+0xa4/0x148
do_initcalls+0x5c/0x9c
do_basic_setup+0x24/0x30
kernel_init_freeable+0xec/0x164
kernel_init+0x28/0x120
ret_from_fork+0x10/0x20
INFO: task kworker/u16:0:9 blocked for more than 122 seconds.
Not tainted 5.15.149-21875-gf795ebc40eb8 #1
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/u16:0 state:D stack: 0 pid: 9 ppid: 2 flags:0x00000008
Workqueue: events_unbound deferred_probe_work_func
Call trace:
__switch_to+0xf4/0x1f4
__schedule+0x418/0xb80
schedule+0x5c/0x10c
schedule_preempt_disabled+0x2c/0x48
__mutex_lock+0x238/0x488
__mutex_lock_slowpath+0x1c/0x28
mutex_lock+0x50/0x74
clk_prepare_lock+0x7c/0x9c
clk_core_prepare_lock+0x20/0x44
clk_prepare+0x24/0x30
clk_bulk_prepare+0x40/0xb0
mdss_runtime_resume+0x54/0x1c8
pm_generic_runtime_resume+0x30/0x44
__genpd_runtime_resume+0x68/0x7c
genpd_runtime_resume+0x108/0x1f4
__rpm_callback+0x84/0x144
rpm_callback+0x30/0x88
rpm_resume+0x1f4/0x52c
rpm_resume+0x178/0x52c
__pm_runtime_resume+0x58/0x98
__device_attach+0xe0/0x170
device_initial_probe+0x1c/0x28
bus_probe_device+0x3c/0x9c
device_add+0x644/0x814
mipi_dsi_device_register_full+0xe4/0x170
devm_mipi_dsi_device_register_full+0x28/0x70
ti_sn_bridge_probe+0x1dc/0x2c0
auxiliary_bus_probe+0x4c/0x94
really_probe+0xcc/0x2c8
__driver_probe_device+0xa8/0x130
driver_probe_device+0x48/0x110
__device_attach_driver+0xa4/0xcc
bus_for_each_drv+0x8c/0xd8
__device_attach+0xf8/0x170
device_initial_probe+0x1c/0x28
bus_probe_device+0x3c/0x9c
deferred_probe_work_func+0x9c/0xd8
process_one_work+0x148/0x518
worker_thread+0x138/0x350
kthread+0x138/0x1e0
ret_from_fork+0x10/0x20
The first thread is walking the clk tree and calling
clk_pm_runtime_get() to power on devices required to read the clk
hardware via struct clk_ops::is_enabled(). This thread holds the clk
prepare_lock, and is trying to runtime PM resume a device, when it finds
that the device is in the process of resuming so the thread schedule()s
away waiting for the device to finish resuming before continuing. The
second thread is runtime PM resuming the same device, but the runtime
resume callback is calling clk_prepare(), trying to grab the
prepare_lock waiting on the first thread.
This is a classic ABBA deadlock. To properly fix the deadlock, we must
never runtime PM resume or suspend a device with the clk prepare_lock
held. Actually doing that is near impossible today because the global
prepare_lock would have to be dropped in the middle of the tree, the
device runtime PM resumed/suspended, and then the prepare_lock grabbed
again to ensure consistency of the clk tree topology. If anything
changes with the clk tree in the meantime, we've lost and will need to
start the operation all over again.
Luckily, most of the time we're simply incrementing or decrementing the
runtime PM count on an active device, so we don't have the chance to
schedule away with the prepare_lock held. Let's fix this immediate
problem that can be triggered more easily by simply booting on Qualcomm
sc7180.
Introduce a list of clk_core structures that have been registered, or
are in the process of being registered, that require runtime PM to
operate. Iterate this list and call clk_pm_runtime_get() on each of them
without holding the prepare_lock during clk_disable_unused(). This way
we can be certain that the runtime PM state of the devices will be
active and resumed so we can't schedule away while walking the clk tree
with the prepare_lock held. Similarly, call clk_pm_runtime_put() without
the prepare_lock held to properly drop the runtime PM reference. We
remove the calls to clk_pm_runtime_{get,put}() in this path because
they're superfluous now that we know the devices are runtime resumed.
Reported-by: Douglas Anderson <dianders@chromium.org>
Closes: https://lore.kernel.org/all/20220922084322.RFC.2.I375b6b9e0a0a5348962f004beb3dafee6a12dfbb@changeid/ [1]
Closes: https://issuetracker.google.com/328070191
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Fixes: 9a34b45397e5 ("clk: Add support for runtime PM")
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/20240325184204.745706-5-sboyd@kernel.org
Reviewed-by: Douglas Anderson <dianders@chromium.org>
2024-03-25 11:41:58 -07:00
|
|
|
|
2019-04-12 11:31:46 -07:00
|
|
|
|
2013-08-24 20:10:41 +02:00
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
|
|
|
|
|
2019-07-31 12:35:17 -07:00
|
|
|
|
|
|
|
|
|
2015-07-16 12:50:27 -07:00
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2019-07-31 12:35:17 -07:00
|
|
|
|
2019-04-12 11:31:47 -07:00
|
|
|
|
2015-12-28 19:23:00 +09:00
|
|
|
|
|
|
|
|
|
2015-04-30 13:54:13 -07:00
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
2018-12-11 08:32:04 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
|
|
|
|
|
2019-04-12 11:31:47 -07:00
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2012-03-29 14:30:40 -07:00
|
|
|
|
2021-11-08 20:34:38 -08:00
|
|
|
|
2018-12-11 08:32:04 -08:00
|
|
|
|
2015-12-28 19:22:57 +09:00
|
|
|
|
2012-03-29 14:30:40 -07:00
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
|
|
|
|
|
2018-12-11 08:32:04 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2012-03-29 14:30:40 -07:00
|
|
|
|
2019-04-12 11:31:47 -07:00
|
|
|
|
2015-12-28 19:23:00 +09:00
|
|
|
|
2017-12-19 09:33:29 +01:00
|
|
|
|
2012-04-25 22:58:56 -07:00
|
|
|
|
2024-03-25 11:41:57 -07:00
|
|
|
|
2012-03-29 14:30:40 -07:00
|
|
|
|
2025-02-26 15:54:07 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-29 14:30:40 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2019-04-12 11:31:44 -07:00
|
|
|
|
2019-12-30 10:29:35 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-04-12 11:31:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-05-07 11:46:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-04-12 11:31:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-12-30 10:29:35 -08:00
|
|
|
|
2019-04-12 11:31:44 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
2016-02-05 17:02:52 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-12-30 10:29:35 -08:00
|
|
|
|
|
|
|
|
|
2016-02-05 17:02:52 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-04-12 11:31:46 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-24 15:00:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-05-05 13:25:08 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-24 15:00:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-05-05 13:25:08 +02:00
|
|
|
|
2013-08-24 15:00:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-08-28 11:19:59 -07:00
|
|
|
|
2022-02-17 14:05:54 -08:00
|
|
|
|
2019-08-28 11:19:59 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-02-17 14:05:53 -08:00
|
|
|
|
2019-08-28 11:19:59 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-18 09:07:12 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-24 15:00:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-09-24 14:39:54 +02:00
|
|
|
|
2013-08-24 15:00:10 +02:00
|
|
|
|
2014-09-04 23:37:49 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2013-08-24 15:00:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-09-24 14:39:54 +02:00
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
|
|
|
|
|
2024-03-25 11:41:56 -07:00
|
|
|
|
|
|
|
|
|
2013-08-24 15:00:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2013-08-24 15:00:10 +02:00
|
|
|
|
|
|
|
|
|
2019-09-24 14:39:54 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
|
|
|
|
|
2014-04-18 16:29:43 -07:00
|
|
|
|
2013-08-24 15:00:10 +02:00
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
|
|
|
|
|
2017-12-01 22:51:52 +01:00
|
|
|
|
2013-08-24 15:00:10 +02:00
|
|
|
|
|
|
|
|
|
2019-08-28 11:19:59 -07:00
|
|
|
|
|
|
|
|
|
2025-08-14 11:53:16 +08:00
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2013-08-24 15:00:10 +02:00
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2013-08-24 15:00:10 +02:00
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2017-12-01 22:51:56 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-25 11:41:56 -07:00
|
|
|
|
2017-12-01 22:51:56 +01:00
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2019-10-22 12:41:53 +05:30
|
|
|
|
2013-08-24 15:00:10 +02:00
|
|
|
|
2012-04-18 09:07:12 +01:00
|
|
|
|
|
|
|
|
|
2016-02-05 17:02:52 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-10-21 18:21:45 +02:00
|
|
|
|
2012-09-24 13:38:04 -07:00
|
|
|
|
2014-04-18 16:29:42 -07:00
|
|
|
|
2012-09-24 13:38:04 -07:00
|
|
|
|
|
|
|
|
|
2020-10-21 18:21:45 +02:00
|
|
|
|
2016-02-05 17:02:52 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-09-24 13:38:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-11 10:49:40 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-09-24 13:38:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-04-18 16:29:42 -07:00
|
|
|
|
2012-09-24 13:38:04 -07:00
|
|
|
|
2020-10-21 18:21:45 +02:00
|
|
|
|
2014-04-18 16:29:42 -07:00
|
|
|
|
2012-09-24 13:38:04 -07:00
|
|
|
|
|
|
|
|
|
2014-04-18 16:29:42 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-09-24 13:38:04 -07:00
|
|
|
|
2014-04-18 16:29:42 -07:00
|
|
|
|
2012-09-24 13:38:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-05 17:02:52 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-01 19:56:08 +09:00
|
|
|
|
2016-02-05 17:02:52 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-10-21 18:21:45 +02:00
|
|
|
|
2016-02-05 17:02:52 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-10-21 18:21:46 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-24 20:10:41 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2013-08-24 20:10:41 +02:00
|
|
|
|
|
|
|
|
|
2014-12-02 08:54:19 +01:00
|
|
|
|
|
|
|
|
|
2014-01-07 13:03:43 +01:00
|
|
|
|
2013-08-24 20:10:41 +02:00
|
|
|
|
|
|
|
|
|
2013-08-24 15:00:10 +02:00
|
|
|
|
2015-01-23 12:03:31 +01:00
|
|
|
|
2017-12-01 22:51:59 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-07-10 10:40:36 +02:00
|
|
|
|
2022-08-16 13:25:07 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-02-06 15:13:01 +01:00
|
|
|
|
2013-08-24 15:00:10 +02:00
|
|
|
|
|
|
|
|
|
2024-03-25 11:41:56 -07:00
|
|
|
|
|
|
|
|
|
2014-12-02 08:54:19 +01:00
|
|
|
|
2018-12-11 08:32:04 -08:00
|
|
|
|
2013-08-24 20:10:41 +02:00
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-11-30 16:40:51 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-28 13:59:01 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-04-02 00:51:48 +02:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
2026-02-21 16:37:42 -08:00
|
|
|
|
2021-04-02 00:51:48 +02:00
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2021-04-02 00:51:48 +02:00
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2021-04-02 00:51:48 +02:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2021-04-02 00:51:48 +02:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
2015-01-23 12:03:30 +01:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
2013-03-28 13:59:01 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-04-02 00:51:49 +02:00
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-28 13:59:01 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
2021-04-02 00:51:49 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-28 13:59:01 -07:00
|
|
|
|
2012-03-15 23:11:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-09 14:50:06 -05:00
|
|
|
|
2020-10-21 18:38:46 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-06-19 11:22:53 +08:00
|
|
|
|
2020-10-21 18:38:46 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-09 14:50:06 -05:00
|
|
|
|
2019-12-18 09:56:21 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-09 14:50:06 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-06-22 02:09:35 -07:00
|
|
|
|
|
|
|
|
|
2012-04-09 14:50:06 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-05 17:38:26 -08:00
|
|
|
|
2012-04-09 14:50:06 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-05-23 17:11:57 -07:00
|
|
|
|
2013-01-04 12:30:52 +05:30
|
|
|
|
2020-10-21 19:36:07 -07:00
|
|
|
|
2013-01-04 12:30:52 +05:30
|
|
|
|
2012-04-09 14:50:06 -05:00
|
|
|
|
2013-08-23 17:03:43 +02:00
|
|
|
|
|
|
|
|
|
2012-04-09 14:50:06 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-05 17:38:26 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-08-22 21:36:27 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-10-16 17:12:32 +02:00
|
|
|
|
2012-08-22 21:36:27 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-05 17:38:26 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-09 14:50:06 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-11 10:49:40 -08:00
|
|
|
|
|
|
|
|
|
2012-04-09 14:50:06 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-06-18 17:29:32 +02:00
|
|
|
|
2012-04-09 14:50:06 -05:00
|
|
|
|
2021-04-26 09:56:18 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-02-21 16:37:42 -08:00
|
|
|
|
2012-04-09 14:50:06 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-23 17:03:43 +02:00
|
|
|
|
2012-04-09 14:50:06 -05:00
|
|
|
|
2013-08-23 17:03:43 +02:00
|
|
|
|
2017-07-18 16:42:52 -05:00
|
|
|
|
2012-04-09 14:50:06 -05:00
|
|
|
|
2019-12-03 09:08:05 +01:00
|
|
|
|
|
|
|
|
|
2014-06-18 17:29:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-02-05 14:26:44 -08:00
|
|
|
|
|
|
|
|
|
2014-06-18 17:29:32 +02:00
|
|
|
|
2012-04-09 14:50:06 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-05 17:38:26 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-04-26 09:56:18 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-02-21 16:37:42 -08:00
|
|
|
|
2016-02-05 17:38:26 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-07-18 16:42:52 -05:00
|
|
|
|
2016-02-05 17:38:26 -08:00
|
|
|
|
2019-12-03 09:08:05 +01:00
|
|
|
|
|
|
|
|
|
2016-02-05 17:38:26 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-02-10 13:44:35 +02:00
|
|
|
|
|
|
|
|
|
2016-02-05 17:38:26 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-09-01 16:16:40 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-04 13:34:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-03-10 08:47:01 -06:00
|
|
|
|
|
|
|
|
|
2018-12-04 13:34:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-04 13:33:48 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-04 13:34:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-04 13:33:48 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-09-01 16:16:40 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-04 13:34:53 +02:00
|
|
|
|
2017-09-01 16:16:40 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-09 14:50:06 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-04-26 09:56:18 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-23 17:03:43 +02:00
|
|
|
|
2012-04-09 14:50:06 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-02-05 14:26:44 -08:00
|
|
|
|
2012-04-09 14:50:06 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-23 17:03:43 +02:00
|
|
|
|
2012-04-09 14:50:06 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-08-26 14:20:42 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-03-08 10:35:01 -08:00
|
|
|
|
2018-12-19 15:09:14 -08:00
|
|
|
|
|
|
|
|
|
2018-12-19 10:59:55 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-07-31 13:12:42 -06:00
|
|
|
|
2018-12-19 10:59:55 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-05 17:38:26 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-08-25 13:35:36 -07:00
|
|
|
|
|
|
|
|
|
2016-02-05 17:38:26 -08:00
|
|
|
|
2016-08-25 13:35:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-05 17:38:26 -08:00
|
|
|
|
|
|
|
|
|
2018-12-19 15:09:14 -08:00
|
|
|
|
|
|
|
|
|
2012-04-09 14:50:06 -05:00
|
|
|
|
|
|
|
|
|
2018-12-11 08:32:04 -08:00
|
|
|
|
2012-04-09 14:50:06 -05:00
|
|
|
|
2015-02-05 15:39:11 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-02-22 23:37:33 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-02-05 15:39:11 -08:00
|
|
|
|
2012-04-09 14:50:06 -05:00
|
|
|
|
2016-08-15 14:32:23 -07:00
|
|
|
|
2016-02-05 17:38:26 -08:00
|
|
|
|
2018-12-11 08:32:04 -08:00
|
|
|
|
|
|
|
|
|
2015-02-06 11:42:43 -08:00
|
|
|
|
2012-04-09 14:50:06 -05:00
|
|
|
|
2015-02-05 15:39:11 -08:00
|
|
|
|
2013-08-23 17:03:43 +02:00
|
|
|
|
2018-12-19 10:59:55 -08:00
|
|
|
|
2013-08-23 17:03:43 +02:00
|
|
|
|
|
|
|
|
|
2015-02-05 15:39:11 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-23 17:03:43 +02:00
|
|
|
|
|
|
|
|
|
2018-12-19 10:59:55 -08:00
|
|
|
|
|
|
|
|
|
2018-12-11 08:34:16 -08:00
|
|
|
|
2012-04-09 14:50:06 -05:00
|
|
|
|
2016-02-12 12:50:16 -06:00
|
|
|
|
2012-04-09 14:50:06 -05:00
|
|
|
|
2018-12-19 15:09:14 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-03-06 16:18:28 +09:00
|
|
|
|
2018-12-19 15:09:14 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-19 15:52:32 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-02-12 10:43:17 +01:00
|
|
|
|
2013-10-07 23:12:13 -07:00
|
|
|
|
2016-02-19 15:52:32 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-10-07 23:12:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-02-12 10:43:17 +01:00
|
|
|
|
2012-04-09 14:50:06 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
of: remove internal arguments from of_property_for_each_u32()
The of_property_for_each_u32() macro needs five parameters, two of which
are primarily meant as internal variables for the macro itself (in the
for() clause). Yet these two parameters are used by a few drivers, and this
can be considered misuse or at least bad practice.
Now that the kernel uses C11 to build, these two parameters can be avoided
by declaring them internally, thus changing this pattern:
struct property *prop;
const __be32 *p;
u32 val;
of_property_for_each_u32(np, "xyz", prop, p, val) { ... }
to this:
u32 val;
of_property_for_each_u32(np, "xyz", val) { ... }
However two variables cannot be declared in the for clause even with C11,
so declare one struct that contain the two variables we actually need. As
the variables inside this struct are not meant to be used by users of this
macro, give the struct instance the noticeable name "_it" so it is visible
during code reviews, helping to avoid new code to use it directly.
Most usages are trivially converted as they do not use those two
parameters, as expected. The non-trivial cases are:
- drivers/clk/clk.c, of_clk_get_parent_name(): easily doable anyway
- drivers/clk/clk-si5351.c, si5351_dt_parse(): this is more complex as the
checks had to be replicated in a different way, making code more verbose
and somewhat uglier, but I refrained from a full rework to keep as much
of the original code untouched having no hardware to test my changes
All the changes have been build tested. The few for which I have the
hardware have been runtime-tested too.
Reviewed-by: Andre Przywara <andre.przywara@arm.com> # drivers/clk/sunxi/clk-simple-gates.c, drivers/clk/sunxi/clk-sun8i-bus-gates.c
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> # drivers/gpio/gpio-brcmstb.c
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> # drivers/irqchip/irq-atmel-aic-common.c
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> # drivers/iio/adc/ti_am335x_adc.c
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> # drivers/pwm/pwm-samsung.c
Acked-by: Richard Leitner <richard.leitner@linux.dev> # drivers/usb/misc/usb251xb.c
Acked-by: Mark Brown <broonie@kernel.org> # sound/soc/codecs/arizona.c
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com> # sound/soc/codecs/arizona.c
Acked-by: Michael Ellerman <mpe@ellerman.id.au> # arch/powerpc/sysdev/xive/spapr.c
Acked-by: Stephen Boyd <sboyd@kernel.org> # clk
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Acked-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20240724-of_property_for_each_u32-v3-1-bea82ce429e2@bootlin.com
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2024-07-24 18:33:06 +02:00
|
|
|
|
2014-02-13 18:02:49 +00:00
|
|
|
|
2012-04-09 14:50:06 -05:00
|
|
|
|
2014-02-13 18:02:49 +00:00
|
|
|
|
2015-10-14 14:03:07 -07:00
|
|
|
|
2012-04-09 14:50:06 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-13 18:02:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
of: remove internal arguments from of_property_for_each_u32()
The of_property_for_each_u32() macro needs five parameters, two of which
are primarily meant as internal variables for the macro itself (in the
for() clause). Yet these two parameters are used by a few drivers, and this
can be considered misuse or at least bad practice.
Now that the kernel uses C11 to build, these two parameters can be avoided
by declaring them internally, thus changing this pattern:
struct property *prop;
const __be32 *p;
u32 val;
of_property_for_each_u32(np, "xyz", prop, p, val) { ... }
to this:
u32 val;
of_property_for_each_u32(np, "xyz", val) { ... }
However two variables cannot be declared in the for clause even with C11,
so declare one struct that contain the two variables we actually need. As
the variables inside this struct are not meant to be used by users of this
macro, give the struct instance the noticeable name "_it" so it is visible
during code reviews, helping to avoid new code to use it directly.
Most usages are trivially converted as they do not use those two
parameters, as expected. The non-trivial cases are:
- drivers/clk/clk.c, of_clk_get_parent_name(): easily doable anyway
- drivers/clk/clk-si5351.c, si5351_dt_parse(): this is more complex as the
checks had to be replicated in a different way, making code more verbose
and somewhat uglier, but I refrained from a full rework to keep as much
of the original code untouched having no hardware to test my changes
All the changes have been build tested. The few for which I have the
hardware have been runtime-tested too.
Reviewed-by: Andre Przywara <andre.przywara@arm.com> # drivers/clk/sunxi/clk-simple-gates.c, drivers/clk/sunxi/clk-sun8i-bus-gates.c
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> # drivers/gpio/gpio-brcmstb.c
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> # drivers/irqchip/irq-atmel-aic-common.c
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> # drivers/iio/adc/ti_am335x_adc.c
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> # drivers/pwm/pwm-samsung.c
Acked-by: Richard Leitner <richard.leitner@linux.dev> # drivers/usb/misc/usb251xb.c
Acked-by: Mark Brown <broonie@kernel.org> # sound/soc/codecs/arizona.c
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com> # sound/soc/codecs/arizona.c
Acked-by: Michael Ellerman <mpe@ellerman.id.au> # arch/powerpc/sysdev/xive/spapr.c
Acked-by: Stephen Boyd <sboyd@kernel.org> # clk
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Acked-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20240724-of_property_for_each_u32-v3-1-bea82ce429e2@bootlin.com
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2024-07-24 18:33:06 +02:00
|
|
|
|
2014-02-13 18:02:49 +00:00
|
|
|
|
|
|
|
|
|
of: remove internal arguments from of_property_for_each_u32()
The of_property_for_each_u32() macro needs five parameters, two of which
are primarily meant as internal variables for the macro itself (in the
for() clause). Yet these two parameters are used by a few drivers, and this
can be considered misuse or at least bad practice.
Now that the kernel uses C11 to build, these two parameters can be avoided
by declaring them internally, thus changing this pattern:
struct property *prop;
const __be32 *p;
u32 val;
of_property_for_each_u32(np, "xyz", prop, p, val) { ... }
to this:
u32 val;
of_property_for_each_u32(np, "xyz", val) { ... }
However two variables cannot be declared in the for clause even with C11,
so declare one struct that contain the two variables we actually need. As
the variables inside this struct are not meant to be used by users of this
macro, give the struct instance the noticeable name "_it" so it is visible
during code reviews, helping to avoid new code to use it directly.
Most usages are trivially converted as they do not use those two
parameters, as expected. The non-trivial cases are:
- drivers/clk/clk.c, of_clk_get_parent_name(): easily doable anyway
- drivers/clk/clk-si5351.c, si5351_dt_parse(): this is more complex as the
checks had to be replicated in a different way, making code more verbose
and somewhat uglier, but I refrained from a full rework to keep as much
of the original code untouched having no hardware to test my changes
All the changes have been build tested. The few for which I have the
hardware have been runtime-tested too.
Reviewed-by: Andre Przywara <andre.przywara@arm.com> # drivers/clk/sunxi/clk-simple-gates.c, drivers/clk/sunxi/clk-sun8i-bus-gates.c
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> # drivers/gpio/gpio-brcmstb.c
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> # drivers/irqchip/irq-atmel-aic-common.c
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> # drivers/iio/adc/ti_am335x_adc.c
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> # drivers/pwm/pwm-samsung.c
Acked-by: Richard Leitner <richard.leitner@linux.dev> # drivers/usb/misc/usb251xb.c
Acked-by: Mark Brown <broonie@kernel.org> # sound/soc/codecs/arizona.c
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com> # sound/soc/codecs/arizona.c
Acked-by: Michael Ellerman <mpe@ellerman.id.au> # arch/powerpc/sysdev/xive/spapr.c
Acked-by: Stephen Boyd <sboyd@kernel.org> # clk
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Acked-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20240724-of_property_for_each_u32-v3-1-bea82ce429e2@bootlin.com
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2024-07-24 18:33:06 +02:00
|
|
|
|
2014-02-13 18:02:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clk: let of_clk_get_parent_name() fail for invalid clock-indices
Currently, of_clk_get_parent_name() returns a wrong parent clock name
when "clock-indices" property exists and the target index is not
found in the property. In this case, NULL should be returned.
For example,
oscillator {
compatible = "myclocktype";
#clock-cells = <1>;
clock-indices = <1>, <3>;
clock-output-names = "clka", "clkb";
};
consumer {
compatible = "myclockconsumer";
clocks = <&oscillator 0>, <&oscillator 1>;
};
Currently, of_clk_get_parent_name(consumer_np, 0) returns "clka"
(and of_clk_get_parent_name(consumer_np, 1) also returns "clka",
this is correct). Because the "clock-indices" in the clock parent
does not contain <0>, of_clk_get_parent_name(consumer_np, 0) should
return NULL.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-12-03 11:20:35 +09:00
|
|
|
|
2024-12-10 22:09:12 +09:00
|
|
|
|
|
|
|
|
|
clk: let of_clk_get_parent_name() fail for invalid clock-indices
Currently, of_clk_get_parent_name() returns a wrong parent clock name
when "clock-indices" property exists and the target index is not
found in the property. In this case, NULL should be returned.
For example,
oscillator {
compatible = "myclocktype";
#clock-cells = <1>;
clock-indices = <1>, <3>;
clock-output-names = "clka", "clkb";
};
consumer {
compatible = "myclockconsumer";
clocks = <&oscillator 0>, <&oscillator 1>;
};
Currently, of_clk_get_parent_name(consumer_np, 0) returns "clka"
(and of_clk_get_parent_name(consumer_np, 1) also returns "clka",
this is correct). Because the "clock-indices" in the clock parent
does not contain <0>, of_clk_get_parent_name(consumer_np, 0) should
return NULL.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-12-03 11:20:35 +09:00
|
|
|
|
2024-12-10 22:09:12 +09:00
|
|
|
|
2014-02-13 18:02:49 +00:00
|
|
|
|
2012-04-09 14:50:06 -05:00
|
|
|
|
2014-02-13 18:02:49 +00:00
|
|
|
|
2015-10-14 14:03:07 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-09 14:50:06 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-06-05 11:26:13 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-24 19:10:13 +01:00
|
|
|
|
2018-04-10 15:06:05 +02:00
|
|
|
|
2014-02-24 19:10:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-11 13:19:11 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-01-03 12:06:14 +01:00
|
|
|
|
2016-02-11 13:19:11 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-12-06 14:34:14 +01:00
|
|
|
|
|
|
|
|
|
2016-02-11 13:19:11 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
of: remove internal arguments from of_property_for_each_u32()
The of_property_for_each_u32() macro needs five parameters, two of which
are primarily meant as internal variables for the macro itself (in the
for() clause). Yet these two parameters are used by a few drivers, and this
can be considered misuse or at least bad practice.
Now that the kernel uses C11 to build, these two parameters can be avoided
by declaring them internally, thus changing this pattern:
struct property *prop;
const __be32 *p;
u32 val;
of_property_for_each_u32(np, "xyz", prop, p, val) { ... }
to this:
u32 val;
of_property_for_each_u32(np, "xyz", val) { ... }
However two variables cannot be declared in the for clause even with C11,
so declare one struct that contain the two variables we actually need. As
the variables inside this struct are not meant to be used by users of this
macro, give the struct instance the noticeable name "_it" so it is visible
during code reviews, helping to avoid new code to use it directly.
Most usages are trivially converted as they do not use those two
parameters, as expected. The non-trivial cases are:
- drivers/clk/clk.c, of_clk_get_parent_name(): easily doable anyway
- drivers/clk/clk-si5351.c, si5351_dt_parse(): this is more complex as the
checks had to be replicated in a different way, making code more verbose
and somewhat uglier, but I refrained from a full rework to keep as much
of the original code untouched having no hardware to test my changes
All the changes have been build tested. The few for which I have the
hardware have been runtime-tested too.
Reviewed-by: Andre Przywara <andre.przywara@arm.com> # drivers/clk/sunxi/clk-simple-gates.c, drivers/clk/sunxi/clk-sun8i-bus-gates.c
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> # drivers/gpio/gpio-brcmstb.c
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> # drivers/irqchip/irq-atmel-aic-common.c
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> # drivers/iio/adc/ti_am335x_adc.c
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> # drivers/pwm/pwm-samsung.c
Acked-by: Richard Leitner <richard.leitner@linux.dev> # drivers/usb/misc/usb251xb.c
Acked-by: Mark Brown <broonie@kernel.org> # sound/soc/codecs/arizona.c
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com> # sound/soc/codecs/arizona.c
Acked-by: Michael Ellerman <mpe@ellerman.id.au> # arch/powerpc/sysdev/xive/spapr.c
Acked-by: Stephen Boyd <sboyd@kernel.org> # clk
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Acked-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20240724-of_property_for_each_u32-v3-1-bea82ce429e2@bootlin.com
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2024-07-24 18:33:06 +02:00
|
|
|
|
2016-02-11 13:19:11 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-09 14:50:06 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-24 19:10:13 +01:00
|
|
|
|
2014-03-27 12:08:36 +01:00
|
|
|
|
2014-02-24 19:10:13 +01:00
|
|
|
|
2012-04-09 14:50:06 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-22 11:31:31 -05:00
|
|
|
|
2012-04-09 14:50:06 -05:00
|
|
|
|
2014-02-24 19:10:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-07-06 16:50:00 -07:00
|
|
|
|
2012-04-09 14:50:06 -05:00
|
|
|
|
2013-01-04 12:30:52 +05:30
|
|
|
|
2013-10-22 11:39:36 +03:00
|
|
|
|
2013-01-04 12:30:52 +05:30
|
|
|
|
2014-02-24 19:10:13 +01:00
|
|
|
|
2013-08-22 11:31:31 -05:00
|
|
|
|
2015-07-06 16:48:19 -07:00
|
|
|
|
|
|
|
|
|
2016-02-26 16:54:31 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-02-21 16:37:42 -08:00
|
|
|
|
2015-07-06 16:48:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-10-21 22:41:36 +02:00
|
|
|
|
2015-07-06 16:48:19 -07:00
|
|
|
|
|
|
|
|
|
2015-10-21 22:41:36 +02:00
|
|
|
|
2015-07-06 16:48:19 -07:00
|
|
|
|
|
|
|
|
|
2014-02-24 19:10:13 +01:00
|
|
|
|
|
|
|
|
|
2015-10-21 22:41:36 +02:00
|
|
|
|
2014-03-27 11:43:32 +01:00
|
|
|
|
2014-02-24 19:10:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-06-18 17:29:32 +02:00
|
|
|
|
2016-07-05 18:23:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-24 19:10:13 +01:00
|
|
|
|
2014-06-18 17:29:32 +02:00
|
|
|
|
|
|
|
|
|
2014-02-24 19:10:13 +01:00
|
|
|
|
2015-10-21 22:41:36 +02:00
|
|
|
|
2014-02-24 19:10:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-03-27 12:08:36 +01:00
|
|
|
|
2014-02-24 19:10:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-09 14:50:06 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|