<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/include/linux/clk-private.h, branch v3.18.13</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>Merge tag 'sunxi-clocks-for-3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into clk-next</title>
<updated>2014-09-27T19:52:33+00:00</updated>
<author>
<name>Mike Turquette</name>
<email>mturquette@linaro.org</email>
</author>
<published>2014-09-27T19:52:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4dc7ed32f398fa76b9e1d243a852420b1dad0150'/>
<id>4dc7ed32f398fa76b9e1d243a852420b1dad0150</id>
<content type='text'>
Allwinner Clocks Additions for 3.18

The most important part of this serie is the addition of the phase API to
handle the MMC clocks in the Allwinner SoCs.

Apart from that, the A23 gained a new mbus driver, and there's a fix for a
incorrect divider table on the APB0 clock.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Allwinner Clocks Additions for 3.18

The most important part of this serie is the addition of the phase API to
handle the MMC clocks in the Allwinner SoCs.

Apart from that, the A23 gained a new mbus driver, and there's a fix for a
incorrect divider table on the APB0 clock.
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: introduce clk_set_phase function &amp; callback</title>
<updated>2014-09-27T06:57:38+00:00</updated>
<author>
<name>Mike Turquette</name>
<email>mturquette@linaro.org</email>
</author>
<published>2014-02-19T05:21:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e59c5371fb9d8268d1c043172e88cecab9dc934f'/>
<id>e59c5371fb9d8268d1c043172e88cecab9dc934f</id>
<content type='text'>
A common operation for a clock signal generator is to shift the phase of
that signal. This patch introduces a new function to the clk.h API to
dynamically adjust the phase of a clock signal. Additionally this patch
introduces support for the new function in the common clock framework
via the .set_phase call back in struct clk_ops.

Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
Signed-off-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Reviewed-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Acked-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A common operation for a clock signal generator is to shift the phase of
that signal. This patch introduces a new function to the clk.h API to
dynamically adjust the phase of a clock signal. Additionally this patch
introduces support for the new function in the common clock framework
via the .set_phase call back in struct clk_ops.

Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
Signed-off-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Reviewed-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Acked-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: Don't hold prepare_lock across debugfs creation</title>
<updated>2014-09-10T21:36:20+00:00</updated>
<author>
<name>Stephen Boyd</name>
<email>sboyd@codeaurora.org</email>
</author>
<published>2014-09-05T06:37:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6314b6796e3c070d4c8086b08dfd453a0aeac4cf'/>
<id>6314b6796e3c070d4c8086b08dfd453a0aeac4cf</id>
<content type='text'>
Rob Clark reports a lockdep splat that involves the prepare_lock
chained with the mmap semaphore.

======================================================
[ INFO: possible circular locking dependency detected ]
3.17.0-rc1-00050-g07a489b #802 Tainted: G        W
-------------------------------------------------------
Xorg.bin/5413 is trying to acquire lock:
 (prepare_lock){+.+.+.}, at: [&lt;c0781280&gt;] clk_prepare_lock+0x88/0xfc

but task is already holding lock:
 (qcom_iommu_lock){+.+...}, at: [&lt;c079f664&gt;] qcom_iommu_unmap+0x1c/0x1f0

which lock already depends on the new lock.

the existing dependency chain (in reverse order) is:

-&gt; #4 (qcom_iommu_lock){+.+...}:
       [&lt;c079f860&gt;] qcom_iommu_map+0x28/0x450
       [&lt;c079eb50&gt;] iommu_map+0xc8/0x12c
       [&lt;c056c1fc&gt;] msm_iommu_map+0xb4/0x130
       [&lt;c05697bc&gt;] msm_gem_get_iova_locked+0x9c/0xe8
       [&lt;c0569854&gt;] msm_gem_get_iova+0x4c/0x64
       [&lt;c0562208&gt;] mdp4_kms_init+0x4c4/0x6c0
       [&lt;c056881c&gt;] msm_load+0x2ac/0x34c
       [&lt;c0545724&gt;] drm_dev_register+0xac/0x108
       [&lt;c0547510&gt;] drm_platform_init+0x50/0xf0
       [&lt;c0578a60&gt;] try_to_bring_up_master.part.3+0xc8/0x108
       [&lt;c0578b48&gt;] component_master_add_with_match+0xa8/0x104
       [&lt;c0568294&gt;] msm_pdev_probe+0x64/0x70
       [&lt;c057e704&gt;] platform_drv_probe+0x2c/0x60
       [&lt;c057cff8&gt;] driver_probe_device+0x108/0x234
       [&lt;c057b65c&gt;] bus_for_each_drv+0x64/0x98
       [&lt;c057cec0&gt;] device_attach+0x78/0x8c
       [&lt;c057c590&gt;] bus_probe_device+0x88/0xac
       [&lt;c057c9b8&gt;] deferred_probe_work_func+0x68/0x9c
       [&lt;c0259db4&gt;] process_one_work+0x1a0/0x40c
       [&lt;c025a710&gt;] worker_thread+0x44/0x4d8
       [&lt;c025ec54&gt;] kthread+0xd8/0xec
       [&lt;c020e9a8&gt;] ret_from_fork+0x14/0x2c

-&gt; #3 (&amp;dev-&gt;struct_mutex){+.+.+.}:
       [&lt;c0541188&gt;] drm_gem_mmap+0x38/0xd0
       [&lt;c05695b8&gt;] msm_gem_mmap+0xc/0x5c
       [&lt;c02f0b6c&gt;] mmap_region+0x35c/0x6c8
       [&lt;c02f11ec&gt;] do_mmap_pgoff+0x314/0x398
       [&lt;c02de1e0&gt;] vm_mmap_pgoff+0x84/0xb4
       [&lt;c02ef83c&gt;] SyS_mmap_pgoff+0x94/0xbc
       [&lt;c020e8e0&gt;] ret_fast_syscall+0x0/0x48

-&gt; #2 (&amp;mm-&gt;mmap_sem){++++++}:
       [&lt;c0321138&gt;] filldir64+0x68/0x180
       [&lt;c0333fe0&gt;] dcache_readdir+0x188/0x22c
       [&lt;c0320ed0&gt;] iterate_dir+0x9c/0x11c
       [&lt;c03213b0&gt;] SyS_getdents64+0x78/0xe8
       [&lt;c020e8e0&gt;] ret_fast_syscall+0x0/0x48

-&gt; #1 (&amp;sb-&gt;s_type-&gt;i_mutex_key#3){+.+.+.}:
       [&lt;c03fc544&gt;] __create_file+0x58/0x1dc
       [&lt;c03fc70c&gt;] debugfs_create_dir+0x1c/0x24
       [&lt;c0781c7c&gt;] clk_debug_create_subtree+0x20/0x170
       [&lt;c0be2af8&gt;] clk_debug_init+0xec/0x14c
       [&lt;c0208c70&gt;] do_one_initcall+0x8c/0x1c8
       [&lt;c0b9cce4&gt;] kernel_init_freeable+0x13c/0x1dc
       [&lt;c0877bc4&gt;] kernel_init+0x8/0xe8
       [&lt;c020e9a8&gt;] ret_from_fork+0x14/0x2c

-&gt; #0 (prepare_lock){+.+.+.}:
       [&lt;c087c408&gt;] mutex_lock_nested+0x70/0x3e8
       [&lt;c0781280&gt;] clk_prepare_lock+0x88/0xfc
       [&lt;c0782c50&gt;] clk_prepare+0xc/0x24
       [&lt;c079f474&gt;] __enable_clocks.isra.4+0x18/0xa4
       [&lt;c079f614&gt;] __flush_iotlb_va+0xe0/0x114
       [&lt;c079f6f4&gt;] qcom_iommu_unmap+0xac/0x1f0
       [&lt;c079ea3c&gt;] iommu_unmap+0x9c/0xe8
       [&lt;c056c2fc&gt;] msm_iommu_unmap+0x64/0x84
       [&lt;c0569da4&gt;] msm_gem_free_object+0x11c/0x338
       [&lt;c05413ec&gt;] drm_gem_object_handle_unreference_unlocked+0xfc/0x130
       [&lt;c0541604&gt;] drm_gem_object_release_handle+0x50/0x68
       [&lt;c0447a98&gt;] idr_for_each+0xa8/0xdc
       [&lt;c0541c10&gt;] drm_gem_release+0x1c/0x28
       [&lt;c0540b3c&gt;] drm_release+0x370/0x428
       [&lt;c031105c&gt;] __fput+0x98/0x1e8
       [&lt;c025d73c&gt;] task_work_run+0xb0/0xfc
       [&lt;c02477ec&gt;] do_exit+0x2ec/0x948
       [&lt;c0247ec0&gt;] do_group_exit+0x4c/0xb8
       [&lt;c025180c&gt;] get_signal+0x28c/0x6ac
       [&lt;c0211204&gt;] do_signal+0xc4/0x3e4
       [&lt;c02116cc&gt;] do_work_pending+0xb4/0xc4
       [&lt;c020e938&gt;] work_pending+0xc/0x20

other info that might help us debug this:

Chain exists of:
  prepare_lock --&gt; &amp;dev-&gt;struct_mutex --&gt; qcom_iommu_lock

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(qcom_iommu_lock);
                               lock(&amp;dev-&gt;struct_mutex);
                               lock(qcom_iommu_lock);
  lock(prepare_lock);

 *** DEADLOCK ***

3 locks held by Xorg.bin/5413:
 #0:  (drm_global_mutex){+.+.+.}, at: [&lt;c0540800&gt;] drm_release+0x34/0x428
 #1:  (&amp;dev-&gt;struct_mutex){+.+.+.}, at: [&lt;c05413bc&gt;] drm_gem_object_handle_unreference_unlocked+0xcc/0x130
 #2:  (qcom_iommu_lock){+.+...}, at: [&lt;c079f664&gt;] qcom_iommu_unmap+0x1c/0x1f0

stack backtrace:
CPU: 1 PID: 5413 Comm: Xorg.bin Tainted: G        W      3.17.0-rc1-00050-g07a489b #802
[&lt;c0216290&gt;] (unwind_backtrace) from [&lt;c0211d8c&gt;] (show_stack+0x10/0x14)
[&lt;c0211d8c&gt;] (show_stack) from [&lt;c087a078&gt;] (dump_stack+0x98/0xb8)
[&lt;c087a078&gt;] (dump_stack) from [&lt;c027f024&gt;] (print_circular_bug+0x218/0x340)
[&lt;c027f024&gt;] (print_circular_bug) from [&lt;c0283e08&gt;] (__lock_acquire+0x1d24/0x20b8)
[&lt;c0283e08&gt;] (__lock_acquire) from [&lt;c0284774&gt;] (lock_acquire+0x9c/0xbc)
[&lt;c0284774&gt;] (lock_acquire) from [&lt;c087c408&gt;] (mutex_lock_nested+0x70/0x3e8)
[&lt;c087c408&gt;] (mutex_lock_nested) from [&lt;c0781280&gt;] (clk_prepare_lock+0x88/0xfc)
[&lt;c0781280&gt;] (clk_prepare_lock) from [&lt;c0782c50&gt;] (clk_prepare+0xc/0x24)
[&lt;c0782c50&gt;] (clk_prepare) from [&lt;c079f474&gt;] (__enable_clocks.isra.4+0x18/0xa4)
[&lt;c079f474&gt;] (__enable_clocks.isra.4) from [&lt;c079f614&gt;] (__flush_iotlb_va+0xe0/0x114)
[&lt;c079f614&gt;] (__flush_iotlb_va) from [&lt;c079f6f4&gt;] (qcom_iommu_unmap+0xac/0x1f0)
[&lt;c079f6f4&gt;] (qcom_iommu_unmap) from [&lt;c079ea3c&gt;] (iommu_unmap+0x9c/0xe8)
[&lt;c079ea3c&gt;] (iommu_unmap) from [&lt;c056c2fc&gt;] (msm_iommu_unmap+0x64/0x84)
[&lt;c056c2fc&gt;] (msm_iommu_unmap) from [&lt;c0569da4&gt;] (msm_gem_free_object+0x11c/0x338)
[&lt;c0569da4&gt;] (msm_gem_free_object) from [&lt;c05413ec&gt;] (drm_gem_object_handle_unreference_unlocked+0xfc/0x130)
[&lt;c05413ec&gt;] (drm_gem_object_handle_unreference_unlocked) from [&lt;c0541604&gt;] (drm_gem_object_release_handle+0x50/0x68)
[&lt;c0541604&gt;] (drm_gem_object_release_handle) from [&lt;c0447a98&gt;] (idr_for_each+0xa8/0xdc)
[&lt;c0447a98&gt;] (idr_for_each) from [&lt;c0541c10&gt;] (drm_gem_release+0x1c/0x28)
[&lt;c0541c10&gt;] (drm_gem_release) from [&lt;c0540b3c&gt;] (drm_release+0x370/0x428)
[&lt;c0540b3c&gt;] (drm_release) from [&lt;c031105c&gt;] (__fput+0x98/0x1e8)
[&lt;c031105c&gt;] (__fput) from [&lt;c025d73c&gt;] (task_work_run+0xb0/0xfc)
[&lt;c025d73c&gt;] (task_work_run) from [&lt;c02477ec&gt;] (do_exit+0x2ec/0x948)
[&lt;c02477ec&gt;] (do_exit) from [&lt;c0247ec0&gt;] (do_group_exit+0x4c/0xb8)
[&lt;c0247ec0&gt;] (do_group_exit) from [&lt;c025180c&gt;] (get_signal+0x28c/0x6ac)
[&lt;c025180c&gt;] (get_signal) from [&lt;c0211204&gt;] (do_signal+0xc4/0x3e4)
[&lt;c0211204&gt;] (do_signal) from [&lt;c02116cc&gt;] (do_work_pending+0xb4/0xc4)
[&lt;c02116cc&gt;] (do_work_pending) from [&lt;c020e938&gt;] (work_pending+0xc/0x20)

We can break this chain if we don't hold the prepare_lock while
creating debugfs directories. We only hold the prepare_lock right
now because we're traversing the clock tree recursively and we
don't want the hierarchy to change during the traversal.
Replacing this traversal with a simple linked list walk allows us
to only grab a list lock instead of the prepare_lock, thus
breaking the lock chain.

Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rob Clark reports a lockdep splat that involves the prepare_lock
chained with the mmap semaphore.

======================================================
[ INFO: possible circular locking dependency detected ]
3.17.0-rc1-00050-g07a489b #802 Tainted: G        W
-------------------------------------------------------
Xorg.bin/5413 is trying to acquire lock:
 (prepare_lock){+.+.+.}, at: [&lt;c0781280&gt;] clk_prepare_lock+0x88/0xfc

but task is already holding lock:
 (qcom_iommu_lock){+.+...}, at: [&lt;c079f664&gt;] qcom_iommu_unmap+0x1c/0x1f0

which lock already depends on the new lock.

the existing dependency chain (in reverse order) is:

-&gt; #4 (qcom_iommu_lock){+.+...}:
       [&lt;c079f860&gt;] qcom_iommu_map+0x28/0x450
       [&lt;c079eb50&gt;] iommu_map+0xc8/0x12c
       [&lt;c056c1fc&gt;] msm_iommu_map+0xb4/0x130
       [&lt;c05697bc&gt;] msm_gem_get_iova_locked+0x9c/0xe8
       [&lt;c0569854&gt;] msm_gem_get_iova+0x4c/0x64
       [&lt;c0562208&gt;] mdp4_kms_init+0x4c4/0x6c0
       [&lt;c056881c&gt;] msm_load+0x2ac/0x34c
       [&lt;c0545724&gt;] drm_dev_register+0xac/0x108
       [&lt;c0547510&gt;] drm_platform_init+0x50/0xf0
       [&lt;c0578a60&gt;] try_to_bring_up_master.part.3+0xc8/0x108
       [&lt;c0578b48&gt;] component_master_add_with_match+0xa8/0x104
       [&lt;c0568294&gt;] msm_pdev_probe+0x64/0x70
       [&lt;c057e704&gt;] platform_drv_probe+0x2c/0x60
       [&lt;c057cff8&gt;] driver_probe_device+0x108/0x234
       [&lt;c057b65c&gt;] bus_for_each_drv+0x64/0x98
       [&lt;c057cec0&gt;] device_attach+0x78/0x8c
       [&lt;c057c590&gt;] bus_probe_device+0x88/0xac
       [&lt;c057c9b8&gt;] deferred_probe_work_func+0x68/0x9c
       [&lt;c0259db4&gt;] process_one_work+0x1a0/0x40c
       [&lt;c025a710&gt;] worker_thread+0x44/0x4d8
       [&lt;c025ec54&gt;] kthread+0xd8/0xec
       [&lt;c020e9a8&gt;] ret_from_fork+0x14/0x2c

-&gt; #3 (&amp;dev-&gt;struct_mutex){+.+.+.}:
       [&lt;c0541188&gt;] drm_gem_mmap+0x38/0xd0
       [&lt;c05695b8&gt;] msm_gem_mmap+0xc/0x5c
       [&lt;c02f0b6c&gt;] mmap_region+0x35c/0x6c8
       [&lt;c02f11ec&gt;] do_mmap_pgoff+0x314/0x398
       [&lt;c02de1e0&gt;] vm_mmap_pgoff+0x84/0xb4
       [&lt;c02ef83c&gt;] SyS_mmap_pgoff+0x94/0xbc
       [&lt;c020e8e0&gt;] ret_fast_syscall+0x0/0x48

-&gt; #2 (&amp;mm-&gt;mmap_sem){++++++}:
       [&lt;c0321138&gt;] filldir64+0x68/0x180
       [&lt;c0333fe0&gt;] dcache_readdir+0x188/0x22c
       [&lt;c0320ed0&gt;] iterate_dir+0x9c/0x11c
       [&lt;c03213b0&gt;] SyS_getdents64+0x78/0xe8
       [&lt;c020e8e0&gt;] ret_fast_syscall+0x0/0x48

-&gt; #1 (&amp;sb-&gt;s_type-&gt;i_mutex_key#3){+.+.+.}:
       [&lt;c03fc544&gt;] __create_file+0x58/0x1dc
       [&lt;c03fc70c&gt;] debugfs_create_dir+0x1c/0x24
       [&lt;c0781c7c&gt;] clk_debug_create_subtree+0x20/0x170
       [&lt;c0be2af8&gt;] clk_debug_init+0xec/0x14c
       [&lt;c0208c70&gt;] do_one_initcall+0x8c/0x1c8
       [&lt;c0b9cce4&gt;] kernel_init_freeable+0x13c/0x1dc
       [&lt;c0877bc4&gt;] kernel_init+0x8/0xe8
       [&lt;c020e9a8&gt;] ret_from_fork+0x14/0x2c

-&gt; #0 (prepare_lock){+.+.+.}:
       [&lt;c087c408&gt;] mutex_lock_nested+0x70/0x3e8
       [&lt;c0781280&gt;] clk_prepare_lock+0x88/0xfc
       [&lt;c0782c50&gt;] clk_prepare+0xc/0x24
       [&lt;c079f474&gt;] __enable_clocks.isra.4+0x18/0xa4
       [&lt;c079f614&gt;] __flush_iotlb_va+0xe0/0x114
       [&lt;c079f6f4&gt;] qcom_iommu_unmap+0xac/0x1f0
       [&lt;c079ea3c&gt;] iommu_unmap+0x9c/0xe8
       [&lt;c056c2fc&gt;] msm_iommu_unmap+0x64/0x84
       [&lt;c0569da4&gt;] msm_gem_free_object+0x11c/0x338
       [&lt;c05413ec&gt;] drm_gem_object_handle_unreference_unlocked+0xfc/0x130
       [&lt;c0541604&gt;] drm_gem_object_release_handle+0x50/0x68
       [&lt;c0447a98&gt;] idr_for_each+0xa8/0xdc
       [&lt;c0541c10&gt;] drm_gem_release+0x1c/0x28
       [&lt;c0540b3c&gt;] drm_release+0x370/0x428
       [&lt;c031105c&gt;] __fput+0x98/0x1e8
       [&lt;c025d73c&gt;] task_work_run+0xb0/0xfc
       [&lt;c02477ec&gt;] do_exit+0x2ec/0x948
       [&lt;c0247ec0&gt;] do_group_exit+0x4c/0xb8
       [&lt;c025180c&gt;] get_signal+0x28c/0x6ac
       [&lt;c0211204&gt;] do_signal+0xc4/0x3e4
       [&lt;c02116cc&gt;] do_work_pending+0xb4/0xc4
       [&lt;c020e938&gt;] work_pending+0xc/0x20

other info that might help us debug this:

Chain exists of:
  prepare_lock --&gt; &amp;dev-&gt;struct_mutex --&gt; qcom_iommu_lock

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(qcom_iommu_lock);
                               lock(&amp;dev-&gt;struct_mutex);
                               lock(qcom_iommu_lock);
  lock(prepare_lock);

 *** DEADLOCK ***

3 locks held by Xorg.bin/5413:
 #0:  (drm_global_mutex){+.+.+.}, at: [&lt;c0540800&gt;] drm_release+0x34/0x428
 #1:  (&amp;dev-&gt;struct_mutex){+.+.+.}, at: [&lt;c05413bc&gt;] drm_gem_object_handle_unreference_unlocked+0xcc/0x130
 #2:  (qcom_iommu_lock){+.+...}, at: [&lt;c079f664&gt;] qcom_iommu_unmap+0x1c/0x1f0

stack backtrace:
CPU: 1 PID: 5413 Comm: Xorg.bin Tainted: G        W      3.17.0-rc1-00050-g07a489b #802
[&lt;c0216290&gt;] (unwind_backtrace) from [&lt;c0211d8c&gt;] (show_stack+0x10/0x14)
[&lt;c0211d8c&gt;] (show_stack) from [&lt;c087a078&gt;] (dump_stack+0x98/0xb8)
[&lt;c087a078&gt;] (dump_stack) from [&lt;c027f024&gt;] (print_circular_bug+0x218/0x340)
[&lt;c027f024&gt;] (print_circular_bug) from [&lt;c0283e08&gt;] (__lock_acquire+0x1d24/0x20b8)
[&lt;c0283e08&gt;] (__lock_acquire) from [&lt;c0284774&gt;] (lock_acquire+0x9c/0xbc)
[&lt;c0284774&gt;] (lock_acquire) from [&lt;c087c408&gt;] (mutex_lock_nested+0x70/0x3e8)
[&lt;c087c408&gt;] (mutex_lock_nested) from [&lt;c0781280&gt;] (clk_prepare_lock+0x88/0xfc)
[&lt;c0781280&gt;] (clk_prepare_lock) from [&lt;c0782c50&gt;] (clk_prepare+0xc/0x24)
[&lt;c0782c50&gt;] (clk_prepare) from [&lt;c079f474&gt;] (__enable_clocks.isra.4+0x18/0xa4)
[&lt;c079f474&gt;] (__enable_clocks.isra.4) from [&lt;c079f614&gt;] (__flush_iotlb_va+0xe0/0x114)
[&lt;c079f614&gt;] (__flush_iotlb_va) from [&lt;c079f6f4&gt;] (qcom_iommu_unmap+0xac/0x1f0)
[&lt;c079f6f4&gt;] (qcom_iommu_unmap) from [&lt;c079ea3c&gt;] (iommu_unmap+0x9c/0xe8)
[&lt;c079ea3c&gt;] (iommu_unmap) from [&lt;c056c2fc&gt;] (msm_iommu_unmap+0x64/0x84)
[&lt;c056c2fc&gt;] (msm_iommu_unmap) from [&lt;c0569da4&gt;] (msm_gem_free_object+0x11c/0x338)
[&lt;c0569da4&gt;] (msm_gem_free_object) from [&lt;c05413ec&gt;] (drm_gem_object_handle_unreference_unlocked+0xfc/0x130)
[&lt;c05413ec&gt;] (drm_gem_object_handle_unreference_unlocked) from [&lt;c0541604&gt;] (drm_gem_object_release_handle+0x50/0x68)
[&lt;c0541604&gt;] (drm_gem_object_release_handle) from [&lt;c0447a98&gt;] (idr_for_each+0xa8/0xdc)
[&lt;c0447a98&gt;] (idr_for_each) from [&lt;c0541c10&gt;] (drm_gem_release+0x1c/0x28)
[&lt;c0541c10&gt;] (drm_gem_release) from [&lt;c0540b3c&gt;] (drm_release+0x370/0x428)
[&lt;c0540b3c&gt;] (drm_release) from [&lt;c031105c&gt;] (__fput+0x98/0x1e8)
[&lt;c031105c&gt;] (__fput) from [&lt;c025d73c&gt;] (task_work_run+0xb0/0xfc)
[&lt;c025d73c&gt;] (task_work_run) from [&lt;c02477ec&gt;] (do_exit+0x2ec/0x948)
[&lt;c02477ec&gt;] (do_exit) from [&lt;c0247ec0&gt;] (do_group_exit+0x4c/0xb8)
[&lt;c0247ec0&gt;] (do_group_exit) from [&lt;c025180c&gt;] (get_signal+0x28c/0x6ac)
[&lt;c025180c&gt;] (get_signal) from [&lt;c0211204&gt;] (do_signal+0xc4/0x3e4)
[&lt;c0211204&gt;] (do_signal) from [&lt;c02116cc&gt;] (do_work_pending+0xb4/0xc4)
[&lt;c02116cc&gt;] (do_work_pending) from [&lt;c020e938&gt;] (work_pending+0xc/0x20)

We can break this chain if we don't hold the prepare_lock while
creating debugfs directories. We only hold the prepare_lock right
now because we're traversing the clock tree recursively and we
don't want the hierarchy to change during the traversal.
Replacing this traversal with a simple linked list walk allows us
to only grab a list lock instead of the prepare_lock, thus
breaking the lock chain.

Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'clk-next-unregister' into clk-next</title>
<updated>2013-12-31T19:35:12+00:00</updated>
<author>
<name>Mike Turquette</name>
<email>mturquette@linaro.org</email>
</author>
<published>2013-12-31T19:35:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=dbdf6ff51e3ce13ade5834b0d7d451522fcdb478'/>
<id>dbdf6ff51e3ce13ade5834b0d7d451522fcdb478</id>
<content type='text'>
Conflicts:
	drivers/clk/clk.c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Conflicts:
	drivers/clk/clk.c
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: remove CONFIG_COMMON_CLK_DEBUG</title>
<updated>2013-12-28T01:45:08+00:00</updated>
<author>
<name>Mike Turquette</name>
<email>mturquette@linaro.org</email>
</author>
<published>2013-12-19T05:38:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ea72dc2cf9552631e43327ce593bdbb0b9fdf058'/>
<id>ea72dc2cf9552631e43327ce593bdbb0b9fdf058</id>
<content type='text'>
Populate ${DEBUGS_MOUNT_POINT}/clk if CONFIG_DEBUG_FS is set. This
eliminates the extra (annoying) step of enabling the config option
manually.

Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Populate ${DEBUGS_MOUNT_POINT}/clk if CONFIG_DEBUG_FS is set. This
eliminates the extra (annoying) step of enabling the config option
manually.

Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: add clk accuracy retrieval support</title>
<updated>2013-12-23T07:14:27+00:00</updated>
<author>
<name>Boris BREZILLON</name>
<email>b.brezillon@overkiz.com</email>
</author>
<published>2013-12-21T09:34:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5279fc402ae59361a224d641d5823b21b4206232'/>
<id>5279fc402ae59361a224d641d5823b21b4206232</id>
<content type='text'>
The clock accuracy is expressed in ppb (parts per billion) and represents
the possible clock drift.
Say you have a clock (e.g. an oscillator) which provides a fixed clock of
20MHz with an accuracy of +- 20Hz. This accuracy expressed in ppb is
20Hz/20MHz = 1000 ppb (or 1 ppm).

Clock users may need the clock accuracy information in order to choose
the best clock (the one with the best accuracy) across several available
clocks.

This patch adds clk accuracy retrieval support for common clk framework by
means of a new function called clk_get_accuracy.
This function returns the given clock accuracy expressed in ppb.

In order to get the clock accuracy, this implementation adds one callback
called recalc_accuracy to the clk_ops structure.
This callback is given the parent clock accuracy (if the clock is not a
root clock) and should recalculate the given clock accuracy.

This callback is optional and may be implemented if the clock is not
a perfect clock (accuracy != 0 ppb).

Signed-off-by: Boris BREZILLON &lt;b.brezillon@overkiz.com&gt;
Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The clock accuracy is expressed in ppb (parts per billion) and represents
the possible clock drift.
Say you have a clock (e.g. an oscillator) which provides a fixed clock of
20MHz with an accuracy of +- 20Hz. This accuracy expressed in ppb is
20Hz/20MHz = 1000 ppb (or 1 ppm).

Clock users may need the clock accuracy information in order to choose
the best clock (the one with the best accuracy) across several available
clocks.

This patch adds clk accuracy retrieval support for common clk framework by
means of a new function called clk_get_accuracy.
This function returns the given clock accuracy expressed in ppb.

In order to get the clock accuracy, this implementation adds one callback
called recalc_accuracy to the clk_ops structure.
This callback is given the parent clock accuracy (if the clock is not a
root clock) and should recalculate the given clock accuracy.

This callback is optional and may be implemented if the clock is not
a perfect clock (accuracy != 0 ppb).

Signed-off-by: Boris BREZILLON &lt;b.brezillon@overkiz.com&gt;
Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: Implement clk_unregister</title>
<updated>2013-12-04T16:19:52+00:00</updated>
<author>
<name>Sylwester Nawrocki</name>
<email>s.nawrocki@samsung.com</email>
</author>
<published>2013-08-24T13:00:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=fcb0ee6a3d331fb23dbb546500021f6e4cac5689'/>
<id>fcb0ee6a3d331fb23dbb546500021f6e4cac5689</id>
<content type='text'>
clk_unregister() is currently not implemented and it is required when
a clock provider module needs to be unloaded.

Normally the clock supplier module is prevented to be unloaded by
taking reference on the module in clk_get().

For cases when the clock supplier module deinitializes despite the
consumers of its clocks holding a reference on the module, e.g. when
the driver is unbound through "unbind" sysfs attribute, there are
empty clock ops added. These ops are assigned temporarily to struct
clk and used until all consumers release the clock, to avoid invoking
callbacks from the module which just got removed.

Signed-off-by: Jiada Wang &lt;jiada_wang@mentor.com&gt;
Signed-off-by: Sylwester Nawrocki &lt;s.nawrocki@samsung.com&gt;
Signed-off-by: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
clk_unregister() is currently not implemented and it is required when
a clock provider module needs to be unloaded.

Normally the clock supplier module is prevented to be unloaded by
taking reference on the module in clk_get().

For cases when the clock supplier module deinitializes despite the
consumers of its clocks holding a reference on the module, e.g. when
the driver is unbound through "unbind" sysfs attribute, there are
empty clock ops added. These ops are assigned temporarily to struct
clk and used until all consumers release the clock, to avoid invoking
callbacks from the module which just got removed.

Signed-off-by: Jiada Wang &lt;jiada_wang@mentor.com&gt;
Signed-off-by: Sylwester Nawrocki &lt;s.nawrocki@samsung.com&gt;
Signed-off-by: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: Add common __clk_get(), __clk_put() implementations</title>
<updated>2013-12-04T16:19:44+00:00</updated>
<author>
<name>Sylwester Nawrocki</name>
<email>s.nawrocki@samsung.com</email>
</author>
<published>2013-08-24T18:10:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ac2df527fb407b61f9c812a99035b62a75a77d6d'/>
<id>ac2df527fb407b61f9c812a99035b62a75a77d6d</id>
<content type='text'>
This patch adds common __clk_get(), __clk_put() clkdev helpers that
replace their platform specific counterparts when the common clock
API is used.

The owner module pointer field is added to struct clk so a reference
to the clock supplier module can be taken by the clock consumers.

The owner module is assigned while the clock is being registered,
in functions _clk_register() and __clk_register().

Signed-off-by: Sylwester Nawrocki &lt;s.nawrocki@samsung.com&gt;
Signed-off-by: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
Acked-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds common __clk_get(), __clk_put() clkdev helpers that
replace their platform specific counterparts when the common clock
API is used.

The owner module pointer field is added to struct clk so a reference
to the clock supplier module can be taken by the clock consumers.

The owner module is assigned while the clock is being registered,
in functions _clk_register() and __clk_register().

Signed-off-by: Sylwester Nawrocki &lt;s.nawrocki@samsung.com&gt;
Signed-off-by: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
Acked-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: add support for clock reparent on set_rate</title>
<updated>2013-08-19T19:27:17+00:00</updated>
<author>
<name>James Hogan</name>
<email>james.hogan@imgtec.com</email>
</author>
<published>2013-07-29T11:25:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=71472c0c06cf9a3d1540762ea205654c584e3bc4'/>
<id>71472c0c06cf9a3d1540762ea205654c584e3bc4</id>
<content type='text'>
Add core support to allow clock implementations to select the best
parent clock when rounding a rate, e.g. the one which can provide the
closest clock rate to that requested. This is by way of adding a new
clock op, determine_rate(), which is like round_rate() but has an extra
parameter to allow the clock implementation to optionally select a
different parent clock. The core then takes care of reparenting the
clock when setting the rate.

The parent change takes place with the help of some new private data
members. struct clk::new_parent specifies a clock's new parent (NULL
indicates no change), and struct clk::new_child specifies a clock's new
child (whose new_parent member points back to it). The purpose of these
are to allow correct walking of the future tree for notifications prior
to actually reparenting any clocks, specifically to skip child clocks
who are being reparented to another clock (they will be notified via the
new parent), and to include any new child clock. These pointers are set
by clk_calc_subtree(), and the new_child pointer gets cleared when a
child is actually reparented to avoid duplicate POST_RATE_CHANGE
notifications.

Each place where round_rate() is called, determine_rate() is checked
first and called in preference. This restructures a few of the call
sites to simplify the logic into if/else blocks.

Signed-off-by: James Hogan &lt;james.hogan@imgtec.com&gt;
Reviewed-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Cc: Mike Turquette &lt;mturquette@linaro.org&gt;
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add core support to allow clock implementations to select the best
parent clock when rounding a rate, e.g. the one which can provide the
closest clock rate to that requested. This is by way of adding a new
clock op, determine_rate(), which is like round_rate() but has an extra
parameter to allow the clock implementation to optionally select a
different parent clock. The core then takes care of reparenting the
clock when setting the rate.

The parent change takes place with the help of some new private data
members. struct clk::new_parent specifies a clock's new parent (NULL
indicates no change), and struct clk::new_child specifies a clock's new
child (whose new_parent member points back to it). The purpose of these
are to allow correct walking of the future tree for notifications prior
to actually reparenting any clocks, specifically to skip child clocks
who are being reparented to another clock (they will be notified via the
new parent), and to include any new child clock. These pointers are set
by clk_calc_subtree(), and the new_child pointer gets cleared when a
child is actually reparented to avoid duplicate POST_RATE_CHANGE
notifications.

Each place where round_rate() is called, determine_rate() is checked
first and called in preference. This restructures a few of the call
sites to simplify the logic into if/else blocks.

Signed-off-by: James Hogan &lt;james.hogan@imgtec.com&gt;
Reviewed-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Cc: Mike Turquette &lt;mturquette@linaro.org&gt;
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: add table lookup to mux</title>
<updated>2013-03-22T22:18:18+00:00</updated>
<author>
<name>Peter De Schrijver</name>
<email>pdeschrijver@nvidia.com</email>
</author>
<published>2013-03-22T12:07:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ce4f3313b05c836c21a91ac89f87dccf84ce9561'/>
<id>ce4f3313b05c836c21a91ac89f87dccf84ce9561</id>
<content type='text'>
Add a table lookup feature to the mux clock. Also allow arbitrary masks
instead of the width. This will be used by some clocks on Tegra114. Also
adapt the tegra periph clk because it uses struct clk_mux directly.

Signed-off-by: Peter De Schrijver &lt;pdeschrijver@nvidia.com&gt;
Tested-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a table lookup feature to the mux clock. Also allow arbitrary masks
instead of the width. This will be used by some clocks on Tegra114. Also
adapt the tegra periph clk because it uses struct clk_mux directly.

Signed-off-by: Peter De Schrijver &lt;pdeschrijver@nvidia.com&gt;
Tested-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
