<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/rtc, branch v3.2.2</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/rtc?h=v3.2.2</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/rtc?h=v3.2.2'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-01-26T00:13:06Z</updated>
<entry>
<title>drivers/rtc/interface.c: fix alarm rollover when day or month is out-of-range</title>
<updated>2012-01-26T00:13:06Z</updated>
<author>
<name>Ben Hutchings</name>
<email>ben@decadent.org.uk</email>
</author>
<published>2012-01-10T23:11:02Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=36a8176166397d103352670327e1b20d334b5c7d'/>
<id>urn:sha1:36a8176166397d103352670327e1b20d334b5c7d</id>
<content type='text'>
commit e74a8f2edb92cb690b467cea0ab652c509e9f624 upstream.

Commit f44f7f96a20a ("RTC: Initialize kernel state from RTC") introduced a
potential infinite loop.  If an alarm time contains a wildcard month and
an invalid day (&gt; 31), or a wildcard year and an invalid month (&gt;= 12),
the loop searching for the next matching date will never terminate.  Treat
the invalid values as wildcards.

Fixes &lt;http://bugs.debian.org/646429&gt;, &lt;http://bugs.debian.org/653331&gt;

Reported-by: leo weppelman &lt;leoweppelman@googlemail.com&gt;
Reported-by: "P. van Gaans" &lt;mailme667@yahoo.co.uk&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Cc: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Cc: Marcelo Roberto Jimenez &lt;mroberto@cpti.cetuc.puc-rio.br&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: John Stultz &lt;john.stultz@linaro.org&gt;
Acked-by: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>Revert "rtc: Expire alarms after the time is set."</title>
<updated>2012-01-04T15:57:22Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-01-04T15:57:22Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f423fc627b05f47bc9305f9661630fce30f208f9'/>
<id>urn:sha1:f423fc627b05f47bc9305f9661630fce30f208f9</id>
<content type='text'>
This reverts commit 93b2ec0128c431148b216b8f7337c1a52131ef03.

The call to "schedule_work()" in rtc_initialize_alarm() happens too
early, and can cause oopses at bootup

Neil Brown explains why we do it:

  "If you set an alarm in the future, then shutdown and boot again after
   that time, then you will end up with a timer_queue node which is in
   the past.

   When this happens the queue gets stuck.  That entry-in-the-past won't
   get removed until and interrupt happens and an interrupt won't happen
   because the RTC only triggers an interrupt when the alarm is "now".

   So you'll find that e.g.  "hwclock" will always tell you that
   'select' timed out.

   So we force the interrupt work to happen at the start just in case."

and has a patch that convert it to do things in-process rather than with
the worker thread, but right now it's too late to play around with this,
so we just revert the patch that caused problems for now.

Reported-by: Sander Eikelenboom &lt;linux@eikelenboom.it&gt;
Requested-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Requested-by: John Stultz &lt;john.stultz@linaro.org&gt;
Cc: Neil Brown &lt;neilb@suse.de&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Revert "rtc: Disable the alarm in the hardware"</title>
<updated>2012-01-04T01:32:13Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-01-04T01:32:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=157e8bf8b4823bfcdefa6c1548002374b61f61df'/>
<id>urn:sha1:157e8bf8b4823bfcdefa6c1548002374b61f61df</id>
<content type='text'>
This reverts commit c0afabd3d553c521e003779c127143ffde55a16f.

It causes failures on Toshiba laptops - instead of disabling the alarm,
it actually seems to enable it on the affected laptops, resulting in
(for example) the laptop powering on automatically five minutes after
shutdown.

There's a patch for it that appears to work for at least some people,
but it's too late to play around with this, so revert for now and try
again in the next merge window.

See for example

	http://bugs.debian.org/652869

Reported-and-bisected-by: Andreas Friedrich &lt;afrie@gmx.net&gt; (Toshiba Tecra)
Reported-by: Antonio-M. Corbi Bellot &lt;antonio.corbi@ua.es&gt; (Toshiba Portege R500)
Reported-by: Marco Santos &lt;marco.santos@waynext.com&gt; (Toshiba Portege Z830)
Reported-by: Christophe Vu-Brugier &lt;cvubrugier@yahoo.fr&gt;  (Toshiba Portege R830)
Cc: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Requested-by: John Stultz &lt;john.stultz@linaro.org&gt;
Cc: stable@kernel.org  # for the versions that applied this
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2011-12-20T19:42:38Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-12-20T19:42:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5fbd305dd2b661a243013cf444d2a32bfec2f701'/>
<id>urn:sha1:5fbd305dd2b661a243013cf444d2a32bfec2f701</id>
<content type='text'>
* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  time/clocksource: Fix kernel-doc warnings
  rtc: m41t80: Workaround broken alarm functionality
  rtc: Expire alarms after the time is set.
</content>
</entry>
<entry>
<title>rtc: m41t80: Workaround broken alarm functionality</title>
<updated>2011-12-13T20:26:24Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2011-12-12T21:57:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c3b79770e51ab1fd4201f3b54edf30113b9ce74f'/>
<id>urn:sha1:c3b79770e51ab1fd4201f3b54edf30113b9ce74f</id>
<content type='text'>
The m41t80 driver can read and set the alarm, but it doesn't
seem to have a functional alarm irq.

This causes failures when the generic core sees alarm functions,
but then cannot use them properly for things like UIE mode.

Disabling the alarm functions allows proper error reporting,
and possible fallback to emulated modes. Once someone fixes
the alarm irq functionality, this can be restored.

CC: stable@kernel.org
CC: Matt Turner &lt;mattst88@gmail.com&gt;
CC: Nico Macrionitis &lt;acrux@cruxppc.org&gt;
CC: Atsushi Nemoto &lt;anemo@mba.ocn.ne.jp&gt;
Reported-by: Matt Turner &lt;mattst88@gmail.com&gt;
Reported-by: Nico Macrionitis &lt;acrux@cruxppc.org&gt;
Tested-by: Nico Macrionitis &lt;acrux@cruxppc.org&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>rtc: Expire alarms after the time is set.</title>
<updated>2011-12-13T20:26:11Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2011-12-08T22:39:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=93b2ec0128c431148b216b8f7337c1a52131ef03'/>
<id>urn:sha1:93b2ec0128c431148b216b8f7337c1a52131ef03</id>
<content type='text'>
If the alarm time programming in the rtc is ever in the past, it won't fire,
and any other alarm will be queued after it so they won't fire either.

So any time that the alarm might be in the past, we need to trigger
the irq handler to ensure the old alarm is cleared and the timer queue
is fully in the future.

This can happen:
 - when we first initialise the alarm
 - when we set the time in the rtc.

so follow both of these by scheduling the timer work function.

CC: stable@kernel.org
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
[Also catch set_mmss case -jstultz]
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>drivers/rtc/rtc-s3c.c: fix driver clock enable/disable balance issues</title>
<updated>2011-12-09T15:50:28Z</updated>
<author>
<name>Jonghwan Choi</name>
<email>jhbird.choi@samsung.com</email>
</author>
<published>2011-12-08T22:34:02Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2dbcd05f1e9e0932833d16dab1696176fc164b07'/>
<id>urn:sha1:2dbcd05f1e9e0932833d16dab1696176fc164b07</id>
<content type='text'>
If an error occurs after the clock is enabled, the enable/disable state
can become unbalanced.

Signed-off-by: Jonghwan Choi &lt;jhbird.choi@samsung.com&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Acked-by: Kukjin Kim &lt;kgene.kim@samsung.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2011-12-06T00:53:43Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-12-06T00:53:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=40c043b077c6e377c8440d71563c055d0c4f0f0a'/>
<id>urn:sha1:40c043b077c6e377c8440d71563c055d0c4f0f0a</id>
<content type='text'>
* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  clockevents: Set noop handler in clockevents_exchange_device()
  tick-broadcast: Stop active broadcast device when replacing it
  clocksource: Fix bug with max_deferment margin calculation
  rtc: Fix some bugs that allowed accumulating time drift in suspend/resume
  rtc: Disable the alarm in the hardware
</content>
</entry>
<entry>
<title>rtc: Fix some bugs that allowed accumulating time drift in suspend/resume</title>
<updated>2011-11-23T03:25:56Z</updated>
<author>
<name>Arve Hjønnevåg</name>
<email>arve@android.com</email>
</author>
<published>2011-11-23T02:24:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6a8943d9ec2567572fca25cf69ad45844d0141a3'/>
<id>urn:sha1:6a8943d9ec2567572fca25cf69ad45844d0141a3</id>
<content type='text'>
The current code checks if abs(delta_delta.tv_sec) is greater or
equal to two before it discards the old delta value, but this can
trigger at close to -1 seconds since -1.000000001 seconds is stored
as tv_sec -2 and tv_nsec 999999999 in a normalized timespec.

rtc_resume had an early return check if the rtc value had not changed
since rtc_suspend. This effectivly stops time for the duration of the
short sleep. Check if sleep_time is positive after all the adjustments
have been applied instead since this allows the old_system adjustment
in rtc_suspend to have an effect even for short sleep cycles.

CC: stable@kernel.org
Signed-off-by: Arve Hjønnevåg &lt;arve@android.com&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>rtc: Disable the alarm in the hardware</title>
<updated>2011-11-23T03:25:43Z</updated>
<author>
<name>Rabin Vincent</name>
<email>rabin.vincent@stericsson.com</email>
</author>
<published>2011-11-22T10:03:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c0afabd3d553c521e003779c127143ffde55a16f'/>
<id>urn:sha1:c0afabd3d553c521e003779c127143ffde55a16f</id>
<content type='text'>
Currently, the RTC code does not disable the alarm in the hardware.

This means that after a sequence such as the one below (the files are in the
RTC sysfs), the box will boot up after 2 minutes even though we've
asked for the alarm to be turned off.

	# echo $((`cat since_epoch`)+120) &gt; wakealarm
	# echo 0 &gt; wakealarm
	# poweroff

Fix this by disabling the alarm when there are no timers to run.

Cc: stable@kernel.org
Cc: John Stultz &lt;john.stultz@linaro.org&gt;
Signed-off-by: Rabin Vincent &lt;rabin.vincent@stericsson.com&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
</feed>
