<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/char/rtc.c, branch v2.6.19</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/char/rtc.c?h=v2.6.19</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/char/rtc.c?h=v2.6.19'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2006-10-09T22:20:47Z</updated>
<entry>
<title>[RTC] Consistently use of tabs for formatting.</title>
<updated>2006-10-09T22:20:47Z</updated>
<author>
<name>Ralf Baechle</name>
<email>ralf@linux-mips.org</email>
</author>
<published>2006-10-09T22:20:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=12a0a703b3f07e5b01c81fe4f5d2a221c9318f16'/>
<id>urn:sha1:12a0a703b3f07e5b01c81fe4f5d2a221c9318f16</id>
<content type='text'>
</content>
</entry>
<entry>
<title>IRQ: Maintain regs pointer globally rather than passing to IRQ handlers</title>
<updated>2006-10-05T14:10:12Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2006-10-05T13:55:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7d12e780e003f93433d49ce78cfedf4b4c52adc5'/>
<id>urn:sha1:7d12e780e003f93433d49ce78cfedf4b4c52adc5</id>
<content type='text'>
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
of passing regs around manually through all ~1800 interrupt handlers in the
Linux kernel.

The regs pointer is used in few places, but it potentially costs both stack
space and code to pass it around.  On the FRV arch, removing the regs parameter
from all the genirq function results in a 20% speed up of the IRQ exit path
(ie: from leaving timer_interrupt() to leaving do_IRQ()).

Where appropriate, an arch may override the generic storage facility and do
something different with the variable.  On FRV, for instance, the address is
maintained in GR28 at all times inside the kernel as part of general exception
handling.

Having looked over the code, it appears that the parameter may be handed down
through up to twenty or so layers of functions.  Consider a USB character
device attached to a USB hub, attached to a USB controller that posts its
interrupts through a cascaded auxiliary interrupt controller.  A character
device driver may want to pass regs to the sysrq handler through the input
layer which adds another few layers of parameter passing.

I've build this code with allyesconfig for x86_64 and i386.  I've runtested the
main part of the code on FRV and i386, though I can't test most of the drivers.
I've also done partial conversion for powerpc and MIPS - these at least compile
with minimal configurations.

This will affect all archs.  Mostly the changes should be relatively easy.
Take do_IRQ(), store the regs pointer at the beginning, saving the old one:

	struct pt_regs *old_regs = set_irq_regs(regs);

And put the old one back at the end:

	set_irq_regs(old_regs);

Don't pass regs through to generic_handle_irq() or __do_IRQ().

In timer_interrupt(), this sort of change will be necessary:

	-	update_process_times(user_mode(regs));
	-	profile_tick(CPU_PROFILING, regs);
	+	update_process_times(user_mode(get_irq_regs()));
	+	profile_tick(CPU_PROFILING);

I'd like to move update_process_times()'s use of get_irq_regs() into itself,
except that i386, alone of the archs, uses something other than user_mode().

Some notes on the interrupt handling in the drivers:

 (*) input_dev() is now gone entirely.  The regs pointer is no longer stored in
     the input_dev struct.

 (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking.  It does
     something different depending on whether it's been supplied with a regs
     pointer or not.

 (*) Various IRQ handler function pointers have been moved to type
     irq_handler_t.

Signed-Off-By: David Howells &lt;dhowells@redhat.com&gt;
(cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
</content>
</entry>
<entry>
<title>[PATCH] remove unnecessary barrier in rtc_get_rtc_time</title>
<updated>2006-09-29T16:18:05Z</updated>
<author>
<name>Steven Rostedt</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2006-09-29T08:59:04Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=358333a0cb4a6d279806e38d0368b79066dbe5e7'/>
<id>urn:sha1:358333a0cb4a6d279806e38d0368b79066dbe5e7</id>
<content type='text'>
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] rtc: lockdep fix/workaround</title>
<updated>2006-09-26T00:38:35Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>a.p.zijlstra@chello.nl</email>
</author>
<published>2006-09-25T23:24:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0b16f21f144010aa627c58b3a33be49ebfd685dc'/>
<id>urn:sha1:0b16f21f144010aa627c58b3a33be49ebfd685dc</id>
<content type='text'>
BUG: warning at kernel/lockdep.c:1816/trace_hardirqs_on() (Not tainted)
 [&lt;c04051ee&gt;] show_trace_log_lvl+0x58/0x171
 [&lt;c0405802&gt;] show_trace+0xd/0x10
 [&lt;c040591b&gt;] dump_stack+0x19/0x1b
 [&lt;c043abee&gt;] trace_hardirqs_on+0xa2/0x11e
 [&lt;c06143c3&gt;] _spin_unlock_irq+0x22/0x26
 [&lt;c0541540&gt;] rtc_get_rtc_time+0x32/0x176
 [&lt;c0419ba4&gt;] hpet_rtc_interrupt+0x92/0x14d
 [&lt;c0450f94&gt;] handle_IRQ_event+0x20/0x4d
 [&lt;c0451055&gt;] __do_IRQ+0x94/0xef
 [&lt;c040678d&gt;] do_IRQ+0x9e/0xbd
 [&lt;c0404a49&gt;] common_interrupt+0x25/0x2c
DWARF2 unwinder stuck at common_interrupt+0x25/0x2c

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Acked-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: &lt;stable@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] lockdep: HPET/RTC fix</title>
<updated>2006-07-12T19:52:55Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2006-07-12T16:03:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0f74964627e0ece4ac8da0e2cd01906ec322b4fe'/>
<id>urn:sha1:0f74964627e0ece4ac8da0e2cd01906ec322b4fe</id>
<content type='text'>
Joseph Fannin reported that hpet_rtc_interrupt() enables hardirqs
in irq context:

[   25.628000]  [&lt;c014af4e&gt;] trace_hardirqs_on+0xce/0x200
[   25.628000]  [&lt;c036cf21&gt;] _spin_unlock_irq+0x31/0x70
[   25.628000]  [&lt;c0296584&gt;] rtc_get_rtc_time+0x44/0x1a0
[   25.628000]  [&lt;c01198bb&gt;] hpet_rtc_interrupt+0x21b/0x280
[   25.628000]  [&lt;c0161141&gt;] handle_IRQ_event+0x31/0x70
[   25.628000]  [&lt;c0162d37&gt;] handle_edge_irq+0xe7/0x210
[   25.628000]  [&lt;c0106192&gt;] do_IRQ+0x92/0x120
[   25.628000]  [&lt;c0104121&gt;] common_interrupt+0x25/0x2c

the call of rtc_get_rtc_time() is highly suspect. At a minimum we
need the patch below to save/restore hardirq state.

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Joseph Fannin &lt;jfannin@gmail.com&gt;
Cc: John Stultz &lt;johnstul@us.ibm.com&gt;
Cc: Arjan van de Ven &lt;arjan@linux.intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] char/rtc: Handle memory-mapped chips properly</title>
<updated>2006-07-10T20:24:25Z</updated>
<author>
<name>Maciej W. Rozycki</name>
<email>macro@linux-mips.org</email>
</author>
<published>2006-07-10T11:45:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=38e0e8c0550eaed1af48ec5ad9ddb8a25e8b04ae'/>
<id>urn:sha1:38e0e8c0550eaed1af48ec5ad9ddb8a25e8b04ae</id>
<content type='text'>
Handle memory-mapped chips properly, needed for example on DECstations.
This support was in Linux 2.4 but for some reason got lost in 2.6.  This
patch is taken directly from the linux-mips repository.

[akpm@osdl.org: cleanup]
Signed-off-by: Maciej W. Rozycki &lt;macro@linux-mips.org&gt;
Signed-off-by: Martin Michlmayr &lt;tbm@cyrius.com&gt;
Cc: Paul Gortmaker &lt;penguin@muskoka.com&gt;
Cc: Ralf Baechle &lt;ralf@linux-mips.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] make more file_operation structs static</title>
<updated>2006-07-03T22:26:59Z</updated>
<author>
<name>Arjan van de Ven</name>
<email>arjan@infradead.org</email>
</author>
<published>2006-07-03T07:24:21Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=62322d2554d2f9680c8ace7bbf1f97d8fa84ad1a'/>
<id>urn:sha1:62322d2554d2f9680c8ace7bbf1f97d8fa84ad1a</id>
<content type='text'>
Mark the static struct file_operations in drivers/char as const.  Making
them const prevents accidental bugs, and moves them to the .rodata section
so that they no longer do any false sharing; in addition with the proper
debug option they are then protected against corruption..

[akpm@osdl.org: build fix]
Signed-off-by: Arjan van de Ven &lt;arjan@linux.intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] irq-flags: drivers/char: Use the new IRQF_ constants</title>
<updated>2006-07-02T20:58:49Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2006-07-02T02:29:33Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0f2ed4c6bae23d2b7ef0ea2d272377e3de700c0c'/>
<id>urn:sha1:0f2ed4c6bae23d2b7ef0ea2d272377e3de700c0c</id>
<content type='text'>
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>Remove obsolete #include &lt;linux/config.h&gt;</title>
<updated>2006-06-30T17:25:36Z</updated>
<author>
<name>Jörn Engel</name>
<email>joern@wohnheim.fh-wedel.de</email>
</author>
<published>2006-06-30T17:25:36Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6ab3d5624e172c553004ecc862bfeac16d9d68b7'/>
<id>urn:sha1:6ab3d5624e172c553004ecc862bfeac16d9d68b7</id>
<content type='text'>
Signed-off-by: Jörn Engel &lt;joern@wohnheim.fh-wedel.de&gt;
Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
</content>
</entry>
<entry>
<title>[SPARC64]: Use in-kernel PROM tree for EBUS and ISA.</title>
<updated>2006-06-24T06:15:28Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@sunset.davemloft.net</email>
</author>
<published>2006-06-23T02:12:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=690c8fd31f1e35985d0f35772fde514da59ec9d1'/>
<id>urn:sha1:690c8fd31f1e35985d0f35772fde514da59ec9d1</id>
<content type='text'>
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
