<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/clocksource/vt8500_timer.c, branch linux-3.10.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>clocksource/drivers/vt8500: Increase the minimum delta</title>
<updated>2016-03-03T23:06:20+00:00</updated>
<author>
<name>Roman Volkov</name>
<email>rvolkov@v1ros.org</email>
</author>
<published>2016-01-01T13:24:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=1644fe6cc1567ecde034ea8acd5f4d6146e395b5'/>
<id>1644fe6cc1567ecde034ea8acd5f4d6146e395b5</id>
<content type='text'>
commit f9eccf24615672896dc13251410c3f2f33a14f95 upstream.

The vt8500 clocksource driver declares itself as capable to handle the
minimum delay of 4 cycles by passing the value into
clockevents_config_and_register(). The vt8500_timer_set_next_event()
requires the passed cycles value to be at least 16. The impact is that
userspace hangs in nanosleep() calls with small delay intervals.

This problem is reproducible in Linux 4.2 starting from:
c6eb3f70d448 ('hrtimer: Get rid of hrtimer softirq')

From Russell King, more detailed explanation:

"It's a speciality of the StrongARM/PXA hardware. It takes a certain
number of OSCR cycles for the value written to hit the compare registers.
So, if a very small delta is written (eg, the compare register is written
with a value of OSCR + 1), the OSCR will have incremented past this value
before it hits the underlying hardware. The result is, that you end up
waiting a very long time for the OSCR to wrap before the event fires.

So, we introduce a check in set_next_event() to detect this and return
-ETIME if the calculated delta is too small, which causes the generic
clockevents code to retry after adding the min_delta specified in
clockevents_config_and_register() to the current time value.

min_delta must be sufficient that we don't re-trip the -ETIME check - if
we do, we will return -ETIME, forward the next event time, try to set it,
return -ETIME again, and basically lock the system up. So, min_delta
must be larger than the check inside set_next_event(). A factor of two
was chosen to ensure that this situation would never occur.

The PXA code worked on PXA systems for years, and I'd suggest no one
changes this mechanism without access to a wide range of PXA systems,
otherwise they're risking breakage."

Cc: Russell King &lt;linux@arm.linux.org.uk&gt;
Acked-by: Alexey Charkov &lt;alchark@gmail.com&gt;
Signed-off-by: Roman Volkov &lt;rvolkov@v1ros.org&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit f9eccf24615672896dc13251410c3f2f33a14f95 upstream.

The vt8500 clocksource driver declares itself as capable to handle the
minimum delay of 4 cycles by passing the value into
clockevents_config_and_register(). The vt8500_timer_set_next_event()
requires the passed cycles value to be at least 16. The impact is that
userspace hangs in nanosleep() calls with small delay intervals.

This problem is reproducible in Linux 4.2 starting from:
c6eb3f70d448 ('hrtimer: Get rid of hrtimer softirq')

From Russell King, more detailed explanation:

"It's a speciality of the StrongARM/PXA hardware. It takes a certain
number of OSCR cycles for the value written to hit the compare registers.
So, if a very small delta is written (eg, the compare register is written
with a value of OSCR + 1), the OSCR will have incremented past this value
before it hits the underlying hardware. The result is, that you end up
waiting a very long time for the OSCR to wrap before the event fires.

So, we introduce a check in set_next_event() to detect this and return
-ETIME if the calculated delta is too small, which causes the generic
clockevents code to retry after adding the min_delta specified in
clockevents_config_and_register() to the current time value.

min_delta must be sufficient that we don't re-trip the -ETIME check - if
we do, we will return -ETIME, forward the next event time, try to set it,
return -ETIME again, and basically lock the system up. So, min_delta
must be larger than the check inside set_next_event(). A factor of two
was chosen to ensure that this situation would never occur.

The PXA code worked on PXA systems for years, and I'd suggest no one
changes this mechanism without access to a wide range of PXA systems,
otherwise they're risking breakage."

Cc: Russell King &lt;linux@arm.linux.org.uk&gt;
Acked-by: Alexey Charkov &lt;alchark@gmail.com&gt;
Signed-off-by: Roman Volkov &lt;rvolkov@v1ros.org&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>clocksource: make CLOCKSOURCE_OF_DECLARE type safe</title>
<updated>2013-03-28T11:01:06+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2013-03-19T14:38:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=3d5a96582303e28c48699f3faaf920ef7d43e6f2'/>
<id>3d5a96582303e28c48699f3faaf920ef7d43e6f2</id>
<content type='text'>
This ensures that a function pointer passed into CLOCKSOURCE_OF_DECLARE
takes the same arguments that we use for calling that function later.

Also fix the extraneous semicolon at end of the CLOCKSOURCE_OF_DECLARE
definition.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: Rob Herring &lt;rob.herring@calxeda.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This ensures that a function pointer passed into CLOCKSOURCE_OF_DECLARE
takes the same arguments that we use for calling that function later.

Also fix the extraneous semicolon at end of the CLOCKSOURCE_OF_DECLARE
definition.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: Rob Herring &lt;rob.herring@calxeda.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clocksource: pass DT node pointer to init functions</title>
<updated>2013-03-11T13:42:07+00:00</updated>
<author>
<name>Rob Herring</name>
<email>rob.herring@calxeda.com</email>
</author>
<published>2013-02-06T20:40:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=effbfdd7baf7babc73154b87a5ff940969cf6559'/>
<id>effbfdd7baf7babc73154b87a5ff940969cf6559</id>
<content type='text'>
In cases where we have multiple nodes of the same type, we may need the
node pointer to know which node was matched. Passing the node pointer
also keeps the init function from having to match the node a 2nd time.

Update bcm2835, vt8500, and tegra20 init functions for the new function
prototype. Further tegra20 clean-ups are in follow-up commit.

Signed-off-by: Rob Herring &lt;rob.herring@calxeda.com&gt;
Cc: John Stultz &lt;johnstul@us.ibm.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Tested-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: Tony Prisk &lt;linux@prisktech.co.nz&gt;
Tested-by: Michal Simek &lt;michal.simek@xilinx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In cases where we have multiple nodes of the same type, we may need the
node pointer to know which node was matched. Passing the node pointer
also keeps the init function from having to match the node a 2nd time.

Update bcm2835, vt8500, and tegra20 init functions for the new function
prototype. Further tegra20 clean-ups are in follow-up commit.

Signed-off-by: Rob Herring &lt;rob.herring@calxeda.com&gt;
Cc: John Stultz &lt;johnstul@us.ibm.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Tested-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: Tony Prisk &lt;linux@prisktech.co.nz&gt;
Tested-by: Michal Simek &lt;michal.simek@xilinx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'vt8500/timer' into next/cleanup</title>
<updated>2013-01-15T18:57:24+00:00</updated>
<author>
<name>Olof Johansson</name>
<email>olof@lixom.net</email>
</author>
<published>2013-01-15T18:56:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2ea0dde7653342d363144b17cb39932e27428e9a'/>
<id>2ea0dde7653342d363144b17cb39932e27428e9a</id>
<content type='text'>
* vt8500/timer:
  timer: vt8500: Convert vt8500 to use CLKSRC_OF

Signed-off-by: Olof Johansson &lt;olof@lixom.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* vt8500/timer:
  timer: vt8500: Convert vt8500 to use CLKSRC_OF

Signed-off-by: Olof Johansson &lt;olof@lixom.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>timer: vt8500: Convert vt8500 to use CLKSRC_OF</title>
<updated>2013-01-15T18:56:24+00:00</updated>
<author>
<name>Tony Prisk</name>
<email>linux@prisktech.co.nz</email>
</author>
<published>2013-01-15T06:50:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=41d16512ebea6938b95c5e4f2ae008914e91abc1'/>
<id>41d16512ebea6938b95c5e4f2ae008914e91abc1</id>
<content type='text'>
This patch converts arch-vt8500 to make use of CLKSRC_OF. Doing so
removes the need for include/linux/vt8500_timer.h as vt8500_timer_init
no longer needs to be visible outside vt8500_timer.c

Signed-off-by: Tony Prisk &lt;linux@prisktech.co.nz&gt;
Reviewed-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Signed-off-by: Olof Johansson &lt;olof@lixom.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch converts arch-vt8500 to make use of CLKSRC_OF. Doing so
removes the need for include/linux/vt8500_timer.h as vt8500_timer_init
no longer needs to be visible outside vt8500_timer.c

Signed-off-by: Tony Prisk &lt;linux@prisktech.co.nz&gt;
Reviewed-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Signed-off-by: Olof Johansson &lt;olof@lixom.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'vt8500/timer' of git://server.prisktech.co.nz/git/linuxwmt into next/cleanup</title>
<updated>2013-01-14T22:13:48+00:00</updated>
<author>
<name>Olof Johansson</name>
<email>olof@lixom.net</email>
</author>
<published>2013-01-14T22:13:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=175dbc1eeadbdcf5f04d3a61fdc0ede4335c45c8'/>
<id>175dbc1eeadbdcf5f04d3a61fdc0ede4335c45c8</id>
<content type='text'>
From Tony Prisk:
Move arch-vt8500/timer.c to drivers/clocksource/vt8500-timer.c

* tag 'vt8500/timer' of git://server.prisktech.co.nz/git/linuxwmt:
  timer: vt8500: Move timer code to drivers/clocksource

Signed-off-by: Olof Johansson &lt;olof@lixom.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
From Tony Prisk:
Move arch-vt8500/timer.c to drivers/clocksource/vt8500-timer.c

* tag 'vt8500/timer' of git://server.prisktech.co.nz/git/linuxwmt:
  timer: vt8500: Move timer code to drivers/clocksource

Signed-off-by: Olof Johansson &lt;olof@lixom.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>timer: vt8500: Move timer code to drivers/clocksource</title>
<updated>2013-01-14T04:58:21+00:00</updated>
<author>
<name>Tony Prisk</name>
<email>linux@prisktech.co.nz</email>
</author>
<published>2013-01-14T04:58:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ff7ec345f0ece9ddbb28538b70ba0c7f0acc17dc'/>
<id>ff7ec345f0ece9ddbb28538b70ba0c7f0acc17dc</id>
<content type='text'>
This patch moves arch-vt8500/timer.c into drivers/clocksource and
updates the necessary Kconfig/Makefile options.

Signed-off-by: Tony Prisk &lt;linux@prisktech.co.nz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch moves arch-vt8500/timer.c into drivers/clocksource and
updates the necessary Kconfig/Makefile options.

Signed-off-by: Tony Prisk &lt;linux@prisktech.co.nz&gt;
</pre>
</div>
</content>
</entry>
</feed>
