<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/rtc/rtc-dev.c, branch v2.6.25</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=v2.6.25</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.25'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2008-02-06T18:41:13Z</updated>
<entry>
<title>rtc-cmos alarm acts as oneshot</title>
<updated>2008-02-06T18:41:13Z</updated>
<author>
<name>David Brownell</name>
<email>david-b@pacbell.net</email>
</author>
<published>2008-02-06T09:38:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8a0bdfd7a05f5bb0486fbe7146a2cf775957e95e'/>
<id>urn:sha1:8a0bdfd7a05f5bb0486fbe7146a2cf775957e95e</id>
<content type='text'>
Start making the rtc-cmos alarm act more like a oneshot alarm by disabling
that alarm after its IRQ fires.  (ACPI hooks are also needed.)

The Linux RTC framework has previously been a bit vague in this area, but
any other behavior is problematic and not very portable.  RTCs with full
YYYY-MM-DD HH:MM[:SS] alarms won't have a problem here.  Only ones with
partial match criteria, with the most visible example being the PC RTC, get
confused.  (Because the criteria will match repeatedly.)

Update comments relating to that oneshot behavior and timezone handling.
(Timezones are another issue that's mostly visible with rtc-cmos.  That's
because PCs often dual-boot MS-Windows, which likes its RTC to match local
wall-clock time instead of UTC.)

Signed-off-by: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
Cc: 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;
</content>
</entry>
<entry>
<title>RTC: assure proper memory ordering with respect to RTC_DEV_BUSY flag</title>
<updated>2007-12-05T17:21:18Z</updated>
<author>
<name>Jiri Kosina</name>
<email>jkosina@suse.cz</email>
</author>
<published>2007-12-05T07:45:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=372a302e9a892229206aafca0352584a745bc5f3'/>
<id>urn:sha1:372a302e9a892229206aafca0352584a745bc5f3</id>
<content type='text'>
We must make sure that the RTC_DEV_BUSY flag has proper lock semantics,
i.e.  that the RTC_DEV_BUSY stores clearing the flag don't get reordered
before the preceeding stores and loads and vice versa.

Spotted by Nick Piggin.

Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
Cc: Nick Piggin &lt;nickpiggin@yahoo.com.au&gt;
Cc: David Brownell &lt;david-b@pacbell.net&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;
</content>
</entry>
<entry>
<title>RTC: convert mutex to bitfield</title>
<updated>2007-11-29T17:24:54Z</updated>
<author>
<name>Jiri Kosina</name>
<email>jkosina@suse.cz</email>
</author>
<published>2007-11-29T00:22:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8853c202b4a91713dbfb4d9b6e1c87cc2aa12392'/>
<id>urn:sha1:8853c202b4a91713dbfb4d9b6e1c87cc2aa12392</id>
<content type='text'>
RTC code is using mutex to assure exclusive access to /dev/rtc.  This is
however wrong usage, as it leaves the mutex locked when returning into
userspace, which is unacceptable.

Convert rtc-&gt;char_lock into bit operation.

Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
Acked-by: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: David Brownell &lt;david-b@pacbell.net&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>rtc: allow validated RTC_PIE_ON for non-root</title>
<updated>2007-10-16T16:43:13Z</updated>
<author>
<name>Bryan Kadzban</name>
<email>bryan@kadzban.is-a-geek.net</email>
</author>
<published>2007-10-16T08:28:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9d013d3b14f4c81bdfe6c81fc506037d60007036'/>
<id>urn:sha1:9d013d3b14f4c81bdfe6c81fc506037d60007036</id>
<content type='text'>
drivers/char/rtc.c allowed RTC_PIE_ON ioctls for non-root users, as long as
the current interval (set via RTC_IRQP_SET) is &lt;= max_user_freq.  Allow
RTC_PIE_ON under the same conditions when /dev/rtc* is handled by the rtc
subsystem.

Signed-off-by: Bryan Kadzban &lt;bryan@kdzbn.homelinux.net&gt;
Acked-by: Alessandro Zummo &lt;alessandro.zummo@towertech.it&gt;
Cc: David Brownell &lt;david-b@pacbell.net&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>rtc-dev: no need to convert file-&gt;private_data to rtc device</title>
<updated>2007-10-16T16:43:13Z</updated>
<author>
<name>Mark Zhan</name>
<email>rongkai.zhan@windriver.com</email>
</author>
<published>2007-10-16T08:28:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=88efe137394f58fb5893013e123e4bcf444fd44b'/>
<id>urn:sha1:88efe137394f58fb5893013e123e4bcf444fd44b</id>
<content type='text'>
In rtc-dev.c, when a rtc device is opened, file-&gt;private_data is already
attached with the rtc device pointer, so there is no need to call
to_rtc_device() to convert file-&gt;private_data to a rtc device pointer.

Acked-by: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Signed-off-by: Mark Zhan &lt;rongkai.zhan@windriver.com&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>RTC: periodic irq fix</title>
<updated>2007-10-16T16:43:13Z</updated>
<author>
<name>Alessandro Zummo</name>
<email>alessandro.zummo@towertech.it</email>
</author>
<published>2007-10-16T08:28:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d691eb901e044065de10756ea78a5758d457c7fd'/>
<id>urn:sha1:d691eb901e044065de10756ea78a5758d457c7fd</id>
<content type='text'>
Add kernel/kernel and kernel/user locking for the periodic irq feature of
the rtc class.

PIE ioctls are also supported.

Signed-off-by: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: David Brownell &lt;david-b@pacbell.net&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>rtc-dev: Make RTC driver return ENOTTY instead of ENOIOCTLCMD</title>
<updated>2007-07-31T22:39:36Z</updated>
<author>
<name>Thomas Hommel</name>
<email>thomas.hommel@gefanuc.com</email>
</author>
<published>2007-07-31T07:37:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c8ed39ebe0cf490abd7bf7c77b728dd6fefb2cf8'/>
<id>urn:sha1:c8ed39ebe0cf490abd7bf7c77b728dd6fefb2cf8</id>
<content type='text'>
Prevent the RTC driver from returning ENOIOCTLCMD to userspace.

Signed-off-by: Thomas Hommel &lt;thomas.hommel@gefanuc.com&gt;
Acked-by: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: David Brownell &lt;david-b@pacbell.net&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>rtc-dev: return -ENOTTY in ioctl if irq_set_freq is not implemented by driver</title>
<updated>2007-07-17T17:23:09Z</updated>
<author>
<name>Hans-Christian Egtvedt</name>
<email>hcegtvedt@atmel.com</email>
</author>
<published>2007-07-17T11:05:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ac495bf8971f2dc9d401d892849977e86633ced6'/>
<id>urn:sha1:ac495bf8971f2dc9d401d892849977e86633ced6</id>
<content type='text'>
Signed-off-by: Hans-Christian Egtvedt &lt;hcegtvedt@atmel.com&gt;
Cc: Haavard Skinnemoen &lt;hskinnemoen@atmel.com&gt;
Cc: David Brownell &lt;david-b@pacbell.net&gt;
Cc: 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;
</content>
</entry>
<entry>
<title>rtc: remove "RTC_ALM_SET mode" bugs</title>
<updated>2007-05-08T18:15:19Z</updated>
<author>
<name>David Brownell</name>
<email>david-b@pacbell.net</email>
</author>
<published>2007-05-08T07:34:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f8245c26886c912627ebc49f714e4491261224c4'/>
<id>urn:sha1:f8245c26886c912627ebc49f714e4491261224c4</id>
<content type='text'>
This fixes a common glitch in how RTC drivers handle two "set alarm" modes,
by getting rid of the surprising/hidden one that was rarely implemented
correctly (and which could expose nonportable hardware-specific behavior).

The glitch comes from the /dev/rtcX logic implementing the legacy
RTC_ALM_SET (limited to 24 hours, needing RTC_AIE_ON) ioctl on top of the
RTC driver call providing access to the newer RTC_WKALM_SET (without those
limitations) by initializing the day/month/year fields to be invalid ...
that second mode.

Now, since few RTC drivers check those fields, and most hardware misbehaves
when faced with invalid date fields, many RTC drivers will set bogus alarm
times on those RTC_ALM_SET code paths.  (Several in-tree drivers have that
issue, and I also noticed it with code reviews on several new RTC drivers.)

This patch ensures that RTC drivers never see such invalid alarm fields, by
moving some logic out of rtc-omap into the RTC_ALM_SET code and adding an
explicit check (which will prevent the issue on other code paths).

Signed-off-by: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
Cc: Scott Wood &lt;scottwood@freescale.com&gt;
Cc: 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;
</content>
</entry>
<entry>
<title>rtc: update to class device removal patches</title>
<updated>2007-05-08T18:15:18Z</updated>
<author>
<name>David Brownell</name>
<email>david-b@pacbell.net</email>
</author>
<published>2007-05-08T07:33:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cb3a58d2acc042f62cde932add8e1f9ed508368d'/>
<id>urn:sha1:cb3a58d2acc042f62cde932add8e1f9ed508368d</id>
<content type='text'>
Fix a goof in the revised classdev support for RTCs: make sure the /dev
node info is ready before the device is registered, not after.  Otherwise
the /sys/class/rtc/rtcN/dev attribute won't be created and then udev won't
have the information it needs to create the /dev/rtcN node.

Signed-off-by: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
Cc: 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;
</content>
</entry>
</feed>
