<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/clocksource/timer-sun5i.c, branch v4.15.11</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.15.11</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.15.11'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2017-06-21T07:07:52Z</updated>
<entry>
<title>Merge branch 'timers/urgent' into timers/core</title>
<updated>2017-06-21T07:07:52Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2017-06-21T07:07:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f0cd9ae5d0df8668e76359a3e0e99856aa9c53b9'/>
<id>urn:sha1:f0cd9ae5d0df8668e76359a3e0e99856aa9c53b9</id>
<content type='text'>
Pick up dependent changes.
</content>
</entry>
<entry>
<title>clocksource/drivers: Rename CLOCKSOURCE_OF_DECLARE to TIMER_OF_DECLARE</title>
<updated>2017-06-14T09:58:45Z</updated>
<author>
<name>Daniel Lezcano</name>
<email>daniel.lezcano@linaro.org</email>
</author>
<published>2017-05-26T14:56:11Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1727339590fdb5a1ded881b540cd32121278d414'/>
<id>urn:sha1:1727339590fdb5a1ded881b540cd32121278d414</id>
<content type='text'>
The CLOCKSOURCE_OF_DECLARE macro is used widely for the timers to declare the
clocksource at early stage. However, this macro is also used to initialize
the clockevent if any, or the clockevent only.

It was originally suggested to declare another macro to initialize a
clockevent, so in order to separate the two entities even they belong to the
same IP. This was not accepted because of the impact on the DT where splitting
a clocksource/clockevent definition does not make sense as it is a Linux
concept not a hardware description.

On the other side, the clocksource has not interrupt declared while the
clockevent has, so it is easy from the driver to know if the description is
for a clockevent or a clocksource, IOW it could be implemented at the driver
level.

So instead of dealing with a named clocksource macro, let's use a more generic
one: TIMER_OF_DECLARE.

The patch has not functional changes.

Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Acked-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Acked-by: Neil Armstrong &lt;narmstrong@baylibre.com&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>clocksource: Explicitly include linux/clocksource.h when needed</title>
<updated>2017-06-13T15:57:16Z</updated>
<author>
<name>Stephen Rothwell</name>
<email>sfr@canb.auug.org.au</email>
</author>
<published>2017-06-11T05:22:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=459fa246d8fa4a543ed9a3331f15c8fe1caf9937'/>
<id>urn:sha1:459fa246d8fa4a543ed9a3331f15c8fe1caf9937</id>
<content type='text'>
The kbuild test robot reported errors in these files when doing an ia64
allmodconfig build.

drivers/clocksource/timer-sun5i.c:52:21: error: field 'clksrc' has incomplete type
   struct clocksource clksrc;
                      ^~~~~~
drivers/clocksource/cadence_ttc_timer.c:92:21: error: field 'cs' has incomplete type
   struct clocksource cs;
                      ^~

(and many more errors for these files)

Cc: Michal Simek &lt;michal.simek@xilinx.com&gt;
Cc: "Sören Brinkmann" &lt;soren.brinkmann@xilinx.com&gt;
Cc: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Cc: Chen-Yu Tsai &lt;wens@csie.org&gt;
Reported-by: kbuild test robot &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Acked-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: Add missing line break to error messages</title>
<updated>2017-04-07T14:23:04Z</updated>
<author>
<name>Rafał Miłecki</name>
<email>rafal@milecki.pl</email>
</author>
<published>2017-03-09T09:47:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ac9ce6d1a0cc29767932d9f2fcb8ebc97c5106c8'/>
<id>urn:sha1:ac9ce6d1a0cc29767932d9f2fcb8ebc97c5106c8</id>
<content type='text'>
Printing with pr_* functions requires adding line break manually.

Signed-off-by: Rafał Miłecki &lt;rafal@milecki.pl&gt;
Acked-by: Thierry Reding &lt;treding@nvidia.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
<entry>
<title>clocksource: Use a plain u64 instead of cycle_t</title>
<updated>2016-12-25T10:04:12Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2016-12-21T19:32:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a5a1d1c2914b5316924c7893eb683a5420ebd3be'/>
<id>urn:sha1:a5a1d1c2914b5316924c7893eb683a5420ebd3be</id>
<content type='text'>
There is no point in having an extra type for extra confusion. u64 is
unambiguous.

Conversion was done with the following coccinelle script:

@rem@
@@
-typedef u64 cycle_t;

@fix@
typedef cycle_t;
@@
-cycle_t
+u64

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>Revert "clocksource/drivers/timer_sun5i: Replace code by clocksource_mmio_init"</title>
<updated>2016-10-20T19:58:58Z</updated>
<author>
<name>Chen-Yu Tsai</name>
<email>wens@csie.org</email>
</author>
<published>2016-10-18T05:49:18Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=593876838826914a7e4e05fbbcb728be6fbc4d89'/>
<id>urn:sha1:593876838826914a7e4e05fbbcb728be6fbc4d89</id>
<content type='text'>
struct clocksource is also used by the clk notifier callback, to
unregister and re-register the clocksource with a different clock rate.
clocksource_mmio_init does not pass back a pointer to the struct used,
and the clk notifier callback assumes that the struct clocksource in
struct sun5i_timer_clksrc is valid. This results in a kernel NULL
pointer dereference when the hstimer clock is changed:

Unable to handle kernel NULL pointer dereference at virtual address 00000004
[&lt;c03a4678&gt;] (clocksource_unbind) from [&lt;c03a46d4&gt;] (clocksource_unregister+0x2c/0x44)
[&lt;c03a46d4&gt;] (clocksource_unregister) from [&lt;c0a6f350&gt;] (sun5i_rate_cb_clksrc+0x34/0x3c)
[&lt;c0a6f350&gt;] (sun5i_rate_cb_clksrc) from [&lt;c035ea50&gt;] (notifier_call_chain+0x44/0x84)
[&lt;c035ea50&gt;] (notifier_call_chain) from [&lt;c035edc0&gt;] (__srcu_notifier_call_chain+0x44/0x60)
[&lt;c035edc0&gt;] (__srcu_notifier_call_chain) from [&lt;c035edf4&gt;] (srcu_notifier_call_chain+0x18/0x20)
[&lt;c035edf4&gt;] (srcu_notifier_call_chain) from [&lt;c0670174&gt;] (__clk_notify+0x70/0x7c)
[&lt;c0670174&gt;] (__clk_notify) from [&lt;c06702c0&gt;] (clk_propagate_rate_change+0xa4/0xc4)
[&lt;c06702c0&gt;] (clk_propagate_rate_change) from [&lt;c0670288&gt;] (clk_propagate_rate_change+0x6c/0xc4)

Revert the commit for now. clocksource_mmio_init can be made to pass back
a pointer, but the code churn and usage of an inner struct might not be
worth it.

Fixes: 157dfadef832 ("clocksource/drivers/timer_sun5i: Replace code by clocksource_mmio_init")
Reported-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Signed-off-by: Chen-Yu Tsai &lt;wens@csie.org&gt;
Cc: linux-sunxi@googlegroups.com
Cc: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/20161018054918.26855-1-wens@csie.org
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;

</content>
</entry>
<entry>
<title>clocksources: Switch back to the clksrc table</title>
<updated>2016-06-28T08:19:35Z</updated>
<author>
<name>Daniel Lezcano</name>
<email>daniel.lezcano@linaro.org</email>
</author>
<published>2016-06-06T22:27:44Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=177cf6e52b0a1a382b9892d3cc9aafd6e7c5943f'/>
<id>urn:sha1:177cf6e52b0a1a382b9892d3cc9aafd6e7c5943f</id>
<content type='text'>
All the clocksource drivers's init function are now converted to return
an error code. CLOCKSOURCE_OF_DECLARE is no longer used as well as the
clksrc-of table.

Let's convert back the names:
 - CLOCKSOURCE_OF_DECLARE_RET =&gt; CLOCKSOURCE_OF_DECLARE
 - clksrc-of-ret              =&gt; clksrc-of

Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;

For exynos_mct and samsung_pwm_timer:
Acked-by: Krzysztof Kozlowski &lt;k.kozlowski@samsung.com&gt;

For arch/arc:
Acked-by: Vineet Gupta &lt;vgupta@synopsys.com&gt;

For mediatek driver:
Acked-by: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;

For the Rockchip-part
Acked-by: Heiko Stuebner &lt;heiko@sntech.de&gt;

For STi :
Acked-by: Patrice Chotard &lt;patrice.chotard@st.com&gt;

For the mps2-timer.c and versatile.c changes:
Acked-by: Liviu Dudau &lt;Liviu.Dudau@arm.com&gt;

For the OXNAS part :
Acked-by: Neil Armstrong &lt;narmstrong@baylibre.com&gt;

For LPC32xx driver:
Acked-by: Sylvain Lemieux &lt;slemieux.tyco@gmail.com&gt;

For Broadcom Kona timer change:
Acked-by: Ray Jui &lt;ray.jui@broadcom.com&gt;

For Sun4i and Sun5i:
Acked-by: Chen-Yu Tsai &lt;wens@csie.org&gt;

For Meson6:
Acked-by: Carlo Caione &lt;carlo@caione.org&gt;

For Keystone:
Acked-by: Santosh Shilimkar &lt;ssantosh@kernel.org&gt;

For NPS:
Acked-by: Noam Camus &lt;noamca@mellanox.com&gt;

For bcm2835:
Acked-by: Eric Anholt &lt;eric@anholt.net&gt;
</content>
</entry>
<entry>
<title>clocksource/drivers/sun5i: Convert init function to return error</title>
<updated>2016-06-28T08:19:31Z</updated>
<author>
<name>Daniel Lezcano</name>
<email>daniel.lezcano@linaro.org</email>
</author>
<published>2016-06-06T21:28:36Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e4d9f2ee4ef53d4637308921602e5406d5540e0d'/>
<id>urn:sha1:e4d9f2ee4ef53d4637308921602e5406d5540e0d</id>
<content type='text'>
The init functions do not return any error. They behave as the following:

  - panic, thus leading to a kernel crash while another timer may work and
       make the system boot up correctly

  or

  - print an error and let the caller unaware if the state of the system

Change that by converting the init functions to return an error conforming
to the CLOCKSOURCE_OF_RET prototype.

Proper error handling (rollback, errno value) will be changed later case
by case, thus this change just return back an error or success in the init
function.

Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
<entry>
<title>clocksource/drivers/timer_sun5i: Replace code by clocksource_mmio_init</title>
<updated>2015-12-15T08:42:30Z</updated>
<author>
<name>Daniel Lezcano</name>
<email>daniel.lezcano@linaro.org</email>
</author>
<published>2015-11-12T17:05:11Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=157dfadef8323046df32caa4b39b46bf7737ca23'/>
<id>urn:sha1:157dfadef8323046df32caa4b39b46bf7737ca23</id>
<content type='text'>
The current code to initialize, register and read the clocksource is
already factored out in mmio.c via the clocksource_mmio_init function.

The only difference is the readl vs readl_relaxed.

Factor out the code with the clocksource_mmio_init function.

Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Acked-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>clockevents/drivers/sun5i: Migrate to new 'set-state' interface</title>
<updated>2015-08-10T09:40:49Z</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2015-06-18T10:54:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7486f5ad27f6833397d55972878e7d73e84bede2'/>
<id>urn:sha1:7486f5ad27f6833397d55972878e7d73e84bede2</id>
<content type='text'>
Migrate sun5i driver to the new 'set-state' interface provided by
clockevents core, the earlier 'set-mode' interface is marked obsolete
now.

This also enables us to implement callbacks for new states of clockevent
devices, for example: ONESHOT_STOPPED.

Cc: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Acked-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
</content>
</entry>
</feed>
