<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/include/linux/clk-private.h, branch master</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>clk: remove clk-private.h</title>
<updated>2015-02-02T22:23:41+00:00</updated>
<author>
<name>Michael Turquette</name>
<email>mturquette@linaro.org</email>
</author>
<published>2015-01-29T22:22:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b09d6d99102504a929cfaba4cd0e07658d7f01d1'/>
<id>b09d6d99102504a929cfaba4cd0e07658d7f01d1</id>
<content type='text'>
Private clock framework data structures should be private, surprisingly.

Now that all platforms and drivers have been updated to remove static
initializations of struct clk and struct clk_core objects and all
references to clk-private.h have been removed we can move the
definitions of these structures into drivers/clk/clk.c and delete the
header.

Additionally the ugly DEFINE_CLK macros have been removed. Those were
used for static definitions of struct clk objects. That practice is no
longer allowed.

Finally __clk_init is staticized as it is no longer declared in any
header.

Reviewed-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Michael Turquette &lt;mturquette@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Private clock framework data structures should be private, surprisingly.

Now that all platforms and drivers have been updated to remove static
initializations of struct clk and struct clk_core objects and all
references to clk-private.h have been removed we can move the
definitions of these structures into drivers/clk/clk.c and delete the
header.

Additionally the ugly DEFINE_CLK macros have been removed. Those were
used for static definitions of struct clk objects. That practice is no
longer allowed.

Finally __clk_init is staticized as it is no longer declared in any
header.

Reviewed-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Michael Turquette &lt;mturquette@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: Make clk API return per-user struct clk instances</title>
<updated>2015-02-02T22:22:19+00:00</updated>
<author>
<name>Tomeu Vizoso</name>
<email>tomeu.vizoso@collabora.com</email>
</author>
<published>2015-01-23T11:03:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=035a61c314eb3dab5bcc5683afaf4d412689858a'/>
<id>035a61c314eb3dab5bcc5683afaf4d412689858a</id>
<content type='text'>
Moves clock state to struct clk_core, but takes care to change as little API as
possible.

struct clk_hw still has a pointer to a struct clk, which is the
implementation's per-user clk instance, for backwards compatibility.

The struct clk that clk_get_parent() returns isn't owned by the caller, but by
the clock implementation, so the former shouldn't call clk_put() on it.

Because some boards in mach-omap2 still register clocks statically, their clock
registration had to be updated to take into account that the clock information
is stored in struct clk_core now.

Signed-off-by: Tomeu Vizoso &lt;tomeu.vizoso@collabora.com&gt;
Reviewed-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Tested-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Michael Turquette &lt;mturquette@linaro.org&gt;
[mturquette@linaro.org: adapted clk_has_parent to struct clk_core
                        applied OMAP3+ DPLL fix from Tero &amp; Tony]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Moves clock state to struct clk_core, but takes care to change as little API as
possible.

struct clk_hw still has a pointer to a struct clk, which is the
implementation's per-user clk instance, for backwards compatibility.

The struct clk that clk_get_parent() returns isn't owned by the caller, but by
the clock implementation, so the former shouldn't call clk_put() on it.

Because some boards in mach-omap2 still register clocks statically, their clock
registration had to be updated to take into account that the clock information
is stored in struct clk_core now.

Signed-off-by: Tomeu Vizoso &lt;tomeu.vizoso@collabora.com&gt;
Reviewed-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Tested-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Michael Turquette &lt;mturquette@linaro.org&gt;
[mturquette@linaro.org: adapted clk_has_parent to struct clk_core
                        applied OMAP3+ DPLL fix from Tero &amp; Tony]
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: Remove __clk_register</title>
<updated>2015-01-28T18:40:18+00:00</updated>
<author>
<name>Tomeu Vizoso</name>
<email>tomeu.vizoso@collabora.com</email>
</author>
<published>2015-01-23T11:03:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=af0f349b2996f9f3d83e5aac1edf58fff727a0e0'/>
<id>af0f349b2996f9f3d83e5aac1edf58fff727a0e0</id>
<content type='text'>
As it has never been used.

Signed-off-by: Tomeu Vizoso &lt;tomeu.vizoso@collabora.com&gt;
Reviewed-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Michael Turquette &lt;mturquette@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As it has never been used.

Signed-off-by: Tomeu Vizoso &lt;tomeu.vizoso@collabora.com&gt;
Reviewed-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Michael Turquette &lt;mturquette@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<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.tavy.me/linux-stable.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.tavy.me/linux-stable.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.tavy.me/linux-stable.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.tavy.me/linux-stable.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.tavy.me/linux-stable.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.tavy.me/linux-stable.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.tavy.me/linux-stable.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>
</feed>
