<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/clocksource, branch v4.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.3</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2015-10-28T14:22:56Z</updated>
<entry>
<title>clocksource/drivers/sh_mtu2: Fix multiple shutdown call issue</title>
<updated>2015-10-28T14:22:56Z</updated>
<author>
<name>Magnus Damm</name>
<email>damm+renesas@opensource.se</email>
</author>
<published>2015-10-28T01:43:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fe326c5cc07cd265abad29c35c142cfae09889e4'/>
<id>urn:sha1:fe326c5cc07cd265abad29c35c142cfae09889e4</id>
<content type='text'>
On the r7s72100 Genmai board the MTU2 driver currently triggers a common
clock framework WARN_ON(enable_count) when disabling the clock due to
the MTU2 driver after recent callback rework may call -&gt;set_state_shutdown()
multiple times. A similar issue was spotted for the TMU driver and fixed in:
452b132 clocksource/drivers/sh_tmu: Fix traceback spotted in -next

On r7s72100 Genmai v4.3-rc7 built with shmobile_defconfig spits out the
following during boot:

sh_mtu2 fcff0000.timer: ch0: used for clock events
------------[ cut here ]------------
WARNING: CPU: 0 PID: 1 at drivers/clk/clk.c:675 clk_core_disable+0x2c/0x6c()
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.3.0-rc7 #1
Hardware name: Generic R7S72100 (Flattened Device Tree)
Backtrace:
[&lt;c00133d4&gt;] (dump_backtrace) from [&lt;c0013570&gt;] (show_stack+0x18/0x1c)
[&lt;c0013558&gt;] (show_stack) from [&lt;c01c7aac&gt;] (dump_stack+0x74/0x90)
[&lt;c01c7a38&gt;] (dump_stack) from [&lt;c00272fc&gt;] (warn_slowpath_common+0x88/0xb4)
[&lt;c0027274&gt;] (warn_slowpath_common) from [&lt;c0027400&gt;] (warn_slowpath_null+0x24/0x2c)
[&lt;c00273dc&gt;] (warn_slowpath_null) from [&lt;c03a9320&gt;] (clk_core_disable+0x2c/0x6c)
[&lt;c03a92f4&gt;] (clk_core_disable) from [&lt;c03aa0a0&gt;] (clk_disable+0x40/0x4c)
[&lt;c03aa060&gt;] (clk_disable) from [&lt;c0395d2c&gt;] (sh_mtu2_disable+0x24/0x50)
[&lt;c0395d08&gt;] (sh_mtu2_disable) from [&lt;c0395d6c&gt;] (sh_mtu2_clock_event_shutdown+0x14/0x1c)
[&lt;c0395d58&gt;] (sh_mtu2_clock_event_shutdown) from [&lt;c007d7d0&gt;] (clockevents_switch_state+0xc8/0x114)
[&lt;c007d708&gt;] (clockevents_switch_state) from [&lt;c007d834&gt;] (clockevents_shutdown+0x18/0x28)
[&lt;c007d81c&gt;] (clockevents_shutdown) from [&lt;c007dd58&gt;] (clockevents_exchange_device+0x70/0x78)
[&lt;c007dce8&gt;] (clockevents_exchange_device) from [&lt;c007e578&gt;] (tick_check_new_device+0x88/0xe0)
[&lt;c007e4f0&gt;] (tick_check_new_device) from [&lt;c007daf0&gt;] (clockevents_register_device+0xac/0x120)
[&lt;c007da44&gt;] (clockevents_register_device) from [&lt;c0395be8&gt;] (sh_mtu2_probe+0x230/0x350)
[&lt;c03959b8&gt;] (sh_mtu2_probe) from [&lt;c028b6f0&gt;] (platform_drv_probe+0x50/0x98)

Reported-by: Chris Brandt &lt;chris.brandt@renesas.com&gt;
Fixes: 19a9ffb ("clockevents/drivers/sh_mtu2: Migrate to new 'set-state' interface")
Cc: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Cc: Laurent Pinchart &lt;laurent.pinchart+renesas@ideasonboard.com&gt;
Signed-off-by: Magnus Damm &lt;damm+renesas@opensource.se&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Reviewed-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
</content>
</entry>
<entry>
<title>clocksource/drivers/digicolor: Prevent ftrace recursion</title>
<updated>2015-10-27T00:34:17Z</updated>
<author>
<name>Jisheng Zhang</name>
<email>jszhang@marvell.com</email>
</author>
<published>2015-10-20T08:02:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=76b1ba7feda533a74c5874a1d15bb4039083efc8'/>
<id>urn:sha1:76b1ba7feda533a74c5874a1d15bb4039083efc8</id>
<content type='text'>
Having a traceable function in the sched_clock() path leads to a recursion
within ftrace and a kernel crash.

We should not trace digicolor_timer_sched_read() function. Fix this by adding
the notrace attribute to this function.

Signed-off-by: Jisheng Zhang &lt;jszhang@marvell.com&gt;
Acked-by: Baruch Siach &lt;baruch@tkos.co.il&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
<entry>
<title>clocksource/drivers/fsl_ftm_timer: Prevent ftrace recursion</title>
<updated>2015-10-27T00:34:07Z</updated>
<author>
<name>Jisheng Zhang</name>
<email>jszhang@marvell.com</email>
</author>
<published>2015-10-20T08:02:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bd859a44b2f6749fd82e89dabbaa37f2c8aa33fe'/>
<id>urn:sha1:bd859a44b2f6749fd82e89dabbaa37f2c8aa33fe</id>
<content type='text'>
Having a traceable function in the sched_clock() path leads to a recursion
within ftrace and a kernel crash.

We should not trace the ftm_read_sched_clock() function.

Fix this by adding the notrace attribute to this function.

Signed-off-by: Jisheng Zhang &lt;jszhang@marvell.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
<entry>
<title>clocksource/drivers/vf_pit_timer: Prevent ftrace recursion</title>
<updated>2015-10-27T00:33:58Z</updated>
<author>
<name>Jisheng Zhang</name>
<email>jszhang@marvell.com</email>
</author>
<published>2015-10-20T08:02:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=36361abc8bc14e80f6b4db561665e5e15249c181'/>
<id>urn:sha1:36361abc8bc14e80f6b4db561665e5e15249c181</id>
<content type='text'>
Having a traceable function in the sched_clock() path leads to a recursion
within ftrace and a kernel crash.

We should not trace the pit_read_sched_clock() function. Fix this by adding a
notrace attribute to this function.

Signed-off-by: Jisheng Zhang &lt;jszhang@marvell.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
<entry>
<title>clocksource/drivers/prima2: Prevent ftrace recursion</title>
<updated>2015-10-27T00:33:50Z</updated>
<author>
<name>Jisheng Zhang</name>
<email>jszhang@marvell.com</email>
</author>
<published>2015-10-20T08:02:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cdc68ec01853baf3558c6d25f19c869add4a6888'/>
<id>urn:sha1:cdc68ec01853baf3558c6d25f19c869add4a6888</id>
<content type='text'>
Currently prima2 timer can be used as a scheduler clock. We properly
marked sirfsoc_read_sched_clock() as notrace but we then call another
function sirfsoc_timer_read() that _wasn't_ notrace.

Having a traceable function in the sched_clock() path leads to a recursion
within ftrace and a kernel crash.

Fix this by adding notrace attribute to the sirfsoc_timer_read() function.

Signed-off-by: Jisheng Zhang &lt;jszhang@marvell.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
<entry>
<title>clocksource/drivers/samsung_pwm_timer: Prevent ftrace recursion</title>
<updated>2015-10-27T00:33:41Z</updated>
<author>
<name>Jisheng Zhang</name>
<email>jszhang@marvell.com</email>
</author>
<published>2015-10-20T08:02:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b8725dab66f0b2d57affb33a7f6ca094d9f1f8dd'/>
<id>urn:sha1:b8725dab66f0b2d57affb33a7f6ca094d9f1f8dd</id>
<content type='text'>
Currently samsung_pwm_timer can be used as a scheduler clock. We properly
marked samsung_read_sched_clock() as notrace but we then call another
function samsung_clocksource_read() that _wasn't_ notrace.

Having a traceable function in the sched_clock() path leads to a recursion
within ftrace and a kernel crash.

Fix this by adding notrace attribute to the samsung_clocksource_read()
function.

Signed-off-by: Jisheng Zhang &lt;jszhang@marvell.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
<entry>
<title>clocksource/drivers/pistachio: Prevent ftrace recursion</title>
<updated>2015-10-27T00:33:18Z</updated>
<author>
<name>Jisheng Zhang</name>
<email>jszhang@marvell.com</email>
</author>
<published>2015-10-20T08:02:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f8af0e9c644caf64d0f42dce816c18346c744a9f'/>
<id>urn:sha1:f8af0e9c644caf64d0f42dce816c18346c744a9f</id>
<content type='text'>
Currently pistachio can be used as a scheduler clock. We properly marked
pistachio_read_sched_clock() as notrace but we then call another function
pistachio_clocksource_read_cycles() that _wasn't_ notrace.

Having a traceable function in the sched_clock() path leads to a recursion
within ftrace and a kernel crash.

Fix this by adding notrace attribute to the pistachio_clocksource_read_cycles()
function.

Signed-off-by: Jisheng Zhang &lt;jszhang@marvell.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
<entry>
<title>clocksource/drivers/arm_global_timer: Prevent ftrace recursion</title>
<updated>2015-10-27T00:32:33Z</updated>
<author>
<name>Jisheng Zhang</name>
<email>jszhang@marvell.com</email>
</author>
<published>2015-10-20T08:02:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d6df3576e6b4bcf765f5ace69915b4fa4a7ee1c3'/>
<id>urn:sha1:d6df3576e6b4bcf765f5ace69915b4fa4a7ee1c3</id>
<content type='text'>
Currently arm_global_timer can be used as a scheduler clock. We properly
marked gt_sched_clock_read() as notrace but we then call another function
gt_counter_read() that _wasn't_ notrace.

Having a traceable function in the sched_clock() path leads to a recursion
within ftrace and a kernel crash.

Fix this by adding an extra notrace function to keep other users of
gt_counter_read() traceable.

Signed-off-by: Jisheng Zhang &lt;jszhang@marvell.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
<entry>
<title>clocksource/drivers/keystone: Fix bad NO_IRQ usage</title>
<updated>2015-09-29T12:33:51Z</updated>
<author>
<name>Daniel Lezcano</name>
<email>daniel.lezcano@linaro.org</email>
</author>
<published>2015-09-20T14:00:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bdf7344e14d826d0df438a55fc51146d179e198d'/>
<id>urn:sha1:bdf7344e14d826d0df438a55fc51146d179e198d</id>
<content type='text'>
The current code assumes the 'irq_of_parse_and_map' will return NO_IRQ in case
of failure. Unfortunately, the NO_IRQ is not consistent across the different
architectures and we must not rely on it.

NO_IRQ is equal to '-1' on ARM and 'irq_of_parse_and_map' returns '0' in case
of an error. Hence, the latter won't be detected and will lead to a crash.

Fix this by just checking 'irq' is different from zero.

Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
<entry>
<title>clocksource/drivers/rockchip: Fix bad NO_IRQ usage</title>
<updated>2015-09-29T12:33:34Z</updated>
<author>
<name>Daniel Lezcano</name>
<email>daniel.lezcano@linaro.org</email>
</author>
<published>2015-09-20T14:00:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ccc42592d436d021d17f86729d24806f30dbad25'/>
<id>urn:sha1:ccc42592d436d021d17f86729d24806f30dbad25</id>
<content type='text'>
The current code assumes the 'irq_of_parse_and_map' will return NO_IRQ in case
of failure. Unfortunately, the NO_IRQ is not consistent across the different
architectures and we must not rely on it.

NO_IRQ is equal to '-1' on ARM and 'irq_of_parse_and_map' returns '0' in case
of an error. Hence, the latter won't be detected and will lead to a crash.

Fix this by just checking 'irq' is different from zero.

Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
</feed>
