<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/include/linux/rtc.h, branch v2.6.19.2</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v2.6.19.2</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v2.6.19.2'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2006-10-05T14:10:12+00:00</updated>
<entry>
<title>IRQ: Maintain regs pointer globally rather than passing to IRQ handlers</title>
<updated>2006-10-05T14:10:12+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2006-10-05T13:55:46+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/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] constify rtc_class_ops: update drivers</title>
<updated>2006-10-01T07:39:25+00:00</updated>
<author>
<name>David Brownell</name>
<email>david-b@pacbell.net</email>
</author>
<published>2006-10-01T06:28:17+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=ff8371ac9a5a55c956991fed8e5f58640c7a32f3'/>
<id>urn:sha1:ff8371ac9a5a55c956991fed8e5f58640c7a32f3</id>
<content type='text'>
Update RTC framework so that drivers can constify their method tables, moving
them from ".data" to ".rodata".  Then update the drivers.

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@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] Correct rtc_wkalrm comments</title>
<updated>2006-06-30T18:25:38+00:00</updated>
<author>
<name>Andrew Victor</name>
<email>andrew@sanpeople.com</email>
</author>
<published>2006-06-30T08:56:01+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=304228e29ae212952726e91511eddc0ba551bd31'/>
<id>urn:sha1:304228e29ae212952726e91511eddc0ba551bd31</id>
<content type='text'>
This corrects the comments describing the 'enabled' and 'pending' flags in
struct rtc_wkalrm of include/linux/rtc.h.

Signed-off-by: Andrew Victor &lt;andrew@sanpeople.com&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&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: Add rtc_year_days() to calculate tm_yday</title>
<updated>2006-06-25T17:01:14+00:00</updated>
<author>
<name>Andrew Victor</name>
<email>andrew@sanpeople.com</email>
</author>
<published>2006-06-25T12:48:25+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=8232212e0b4ee4eb3e407f5a9b098f6377820164'/>
<id>urn:sha1:8232212e0b4ee4eb3e407f5a9b098f6377820164</id>
<content type='text'>
RTC: Add exported function rtc_year_days() to calculate the tm_yday value.

Signed-off-by: Andrew Victor &lt;andrew@sanpeople.com&gt;
Signed-off-by: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: Russell King &lt;rmk@arm.linux.org.uk&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 subsystem: add capability checks</title>
<updated>2006-06-25T17:01:14+00:00</updated>
<author>
<name>Alessandro Zummo</name>
<email>alessandro.zummo@towertech.it</email>
</author>
<published>2006-06-25T12:48:20+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=110d693d5898649da606cd6e5f6af4d7f70a405f'/>
<id>urn:sha1:110d693d5898649da606cd6e5f6af4d7f70a405f</id>
<content type='text'>
Centralize CAP_SYS_XXX checks to avoid duplicate code and missing checks in
the drivers.

Signed-off-by: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: Richard Purdie &lt;rpurdie@rpsys.net&gt;
Cc: Yoichi Yuasa &lt;yoichi_yuasa@tripeaks.co.jp&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: rtc-dev UIE emulation</title>
<updated>2006-06-25T17:01:13+00:00</updated>
<author>
<name>Atsushi Nemoto</name>
<email>anemo@mba.ocn.ne.jp</email>
</author>
<published>2006-06-25T12:48:17+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=655066c3835e7b51794c4d56f042eb78b5a79f53'/>
<id>urn:sha1:655066c3835e7b51794c4d56f042eb78b5a79f53</id>
<content type='text'>
Import genrtc's RTC UIE emulation (CONFIG_GEN_RTC_X) to rtc-dev driver with
slight adjustments/refinements.  This makes UIE-less rtc drivers work
better with programs doing read/poll on /dev/rtc, such as hwclock.  This
emulation should not harm rtc drivers with UIE support, since
rtc_dev_ioctl() calls underlaying rtc driver's ioctl() first.

Signed-off-by: Atsushi Nemoto &lt;anemo@mba.ocn.ne.jp&gt;
Acked-by: Alessandro Zummo &lt;a.zummo@towertech.it&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 subsystem: class</title>
<updated>2006-03-27T16:44:51+00:00</updated>
<author>
<name>Alessandro Zummo</name>
<email>a.zummo@towertech.it</email>
</author>
<published>2006-03-27T09:16:37+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=0c86edc0d4970649f39748c4ce4f2895f728468f'/>
<id>urn:sha1:0c86edc0d4970649f39748c4ce4f2895f728468f</id>
<content type='text'>
Add the basic RTC subsystem infrastructure to the kernel.

rtc/class.c - registration facilities for RTC drivers
rtc/interface.c - kernel/rtc interface functions
rtc/hctosys.c - snippet of code that copies hw clock to sw clock
		at bootup, if configured to do so.

Signed-off-by: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@suse.de&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 Subsystem: library functions</title>
<updated>2006-03-27T16:44:50+00:00</updated>
<author>
<name>Alessandro Zummo</name>
<email>a.zummo@towertech.it</email>
</author>
<published>2006-03-27T09:16:34+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=c58411e95d7f5062dedd1a3064af4d359da1e633'/>
<id>urn:sha1:c58411e95d7f5062dedd1a3064af4d359da1e633</id>
<content type='text'>
RTC and date/time related functions.

Signed-off-by: Alessandro Zummo &lt;a.zummo@towertech.it&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.h broke strace(1) builds</title>
<updated>2006-03-22T15:53:55+00:00</updated>
<author>
<name>Joe Korty</name>
<email>joe.korty@ccur.com</email>
</author>
<published>2006-03-22T08:07:43+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=4024ce5e0f396447cc1e07fd65c2a1d056b066bb'/>
<id>urn:sha1:4024ce5e0f396447cc1e07fd65c2a1d056b066bb</id>
<content type='text'>
Git patch 52dfa9a64cfb3dd01fa1ee1150d589481e54e28e

	[PATCH] move rtc_interrupt() prototype to rtc.h

broke strace(1) builds.  The below moves the kernel-only additions lower,
under the already provided #ifdef __KERNEL__ statement.

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] move rtc_interrupt() prototype to rtc.h</title>
<updated>2006-01-09T04:13:47+00:00</updated>
<author>
<name>Adrian Bunk</name>
<email>bunk@stusta.de</email>
</author>
<published>2006-01-08T09:02:15+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=2a10e0b28b196051ae71829e5b989cba00513289'/>
<id>urn:sha1:2a10e0b28b196051ae71829e5b989cba00513289</id>
<content type='text'>
This patch moves the rtc_interrupt() prototype to rtc.h and removes the
prototypes from C files.

It also renames static rtc_interrupt() functions in
arch/arm/mach-integrator/time.c and arch/sh64/kernel/time.c to avoid compile
problems.

Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
Signed-off-by: Paul Gortmaker &lt;p_gortmaker@yahoo.com&gt;
Acked-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
</feed>
