<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/clocksource/cadence_ttc_timer.c, branch leds/master</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=leds%2Fmaster</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=leds%2Fmaster'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2014-09-28T23:59:09Z</updated>
<entry>
<title>clocksource: cadence_ttc: Add support for 32bit mode</title>
<updated>2014-09-28T23:59:09Z</updated>
<author>
<name>Michal Simek</name>
<email>michal.simek@xilinx.com</email>
</author>
<published>2014-09-28T23:50:05Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4e2bec0c327025671c1ec2101660e8fea29d9d89'/>
<id>urn:sha1:4e2bec0c327025671c1ec2101660e8fea29d9d89</id>
<content type='text'>
New TTCs support 32bit mode. Older versions support
only 16bit modes. Keep 16bit mode as default
and 32bit optional.

Signed-off-by: Michal Simek &lt;michal.simek@xilinx.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
<entry>
<title>clocksource: cadence_ttc: Use readl/writel_relaxed instead of __raw</title>
<updated>2014-05-20T14:16:05Z</updated>
<author>
<name>Michal Simek</name>
<email>michal.simek@xilinx.com</email>
</author>
<published>2014-04-11T13:39:29Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=87ab4361beed9960687eb60f0da79f85293d1ade'/>
<id>urn:sha1:87ab4361beed9960687eb60f0da79f85293d1ade</id>
<content type='text'>
For supporting ARM big-endian is necessary to use
proper IO endianess accessors.

Based on Ben Dooks BE guide.
Similar conversion is done here:
"mv_xor: use {readl, writel}_relaxed instead of __raw_{readl, writel}"
(sha1: 5733c38ae3473115ac7df3fe19bd2502149d8c51)

Signed-off-by: Michal Simek &lt;michal.simek@xilinx.com&gt;
</content>
</entry>
<entry>
<title>clocksource/cadence_ttc: Overhaul clocksource frequency adjustment</title>
<updated>2014-03-11T22:10:03Z</updated>
<author>
<name>Soren Brinkmann</name>
<email>soren.brinkmann@xilinx.com</email>
</author>
<published>2014-02-19T23:14:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b3e90722f6f53fa457a88146a877e34ea71d25ea'/>
<id>urn:sha1:b3e90722f6f53fa457a88146a877e34ea71d25ea</id>
<content type='text'>
The currently used method adjusting the clocksource to a changing input
frequency does not work on kernels from 3.11 on.
The new approach is to keep the timer frequency as constant as possible.
I.e.
 - due to the TTC's prescaler limitations, allow frequency changes
   only if the frequency scales by a power of 2
 - adjust the counter's divider on the fly when a frequency change
   occurs

This limits cpufreq to scale by certain factors only.
But we may keep the time base somewhat constant, so that sleep() &amp; co
keep working as expected, while supporting cpufreq.

Signed-off-by: Soren Brinkmann &lt;soren.brinkmann@xilinx.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Acked-by: Michal Simek &lt;michal.simek@xilinx.com&gt;
</content>
</entry>
<entry>
<title>clocksource/cadence_ttc: Call clockevents_update_freq() with IRQs enabled</title>
<updated>2014-03-11T22:05:18Z</updated>
<author>
<name>Soren Brinkmann</name>
<email>soren.brinkmann@xilinx.com</email>
</author>
<published>2014-02-19T23:14:41Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5f0ba3b462b2d36b3c28748863747fb1050f40d0'/>
<id>urn:sha1:5f0ba3b462b2d36b3c28748863747fb1050f40d0</id>
<content type='text'>
The timer core takes care of serialization and IRQs. Hence the driver is
no longer required to disable interrupts when calling
clockevents_update_freq().

Signed-off-by: Soren Brinkmann &lt;soren.brinkmann@xilinx.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Acked-by: Michal Simek &lt;michal.simek@xilinx.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2014-01-20T19:34:26Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2014-01-20T19:34:26Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6c6461435611e1d4843516f2d55e8316c009112e'/>
<id>urn:sha1:6c6461435611e1d4843516f2d55e8316c009112e</id>
<content type='text'>
Pull timer changes from Ingo Molnar:
  - ARM clocksource/clockevent improvements and fixes
  - generic timekeeping updates: TAI fixes/improvements, cleanups
  - Posix cpu timer cleanups and improvements
  - dynticks updates: full dynticks bugfixes, optimizations and cleanups

* 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (46 commits)
  clocksource: Timer-sun5i: Switch to sched_clock_register()
  timekeeping: Remove comment that's mostly out of date
  rtc-cmos: Add an alarm disable quirk
  timekeeper: fix comment typo for tk_setup_internals()
  timekeeping: Fix missing timekeeping_update in suspend path
  timekeeping: Fix CLOCK_TAI timer/nanosleep delays
  tick/timekeeping: Call update_wall_time outside the jiffies lock
  timekeeping: Avoid possible deadlock from clock_was_set_delayed
  timekeeping: Fix potential lost pv notification of time change
  timekeeping: Fix lost updates to tai adjustment
  clocksource: sh_cmt: Add clk_prepare/unprepare support
  clocksource: bcm_kona_timer: Remove unused bcm_timer_ids
  clocksource: vt8500: Remove deprecated IRQF_DISABLED
  clocksource: tegra: Remove deprecated IRQF_DISABLED
  clocksource: misc drivers: Remove deprecated IRQF_DISABLED
  clocksource: sh_mtu2: Remove unnecessary platform_set_drvdata()
  clocksource: sh_tmu: Remove unnecessary platform_set_drvdata()
  clocksource: armada-370-xp: Enable timer divider only when needed
  clocksource: clksrc-of: Warn if no clock sources are found
  clocksource: orion: Switch to sched_clock_register()
  ...
</content>
</entry>
<entry>
<title>clocksource: cadence_ttc: Fix mutex taken inside interrupt context</title>
<updated>2013-12-30T10:32:24Z</updated>
<author>
<name>Soren Brinkmann</name>
<email>soren.brinkmann@xilinx.com</email>
</author>
<published>2013-11-27T01:04:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c1dcc927dae01dfd4904ee82ce2c00b50eab6dc3'/>
<id>urn:sha1:c1dcc927dae01dfd4904ee82ce2c00b50eab6dc3</id>
<content type='text'>
When the kernel is compiled with:
CONFIG_HIGH_RES_TIMERS=no
CONFIG_HZ_PERIODIC=yes
CONFIG_DEBUG_ATOMIC_SLEEP=yes

The following WARN appears:

WARNING: CPU: 1 PID: 0 at linux/kernel/mutex.c:856 mutex_trylock+0x70/0x1fc()
DEBUG_LOCKS_WARN_ON(in_interrupt())
Modules linked in:
CPU: 1 PID: 0 Comm: swapper/1 Not tainted 3.12.0-xilinx-dirty #93
[&lt;c0014a78&gt;] (unwind_backtrace+0x0/0x11c) from [&lt;c0011b6c&gt;] (show_stack+0x10/0x14)
[&lt;c0011b6c&gt;] (show_stack+0x10/0x14) from [&lt;c039120c&gt;] (dump_stack+0x7c/0xc0)
[&lt;c039120c&gt;] (dump_stack+0x7c/0xc0) from [&lt;c001fda4&gt;] (warn_slowpath_common+0x60/0x84)
[&lt;c001fda4&gt;] (warn_slowpath_common+0x60/0x84) from [&lt;c001fe48&gt;] (warn_slowpath_fmt+0x2c/0x3c)
[&lt;c001fe48&gt;] (warn_slowpath_fmt+0x2c/0x3c) from [&lt;c0392658&gt;] (mutex_trylock+0x70/0x1fc)
[&lt;c0392658&gt;] (mutex_trylock+0x70/0x1fc) from [&lt;c02dfc08&gt;] (clk_prepare_lock+0xc/0xe4)
[&lt;c02dfc08&gt;] (clk_prepare_lock+0xc/0xe4) from [&lt;c02e099c&gt;] (clk_get_rate+0xc/0x44)
[&lt;c02e099c&gt;] (clk_get_rate+0xc/0x44) from [&lt;c02d0394&gt;] (ttc_set_mode+0x34/0x78)
[&lt;c02d0394&gt;] (ttc_set_mode+0x34/0x78) from [&lt;c005f794&gt;] (clockevents_set_mode+0x28/0x5c)
[&lt;c005f794&gt;] (clockevents_set_mode+0x28/0x5c) from [&lt;c00607fc&gt;] (tick_broadcast_on_off+0x190/0x1c0)
[&lt;c00607fc&gt;] (tick_broadcast_on_off+0x190/0x1c0) from [&lt;c005f168&gt;] (clockevents_notify+0x58/0x1ac)
[&lt;c005f168&gt;] (clockevents_notify+0x58/0x1ac) from [&lt;c02b99dc&gt;] (cpuidle_setup_broadcast_timer+0x20/0x24)
[&lt;c02b99dc&gt;] (cpuidle_setup_broadcast_timer+0x20/0x24) from [&lt;c006cd04&gt;] (generic_smp_call_function_single_interrupt+0)
[&lt;c006cd04&gt;] (generic_smp_call_function_single_interrupt+0xe0/0x130) from [&lt;c00138c8&gt;] (handle_IPI+0x88/0x118)
[&lt;c00138c8&gt;] (handle_IPI+0x88/0x118) from [&lt;c0008504&gt;] (gic_handle_irq+0x58/0x60)
[&lt;c0008504&gt;] (gic_handle_irq+0x58/0x60) from [&lt;c0012644&gt;] (__irq_svc+0x44/0x78)
Exception stack(0xef099fa0 to 0xef099fe8)
9fa0: 00000001 ef092100 00000000 ef092100 ef098000 00000015 c0399f2c c0579d74
9fc0: 0000406a 413fc090 00000000 00000000 00000000 ef099fe8 c00666ec c000f46c
9fe0: 20000113 ffffffff
[&lt;c0012644&gt;] (__irq_svc+0x44/0x78) from [&lt;c000f46c&gt;] (arch_cpu_idle+0x34/0x3c)
[&lt;c000f46c&gt;] (arch_cpu_idle+0x34/0x3c) from [&lt;c0053980&gt;] (cpu_startup_entry+0xa8/0x10c)
[&lt;c0053980&gt;] (cpu_startup_entry+0xa8/0x10c) from [&lt;000085a4&gt;] (0x85a4)

We are in an interrupt context (IPI) and we are calling clk_get_rate in the
set_mode function which in turn ends up by getting a mutex... Even if that
does not hang, it is a potential kernel deadlock.

It is not allowed to call clk_get_rate() from interrupt context. To
avoid such calls the timer input frequency is stored in the driver's
data struct which makes it accessible to the driver in any context.

[dlezcano] completed the changelog with the WARN trace and added a more
detailed description. Tested on zync zc702.

Acked-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Tested-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Signed-off-by: Soren Brinkmann &lt;soren.brinkmann@xilinx.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
<entry>
<title>clocksource: misc drivers: Remove deprecated IRQF_DISABLED</title>
<updated>2013-12-11T10:40:27Z</updated>
<author>
<name>Michael Opdenacker</name>
<email>michael.opdenacker@free-electrons.com</email>
</author>
<published>2013-12-09T09:12:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=38c30a8421ce8b06492121deee422ba7ecfaeef2'/>
<id>urn:sha1:38c30a8421ce8b06492121deee422ba7ecfaeef2</id>
<content type='text'>
This patch removes the use of the IRQF_DISABLED flag

It's a NOOP since 2.6.35 and it will be removed one day.

[dlezcano] : slightly changed the changelog

Signed-off-by: Michael Opdenacker &lt;michael.opdenacker@free-electrons.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
<entry>
<title>clocksource: cadence_ttc_timer: Switch to sched_clock_register()</title>
<updated>2013-12-11T10:40:24Z</updated>
<author>
<name>Stephen Boyd</name>
<email>sboyd@codeaurora.org</email>
</author>
<published>2013-11-19T23:47:32Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=dfded00902d7437963870accbcf4b39114e85f59'/>
<id>urn:sha1:dfded00902d7437963870accbcf4b39114e85f59</id>
<content type='text'>
The 32 bit sched_clock interface now supports 64 bits. Upgrade to
the 64 bit function to allow us to remove the 32 bit registration
interface.

Cc: Soren Brinkmann &lt;soren.brinkmann@xilinx.com&gt;
Cc: Michal Simek &lt;monstr@monstr.eu&gt;
Tested-by: Soren Brinkmann &lt;soren.brinkmann@xilinx.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
<entry>
<title>clocksource: cadence_ttc: Reuse clocksource as sched_clock</title>
<updated>2013-07-18T13:27:34Z</updated>
<author>
<name>Soren Brinkmann</name>
<email>soren.brinkmann@xilinx.com</email>
</author>
<published>2013-07-08T16:51:38Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3d77b30efc72d126c2b74070b41a03869611228d'/>
<id>urn:sha1:3d77b30efc72d126c2b74070b41a03869611228d</id>
<content type='text'>
Reuse the TTC clocksource timer as sched clock provider.

Signed-off-by: Soren Brinkmann &lt;soren.brinkmann@xilinx.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Acked-by: Michal Simek &lt;monstr@monstr.eu&gt;
</content>
</entry>
<entry>
<title>clocksource: cadence_ttc: Remove unused header</title>
<updated>2013-07-18T13:27:22Z</updated>
<author>
<name>Soren Brinkmann</name>
<email>soren.brinkmann@xilinx.com</email>
</author>
<published>2013-07-08T16:51:37Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9bbf914043e04f65e619f3c0ff67c387812f9458'/>
<id>urn:sha1:9bbf914043e04f65e619f3c0ff67c387812f9458</id>
<content type='text'>
The clk-provider.h header is not required by this driver.

Signed-off-by: Soren Brinkmann &lt;soren.brinkmann@xilinx.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
</feed>
