<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/include/asm-generic/rtc.h, branch tegra-9.12.13</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>alpha: fix RTC on marvel</title>
<updated>2009-01-16T00:39:40+00:00</updated>
<author>
<name>Ivan Kokshaysky</name>
<email>ink@jurassic.park.msu.ru</email>
</author>
<published>2009-01-15T21:51:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5f7dc5d75076fd1c1fc6bc09f2467509d20db24a'/>
<id>5f7dc5d75076fd1c1fc6bc09f2467509d20db24a</id>
<content type='text'>
Unlike other alphas, marvel doesn't have real PC-style CMOS clock hardware
- RTC accesses are emulated via PAL calls.  Unfortunately, for unknown
reason these calls work only on CPU #0.  So current implementation for
arbitrary CPU makes CMOS_READ/WRITE to be executed on CPU #0 via IPI.
However, for obvious reason this doesn't work with standard
get/set_rtc_time() functions, where a bunch of CMOS accesses is done with
disabled interrupts.

Solved by making the IPI calls for entire get/set_rtc_time() functions,
not for individual CMOS accesses.  Which is also a lot more effective
performance-wise.

The patch is largely based on the code from Jay Estabrook.
My changes:
- tweak asm-generic/rtc.h by adding a couple of #defines to
  avoid a massive code duplication in arch/alpha/include/asm/rtc.h;
- sys_marvel.c: fix get/set_rtc_time() return values (Jay's FIXMEs).

NOTE: this fixes *only* LIB_RTC drivers.  Legacy (CONFIG_RTC) driver
wont't work on marvel.  Actually I think that we should just disable
CONFIG_RTC on alpha (maybe in 2.6.30?), like most other arches - AFAIK,
all modern distributions use LIB_RTC anyway.

Signed-off-by: Ivan Kokshaysky &lt;ink@jurassic.park.msu.ru&gt;
Cc: Richard Henderson &lt;rth@twiddle.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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Unlike other alphas, marvel doesn't have real PC-style CMOS clock hardware
- RTC accesses are emulated via PAL calls.  Unfortunately, for unknown
reason these calls work only on CPU #0.  So current implementation for
arbitrary CPU makes CMOS_READ/WRITE to be executed on CPU #0 via IPI.
However, for obvious reason this doesn't work with standard
get/set_rtc_time() functions, where a bunch of CMOS accesses is done with
disabled interrupts.

Solved by making the IPI calls for entire get/set_rtc_time() functions,
not for individual CMOS accesses.  Which is also a lot more effective
performance-wise.

The patch is largely based on the code from Jay Estabrook.
My changes:
- tweak asm-generic/rtc.h by adding a couple of #defines to
  avoid a massive code duplication in arch/alpha/include/asm/rtc.h;
- sys_marvel.c: fix get/set_rtc_time() return values (Jay's FIXMEs).

NOTE: this fixes *only* LIB_RTC drivers.  Legacy (CONFIG_RTC) driver
wont't work on marvel.  Actually I think that we should just disable
CONFIG_RTC on alpha (maybe in 2.6.30?), like most other arches - AFAIK,
all modern distributions use LIB_RTC anyway.

Signed-off-by: Ivan Kokshaysky &lt;ink@jurassic.park.msu.ru&gt;
Cc: Richard Henderson &lt;rth@twiddle.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: use bcd2bin/bin2bcd</title>
<updated>2008-10-20T15:52:41+00:00</updated>
<author>
<name>Adrian Bunk</name>
<email>bunk@kernel.org</email>
</author>
<published>2008-10-19T03:28:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=357c6e63590895dc87cc9300f5a1c27544ea69e8'/>
<id>357c6e63590895dc87cc9300f5a1c27544ea69e8</id>
<content type='text'>
Change various rtc related code to use the new bcd2bin/bin2bcd functions
instead of the obsolete BCD_TO_BIN/BIN_TO_BCD/BCD2BIN/BIN2BCD macros.

Signed-off-by: Adrian Bunk &lt;bunk@kernel.org&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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change various rtc related code to use the new bcd2bin/bin2bcd functions
instead of the obsolete BCD_TO_BIN/BIN_TO_BCD/BCD2BIN/BIN2BCD macros.

Signed-off-by: Adrian Bunk &lt;bunk@kernel.org&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;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: fix deadlock</title>
<updated>2008-08-23T16:02:18+00:00</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2008-08-23T15:59:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=38c052f8cff1bd323ccfa968136a9556652ee420'/>
<id>38c052f8cff1bd323ccfa968136a9556652ee420</id>
<content type='text'>
if get_rtc_time() is _ever_ called with IRQs off, we deadlock badly
in it, waiting for jiffies to increment.

So make the code more robust by doing an explicit mdelay(20).

This solves a very hard to reproduce/debug hard lockup reported
by Mikael Pettersson.

Reported-by: Mikael Pettersson &lt;mikpe@it.uu.se&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
if get_rtc_time() is _ever_ called with IRQs off, we deadlock badly
in it, waiting for jiffies to increment.

So make the code more robust by doing an explicit mdelay(20).

This solves a very hard to reproduce/debug hard lockup reported
by Mikael Pettersson.

Reported-by: Mikael Pettersson &lt;mikpe@it.uu.se&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>remove __KERNEL__ tests of unexported headers under asm-generic/</title>
<updated>2008-04-30T15:29:54+00:00</updated>
<author>
<name>Robert P. J. Day</name>
<email>rpjday@crashcourse.ca</email>
</author>
<published>2008-04-30T07:55:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ae50884f66fc93aa713feade8f87c03471241275'/>
<id>ae50884f66fc93aa713feade8f87c03471241275</id>
<content type='text'>
Signed-off-by: Robert P. J. Day &lt;rpjday@crashcourse.ca&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Robert P. J. Day &lt;rpjday@crashcourse.ca&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>x86: fix RTC lockdep warning: potential hardirq recursion</title>
<updated>2008-02-04T15:48:10+00:00</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@linux-foundation.org</email>
</author>
<published>2008-02-04T15:48:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=795d45b22c079946332bf3825afefe5a981a97b6'/>
<id>795d45b22c079946332bf3825afefe5a981a97b6</id>
<content type='text'>
After disabling both CONFIG_DEBUG_LOCKING_API_SELFTESTS and netconsole
(using current mainline) I get a login prompt, and also...

[    5.181668] SELinux: policy loaded with handle_unknown=deny
[    5.183315] type=1403 audit(1202100038.157:3): policy loaded auid=4294967295 ses=4294967295
[    5.822073] SELinux: initialized (dev usbfs, type usbfs), uses genfs_contexts
[    7.819146] ------------[ cut here ]------------
[    7.819146] WARNING: at kernel/lockdep.c:2033 trace_hardirqs_on+0x9b/0x10d()
[    7.819146] Modules linked in: generic ext3 jbd ide_disk ide_core
[    7.819146] Pid: 399, comm: hwclock Not tainted 2.6.24 #4
[    7.819146]  [&lt;c011d140&gt;] warn_on_slowpath+0x41/0x51
[    7.819146]  [&lt;c01364a9&gt;] ? lock_release_holdtime+0x50/0x56
[    7.819146]  [&lt;c013770c&gt;] ? check_usage_forwards+0x19/0x3b
[    7.819146]  [&lt;c01390c4&gt;] ? __lock_acquire+0xac3/0xb0b
[    7.819146]  [&lt;c0108c98&gt;] ? native_sched_clock+0x8b/0x9f
[    7.819146]  [&lt;c01364a9&gt;] ? lock_release_holdtime+0x50/0x56
[    7.819146]  [&lt;c030ca6c&gt;] ? _spin_unlock_irq+0x22/0x42
[    7.819146]  [&lt;c013848b&gt;] trace_hardirqs_on+0x9b/0x10d
[    7.819146]  [&lt;c030ca6c&gt;] _spin_unlock_irq+0x22/0x42
[    7.819146]  [&lt;c011481e&gt;] hpet_rtc_interrupt+0xdf/0x290
[    7.819146]  [&lt;c014ea90&gt;] handle_IRQ_event+0x1a/0x46
[    7.819146]  [&lt;c014f8ea&gt;] handle_edge_irq+0xbe/0xff
[    7.819146]  [&lt;c0106e08&gt;] do_IRQ+0x6d/0x84
[    7.819146]  [&lt;c0105596&gt;] common_interrupt+0x2e/0x34
[    7.819146]  [&lt;c013007b&gt;] ? ktime_get_ts+0x8/0x3f
[    7.819146]  [&lt;c0139420&gt;] ? lock_release+0x167/0x16f
[    7.819146]  [&lt;c017974a&gt;] ? core_sys_select+0x2c/0x327
[    7.819146]  [&lt;c0179792&gt;] core_sys_select+0x74/0x327
[    7.819146]  [&lt;c0108c98&gt;] ? native_sched_clock+0x8b/0x9f
[    7.819146]  [&lt;c01364a9&gt;] ? lock_release_holdtime+0x50/0x56
[    7.819146]  [&lt;c030ca6c&gt;] ? _spin_unlock_irq+0x22/0x42
[    7.819146]  [&lt;c01384d6&gt;] ? trace_hardirqs_on+0xe6/0x10d
[    7.819146]  [&lt;c030ca77&gt;] ? _spin_unlock_irq+0x2d/0x42
[    7.819146]  [&lt;c023b437&gt;] ? rtc_do_ioctl+0x11b/0x677
[    7.819146]  [&lt;c01c487e&gt;] ? inode_has_perm+0x5e/0x68
[    7.819146]  [&lt;c01364a9&gt;] ? lock_release_holdtime+0x50/0x56
[    7.819146]  [&lt;c0108c98&gt;] ? native_sched_clock+0x8b/0x9f
[    7.819146]  [&lt;c01c490b&gt;] ? file_has_perm+0x83/0x8c
[    7.819146]  [&lt;c023ba08&gt;] ? rtc_ioctl+0xf/0x11
[    7.819146]  [&lt;c017898d&gt;] ? do_ioctl+0x55/0x67
[    7.819146]  [&lt;c0179d15&gt;] sys_select+0x93/0x163
[    7.819146]  [&lt;c0104b39&gt;] ? sysenter_past_esp+0x9a/0xa5
[    7.819146]  [&lt;c0104afe&gt;] sysenter_past_esp+0x5f/0xa5
[    7.819146]  =======================
[    7.819146] ---[ end trace 96540ca301ffb84c ]---
[    7.819210] rtc: lost 6 interrupts
[    7.870668] type=1400 audit(1202128840.794:4): avc:  denied  { audit_write } for  pid=399 comm="hwclock" capability=29 scontext=system_u:system_r:hwclock_t:s0 tcontext=system_u:system_r:hwclock_t:s0 tclass=capability
[    9.538866] input: PC Speaker as /class/input/input5

Because hpet_rtc_interrupt()'s call to get_rtc_time() ends up
resolving to include/asm-generic/rtc.h's (hilariously inlined)
get_rtc_time(), which does spin_unlock_irq() from hard IRQ context.

The obvious patch fixes it.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
After disabling both CONFIG_DEBUG_LOCKING_API_SELFTESTS and netconsole
(using current mainline) I get a login prompt, and also...

[    5.181668] SELinux: policy loaded with handle_unknown=deny
[    5.183315] type=1403 audit(1202100038.157:3): policy loaded auid=4294967295 ses=4294967295
[    5.822073] SELinux: initialized (dev usbfs, type usbfs), uses genfs_contexts
[    7.819146] ------------[ cut here ]------------
[    7.819146] WARNING: at kernel/lockdep.c:2033 trace_hardirqs_on+0x9b/0x10d()
[    7.819146] Modules linked in: generic ext3 jbd ide_disk ide_core
[    7.819146] Pid: 399, comm: hwclock Not tainted 2.6.24 #4
[    7.819146]  [&lt;c011d140&gt;] warn_on_slowpath+0x41/0x51
[    7.819146]  [&lt;c01364a9&gt;] ? lock_release_holdtime+0x50/0x56
[    7.819146]  [&lt;c013770c&gt;] ? check_usage_forwards+0x19/0x3b
[    7.819146]  [&lt;c01390c4&gt;] ? __lock_acquire+0xac3/0xb0b
[    7.819146]  [&lt;c0108c98&gt;] ? native_sched_clock+0x8b/0x9f
[    7.819146]  [&lt;c01364a9&gt;] ? lock_release_holdtime+0x50/0x56
[    7.819146]  [&lt;c030ca6c&gt;] ? _spin_unlock_irq+0x22/0x42
[    7.819146]  [&lt;c013848b&gt;] trace_hardirqs_on+0x9b/0x10d
[    7.819146]  [&lt;c030ca6c&gt;] _spin_unlock_irq+0x22/0x42
[    7.819146]  [&lt;c011481e&gt;] hpet_rtc_interrupt+0xdf/0x290
[    7.819146]  [&lt;c014ea90&gt;] handle_IRQ_event+0x1a/0x46
[    7.819146]  [&lt;c014f8ea&gt;] handle_edge_irq+0xbe/0xff
[    7.819146]  [&lt;c0106e08&gt;] do_IRQ+0x6d/0x84
[    7.819146]  [&lt;c0105596&gt;] common_interrupt+0x2e/0x34
[    7.819146]  [&lt;c013007b&gt;] ? ktime_get_ts+0x8/0x3f
[    7.819146]  [&lt;c0139420&gt;] ? lock_release+0x167/0x16f
[    7.819146]  [&lt;c017974a&gt;] ? core_sys_select+0x2c/0x327
[    7.819146]  [&lt;c0179792&gt;] core_sys_select+0x74/0x327
[    7.819146]  [&lt;c0108c98&gt;] ? native_sched_clock+0x8b/0x9f
[    7.819146]  [&lt;c01364a9&gt;] ? lock_release_holdtime+0x50/0x56
[    7.819146]  [&lt;c030ca6c&gt;] ? _spin_unlock_irq+0x22/0x42
[    7.819146]  [&lt;c01384d6&gt;] ? trace_hardirqs_on+0xe6/0x10d
[    7.819146]  [&lt;c030ca77&gt;] ? _spin_unlock_irq+0x2d/0x42
[    7.819146]  [&lt;c023b437&gt;] ? rtc_do_ioctl+0x11b/0x677
[    7.819146]  [&lt;c01c487e&gt;] ? inode_has_perm+0x5e/0x68
[    7.819146]  [&lt;c01364a9&gt;] ? lock_release_holdtime+0x50/0x56
[    7.819146]  [&lt;c0108c98&gt;] ? native_sched_clock+0x8b/0x9f
[    7.819146]  [&lt;c01c490b&gt;] ? file_has_perm+0x83/0x8c
[    7.819146]  [&lt;c023ba08&gt;] ? rtc_ioctl+0xf/0x11
[    7.819146]  [&lt;c017898d&gt;] ? do_ioctl+0x55/0x67
[    7.819146]  [&lt;c0179d15&gt;] sys_select+0x93/0x163
[    7.819146]  [&lt;c0104b39&gt;] ? sysenter_past_esp+0x9a/0xa5
[    7.819146]  [&lt;c0104afe&gt;] sysenter_past_esp+0x5f/0xa5
[    7.819146]  =======================
[    7.819146] ---[ end trace 96540ca301ffb84c ]---
[    7.819210] rtc: lost 6 interrupts
[    7.870668] type=1400 audit(1202128840.794:4): avc:  denied  { audit_write } for  pid=399 comm="hwclock" capability=29 scontext=system_u:system_r:hwclock_t:s0 tcontext=system_u:system_r:hwclock_t:s0 tclass=capability
[    9.538866] input: PC Speaker as /class/input/input5

Because hpet_rtc_interrupt()'s call to get_rtc_time() ends up
resolving to include/asm-generic/rtc.h's (hilariously inlined)
get_rtc_time(), which does spin_unlock_irq() from hard IRQ context.

The obvious patch fixes it.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fix file specification in comments</title>
<updated>2006-10-03T21:01:26+00:00</updated>
<author>
<name>Uwe Zeisberger</name>
<email>Uwe_Zeisberger@digi.com</email>
</author>
<published>2006-10-03T21:01:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f30c2269544bffc7bf1b0d7c0abe5be1be83b8cb'/>
<id>f30c2269544bffc7bf1b0d7c0abe5be1be83b8cb</id>
<content type='text'>
Many files include the filename at the beginning, serveral used a wrong one.

Signed-off-by: Uwe Zeisberger &lt;Uwe_Zeisberger@digi.com&gt;
Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Many files include the filename at the beginning, serveral used a wrong one.

Signed-off-by: Uwe Zeisberger &lt;Uwe_Zeisberger@digi.com&gt;
Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add some basic resume trace facilities</title>
<updated>2006-06-24T21:44:01+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@g5.osdl.org</email>
</author>
<published>2006-06-24T21:27:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=eb71c87a492b7090ff9e8ac46912c480a1687e38'/>
<id>eb71c87a492b7090ff9e8ac46912c480a1687e38</id>
<content type='text'>
Considering that there isn't a lot of hw we can depend on during resume,
this is about as good as it gets.

This is x86-only for now, although the basic concept (and most of the
code) will certainly work on almost any platform.

Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Considering that there isn't a lot of hw we can depend on during resume,
this is about as good as it gets.

This is x86-only for now, although the basic concept (and most of the
code) will certainly work on almost any platform.

Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Linux-2.6.12-rc2</title>
<updated>2005-04-16T22:20:36+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@ppc970.osdl.org</email>
</author>
<published>2005-04-16T22:20:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1da177e4c3f41524e886b7f1b8a0c1fc7321cac2'/>
<id>1da177e4c3f41524e886b7f1b8a0c1fc7321cac2</id>
<content type='text'>
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!
</pre>
</div>
</content>
</entry>
</feed>
