aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2006-10-05 09:55:46 -0400
committerDavid Howells <dhowells@warthog.cambridge.redhat.com>2006-10-05 10:10:12 -0400
commit7d12e780e003f93433d49ce78cfedf4b4c52adc5 (patch)
tree6748550400445c11a306b132009f3001e3525df8 /include/linux
parentda482792a6d1a3fbaaa25fae867b343fb4db3246 (diff)
IRQ: Maintain regs pointer globally rather than passing to IRQ handlers
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 <dhowells@redhat.com> (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/adb.h4
-rw-r--r--include/linux/arcdevice.h2
-rw-r--r--include/linux/hiddev.h4
-rw-r--r--include/linux/ide.h2
-rw-r--r--include/linux/input.h7
-rw-r--r--include/linux/interrupt.h4
-rw-r--r--include/linux/ioc3.h2
-rw-r--r--include/linux/irq.h40
-rw-r--r--include/linux/libata.h4
-rw-r--r--include/linux/parport.h16
-rw-r--r--include/linux/profile.h2
-rw-r--r--include/linux/rtc.h2
-rw-r--r--include/linux/serial_core.h7
-rw-r--r--include/linux/serio.h5
-rw-r--r--include/linux/sysrq.h6
-rw-r--r--include/linux/usb.h3
-rw-r--r--include/linux/usb/serial.h12
17 files changed, 50 insertions, 72 deletions
diff --git a/include/linux/adb.h b/include/linux/adb.h
index b7305b178279..64d8878e1444 100644
--- a/include/linux/adb.h
+++ b/include/linux/adb.h
@@ -90,10 +90,10 @@ extern struct blocking_notifier_head adb_client_list;
90int adb_request(struct adb_request *req, void (*done)(struct adb_request *), 90int adb_request(struct adb_request *req, void (*done)(struct adb_request *),
91 int flags, int nbytes, ...); 91 int flags, int nbytes, ...);
92int adb_register(int default_id,int handler_id,struct adb_ids *ids, 92int adb_register(int default_id,int handler_id,struct adb_ids *ids,
93 void (*handler)(unsigned char *, int, struct pt_regs *, int)); 93 void (*handler)(unsigned char *, int, int));
94int adb_unregister(int index); 94int adb_unregister(int index);
95void adb_poll(void); 95void adb_poll(void);
96void adb_input(unsigned char *, int, struct pt_regs *, int); 96void adb_input(unsigned char *, int, int);
97int adb_reset_bus(void); 97int adb_reset_bus(void);
98 98
99int adb_try_handler_change(int address, int new_id); 99int adb_try_handler_change(int address, int new_id);
diff --git a/include/linux/arcdevice.h b/include/linux/arcdevice.h
index 231ba090ae34..2f85049cfb3d 100644
--- a/include/linux/arcdevice.h
+++ b/include/linux/arcdevice.h
@@ -334,7 +334,7 @@ void arcnet_dump_skb(struct net_device *dev, struct sk_buff *skb, char *desc);
334#endif 334#endif
335 335
336void arcnet_unregister_proto(struct ArcProto *proto); 336void arcnet_unregister_proto(struct ArcProto *proto);
337irqreturn_t arcnet_interrupt(int irq, void *dev_id, struct pt_regs *regs); 337irqreturn_t arcnet_interrupt(int irq, void *dev_id);
338struct net_device *alloc_arcdev(char *name); 338struct net_device *alloc_arcdev(char *name);
339 339
340#endif /* __KERNEL__ */ 340#endif /* __KERNEL__ */
diff --git a/include/linux/hiddev.h b/include/linux/hiddev.h
index 945ba1ad14ac..acbdae6d7ae1 100644
--- a/include/linux/hiddev.h
+++ b/include/linux/hiddev.h
@@ -222,7 +222,7 @@ struct hid_report;
222int hiddev_connect(struct hid_device *); 222int hiddev_connect(struct hid_device *);
223void hiddev_disconnect(struct hid_device *); 223void hiddev_disconnect(struct hid_device *);
224void hiddev_hid_event(struct hid_device *hid, struct hid_field *field, 224void hiddev_hid_event(struct hid_device *hid, struct hid_field *field,
225 struct hid_usage *usage, __s32 value, struct pt_regs *regs); 225 struct hid_usage *usage, __s32 value);
226void hiddev_report_event(struct hid_device *hid, struct hid_report *report); 226void hiddev_report_event(struct hid_device *hid, struct hid_report *report);
227int __init hiddev_init(void); 227int __init hiddev_init(void);
228void hiddev_exit(void); 228void hiddev_exit(void);
@@ -230,7 +230,7 @@ void hiddev_exit(void);
230static inline int hiddev_connect(struct hid_device *hid) { return -1; } 230static inline int hiddev_connect(struct hid_device *hid) { return -1; }
231static inline void hiddev_disconnect(struct hid_device *hid) { } 231static inline void hiddev_disconnect(struct hid_device *hid) { }
232static inline void hiddev_hid_event(struct hid_device *hid, struct hid_field *field, 232static inline void hiddev_hid_event(struct hid_device *hid, struct hid_field *field,
233 struct hid_usage *usage, __s32 value, struct pt_regs *regs) { } 233 struct hid_usage *usage, __s32 value) { }
234static inline void hiddev_report_event(struct hid_device *hid, struct hid_report *report) { } 234static inline void hiddev_report_event(struct hid_device *hid, struct hid_report *report) { }
235static inline int hiddev_init(void) { return 0; } 235static inline int hiddev_init(void) { return 0; }
236static inline void hiddev_exit(void) { } 236static inline void hiddev_exit(void) { }
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 07d8d725541f..9c2050293f17 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -1185,7 +1185,7 @@ extern void ide_stall_queue(ide_drive_t *drive, unsigned long timeout);
1185 1185
1186extern int ide_spin_wait_hwgroup(ide_drive_t *); 1186extern int ide_spin_wait_hwgroup(ide_drive_t *);
1187extern void ide_timer_expiry(unsigned long); 1187extern void ide_timer_expiry(unsigned long);
1188extern irqreturn_t ide_intr(int irq, void *dev_id, struct pt_regs *regs); 1188extern irqreturn_t ide_intr(int irq, void *dev_id);
1189extern void do_ide_request(request_queue_t *); 1189extern void do_ide_request(request_queue_t *);
1190 1190
1191void ide_init_disk(struct gendisk *, ide_drive_t *); 1191void ide_init_disk(struct gendisk *, ide_drive_t *);
diff --git a/include/linux/input.h b/include/linux/input.h
index 5770105471dd..c38507ba38b5 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -953,7 +953,6 @@ struct input_dev {
953 unsigned int repeat_key; 953 unsigned int repeat_key;
954 struct timer_list timer; 954 struct timer_list timer;
955 955
956 struct pt_regs *regs;
957 int state; 956 int state;
958 957
959 int sync; 958 int sync;
@@ -1149,15 +1148,9 @@ static inline void input_report_switch(struct input_dev *dev, unsigned int code,
1149 input_event(dev, EV_SW, code, !!value); 1148 input_event(dev, EV_SW, code, !!value);
1150} 1149}
1151 1150
1152static inline void input_regs(struct input_dev *dev, struct pt_regs *regs)
1153{
1154 dev->regs = regs;
1155}
1156
1157static inline void input_sync(struct input_dev *dev) 1151static inline void input_sync(struct input_dev *dev)
1158{ 1152{
1159 input_event(dev, EV_SYN, SYN_REPORT, 0); 1153 input_event(dev, EV_SYN, SYN_REPORT, 0);
1160 dev->regs = NULL;
1161} 1154}
1162 1155
1163static inline void input_set_abs_params(struct input_dev *dev, int axis, int min, int max, int fuzz, int flat) 1156static inline void input_set_abs_params(struct input_dev *dev, int axis, int min, int max, int fuzz, int flat)
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index 19782350dcc8..5b83e7b59621 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -64,7 +64,7 @@
64#define SA_TRIGGER_RISING IRQF_TRIGGER_RISING 64#define SA_TRIGGER_RISING IRQF_TRIGGER_RISING
65#define SA_TRIGGER_MASK IRQF_TRIGGER_MASK 65#define SA_TRIGGER_MASK IRQF_TRIGGER_MASK
66 66
67typedef irqreturn_t (*irq_handler_t)(int, void *, struct pt_regs *); 67typedef irqreturn_t (*irq_handler_t)(int, void *);
68 68
69struct irqaction { 69struct irqaction {
70 irq_handler_t handler; 70 irq_handler_t handler;
@@ -77,7 +77,7 @@ struct irqaction {
77 struct proc_dir_entry *dir; 77 struct proc_dir_entry *dir;
78}; 78};
79 79
80extern irqreturn_t no_action(int cpl, void *dev_id, struct pt_regs *regs); 80extern irqreturn_t no_action(int cpl, void *dev_id);
81extern int request_irq(unsigned int, irq_handler_t handler, 81extern int request_irq(unsigned int, irq_handler_t handler,
82 unsigned long, const char *, void *); 82 unsigned long, const char *, void *);
83extern void free_irq(unsigned int, void *); 83extern void free_irq(unsigned int, void *);
diff --git a/include/linux/ioc3.h b/include/linux/ioc3.h
index da7c09e4ede6..38b286e9a46c 100644
--- a/include/linux/ioc3.h
+++ b/include/linux/ioc3.h
@@ -63,7 +63,7 @@ struct ioc3_submodule {
63 /* IRQ stuff */ 63 /* IRQ stuff */
64 unsigned int irq_mask; /* IOC3 IRQ mask, leave clear for Ethernet */ 64 unsigned int irq_mask; /* IOC3 IRQ mask, leave clear for Ethernet */
65 int reset_mask; /* non-zero if you want the ioc3.c module to reset interrupts */ 65 int reset_mask; /* non-zero if you want the ioc3.c module to reset interrupts */
66 int (*intr) (struct ioc3_submodule *, struct ioc3_driver_data *, unsigned int, struct pt_regs *); 66 int (*intr) (struct ioc3_submodule *, struct ioc3_driver_data *, unsigned int);
67 /* private submodule data */ 67 /* private submodule data */
68 void *data; /* assigned by submodule */ 68 void *data; /* assigned by submodule */
69}; 69};
diff --git a/include/linux/irq.h b/include/linux/irq.h
index b947d46e4b18..c64f3cc7e870 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -21,11 +21,11 @@
21 21
22#include <asm/irq.h> 22#include <asm/irq.h>
23#include <asm/ptrace.h> 23#include <asm/ptrace.h>
24#include <asm/irq_regs.h>
24 25
25struct irq_desc; 26struct irq_desc;
26typedef void fastcall (*irq_flow_handler_t)(unsigned int irq, 27typedef void fastcall (*irq_flow_handler_t)(unsigned int irq,
27 struct irq_desc *desc, 28 struct irq_desc *desc);
28 struct pt_regs *regs);
29 29
30 30
31/* 31/*
@@ -258,28 +258,18 @@ static inline int select_smp_affinity(unsigned int irq)
258extern int no_irq_affinity; 258extern int no_irq_affinity;
259 259
260/* Handle irq action chains: */ 260/* Handle irq action chains: */
261extern int handle_IRQ_event(unsigned int irq, struct pt_regs *regs, 261extern int handle_IRQ_event(unsigned int irq, struct irqaction *action);
262 struct irqaction *action);
263 262
264/* 263/*
265 * Built-in IRQ handlers for various IRQ types, 264 * Built-in IRQ handlers for various IRQ types,
266 * callable via desc->chip->handle_irq() 265 * callable via desc->chip->handle_irq()
267 */ 266 */
268extern void fastcall 267extern void fastcall handle_level_irq(unsigned int irq, struct irq_desc *desc);
269handle_level_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs); 268extern void fastcall handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc);
270extern void fastcall 269extern void fastcall handle_edge_irq(unsigned int irq, struct irq_desc *desc);
271handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc, 270extern void fastcall handle_simple_irq(unsigned int irq, struct irq_desc *desc);
272 struct pt_regs *regs); 271extern void fastcall handle_percpu_irq(unsigned int irq, struct irq_desc *desc);
273extern void fastcall 272extern void fastcall handle_bad_irq(unsigned int irq, struct irq_desc *desc);
274handle_edge_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs);
275extern void fastcall
276handle_simple_irq(unsigned int irq, struct irq_desc *desc,
277 struct pt_regs *regs);
278extern void fastcall
279handle_percpu_irq(unsigned int irq, struct irq_desc *desc,
280 struct pt_regs *regs);
281extern void fastcall
282handle_bad_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs);
283 273
284/* 274/*
285 * Get a descriptive string for the highlevel handler, for 275 * Get a descriptive string for the highlevel handler, for
@@ -292,7 +282,7 @@ extern const char *handle_irq_name(irq_flow_handler_t handle);
292 * (is an explicit fastcall, because i386 4KSTACKS calls it from assembly) 282 * (is an explicit fastcall, because i386 4KSTACKS calls it from assembly)
293 */ 283 */
294#ifndef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ 284#ifndef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
295extern fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs); 285extern fastcall unsigned int __do_IRQ(unsigned int irq);
296#endif 286#endif
297 287
298/* 288/*
@@ -301,23 +291,23 @@ extern fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs);
301 * irqchip-style controller then we call the ->handle_irq() handler, 291 * irqchip-style controller then we call the ->handle_irq() handler,
302 * and it calls __do_IRQ() if it's attached to an irqtype-style controller. 292 * and it calls __do_IRQ() if it's attached to an irqtype-style controller.
303 */ 293 */
304static inline void generic_handle_irq(unsigned int irq, struct pt_regs *regs) 294static inline void generic_handle_irq(unsigned int irq)
305{ 295{
306 struct irq_desc *desc = irq_desc + irq; 296 struct irq_desc *desc = irq_desc + irq;
307 297
308#ifdef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ 298#ifdef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
309 desc->handle_irq(irq, desc, regs); 299 desc->handle_irq(irq, desc);
310#else 300#else
311 if (likely(desc->handle_irq)) 301 if (likely(desc->handle_irq))
312 desc->handle_irq(irq, desc, regs); 302 desc->handle_irq(irq, desc);
313 else 303 else
314 __do_IRQ(irq, regs); 304 __do_IRQ(irq);
315#endif 305#endif
316} 306}
317 307
318/* Handling of unhandled and spurious interrupts: */ 308/* Handling of unhandled and spurious interrupts: */
319extern void note_interrupt(unsigned int irq, struct irq_desc *desc, 309extern void note_interrupt(unsigned int irq, struct irq_desc *desc,
320 int action_ret, struct pt_regs *regs); 310 int action_ret);
321 311
322/* Resending of interrupts :*/ 312/* Resending of interrupts :*/
323void check_irq_resend(struct irq_desc *desc, unsigned int irq); 313void check_irq_resend(struct irq_desc *desc, unsigned int irq);
diff --git a/include/linux/libata.h b/include/linux/libata.h
index d1af1dbeaeb4..d0a7ad5ed518 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -628,7 +628,7 @@ struct ata_port_operations {
628 void (*error_handler) (struct ata_port *ap); 628 void (*error_handler) (struct ata_port *ap);
629 void (*post_internal_cmd) (struct ata_queued_cmd *qc); 629 void (*post_internal_cmd) (struct ata_queued_cmd *qc);
630 630
631 irqreturn_t (*irq_handler)(int, void *, struct pt_regs *); 631 irq_handler_t irq_handler;
632 void (*irq_clear) (struct ata_port *); 632 void (*irq_clear) (struct ata_port *);
633 633
634 u32 (*scr_read) (struct ata_port *ap, unsigned int sc_reg); 634 u32 (*scr_read) (struct ata_port *ap, unsigned int sc_reg);
@@ -769,7 +769,7 @@ extern void ata_exec_command(struct ata_port *ap, const struct ata_taskfile *tf)
769extern int ata_port_start (struct ata_port *ap); 769extern int ata_port_start (struct ata_port *ap);
770extern void ata_port_stop (struct ata_port *ap); 770extern void ata_port_stop (struct ata_port *ap);
771extern void ata_host_stop (struct ata_host *host); 771extern void ata_host_stop (struct ata_host *host);
772extern irqreturn_t ata_interrupt (int irq, void *dev_instance, struct pt_regs *regs); 772extern irqreturn_t ata_interrupt (int irq, void *dev_instance);
773extern void ata_mmio_data_xfer(struct ata_device *adev, unsigned char *buf, 773extern void ata_mmio_data_xfer(struct ata_device *adev, unsigned char *buf,
774 unsigned int buflen, int write_data); 774 unsigned int buflen, int write_data);
775extern void ata_pio_data_xfer(struct ata_device *adev, unsigned char *buf, 775extern void ata_pio_data_xfer(struct ata_device *adev, unsigned char *buf,
diff --git a/include/linux/parport.h b/include/linux/parport.h
index 5bf321e82c99..80682aaa8f18 100644
--- a/include/linux/parport.h
+++ b/include/linux/parport.h
@@ -229,7 +229,7 @@ struct pardevice {
229 int (*preempt)(void *); 229 int (*preempt)(void *);
230 void (*wakeup)(void *); 230 void (*wakeup)(void *);
231 void *private; 231 void *private;
232 void (*irq_func)(int, void *, struct pt_regs *); 232 void (*irq_func)(int, void *);
233 unsigned int flags; 233 unsigned int flags;
234 struct pardevice *next; 234 struct pardevice *next;
235 struct pardevice *prev; 235 struct pardevice *prev;
@@ -375,7 +375,7 @@ extern void parport_put_port (struct parport *);
375struct pardevice *parport_register_device(struct parport *port, 375struct pardevice *parport_register_device(struct parport *port,
376 const char *name, 376 const char *name,
377 int (*pf)(void *), void (*kf)(void *), 377 int (*pf)(void *), void (*kf)(void *),
378 void (*irq_func)(int, void *, struct pt_regs *), 378 void (*irq_func)(int, void *),
379 int flags, void *handle); 379 int flags, void *handle);
380 380
381/* parport_unregister unlinks a device from the chain. */ 381/* parport_unregister unlinks a device from the chain. */
@@ -457,7 +457,7 @@ static __inline__ int parport_yield_blocking(struct pardevice *dev)
457#define PARPORT_FLAG_EXCL (1<<1) /* EXCL driver registered. */ 457#define PARPORT_FLAG_EXCL (1<<1) /* EXCL driver registered. */
458 458
459/* IEEE1284 functions */ 459/* IEEE1284 functions */
460extern void parport_ieee1284_interrupt (int, void *, struct pt_regs *); 460extern void parport_ieee1284_interrupt (int, void *);
461extern int parport_negotiate (struct parport *, int mode); 461extern int parport_negotiate (struct parport *, int mode);
462extern ssize_t parport_write (struct parport *, const void *buf, size_t len); 462extern ssize_t parport_write (struct parport *, const void *buf, size_t len);
463extern ssize_t parport_read (struct parport *, void *buf, size_t len); 463extern ssize_t parport_read (struct parport *, void *buf, size_t len);
@@ -502,8 +502,7 @@ extern void parport_daisy_fini (struct parport *port);
502extern struct pardevice *parport_open (int devnum, const char *name, 502extern struct pardevice *parport_open (int devnum, const char *name,
503 int (*pf) (void *), 503 int (*pf) (void *),
504 void (*kf) (void *), 504 void (*kf) (void *),
505 void (*irqf) (int, void *, 505 void (*irqf) (int, void *),
506 struct pt_regs *),
507 int flags, void *handle); 506 int flags, void *handle);
508extern void parport_close (struct pardevice *dev); 507extern void parport_close (struct pardevice *dev);
509extern ssize_t parport_device_id (int devnum, char *buffer, size_t len); 508extern ssize_t parport_device_id (int devnum, char *buffer, size_t len);
@@ -512,13 +511,12 @@ extern void parport_daisy_deselect_all (struct parport *port);
512extern int parport_daisy_select (struct parport *port, int daisy, int mode); 511extern int parport_daisy_select (struct parport *port, int daisy, int mode);
513 512
514/* Lowlevel drivers _can_ call this support function to handle irqs. */ 513/* Lowlevel drivers _can_ call this support function to handle irqs. */
515static __inline__ void parport_generic_irq(int irq, struct parport *port, 514static __inline__ void parport_generic_irq(int irq, struct parport *port)
516 struct pt_regs *regs)
517{ 515{
518 parport_ieee1284_interrupt (irq, port, regs); 516 parport_ieee1284_interrupt (irq, port);
519 read_lock(&port->cad_lock); 517 read_lock(&port->cad_lock);
520 if (port->cad && port->cad->irq_func) 518 if (port->cad && port->cad->irq_func)
521 port->cad->irq_func(irq, port->cad->private, regs); 519 port->cad->irq_func(irq, port->cad->private);
522 read_unlock(&port->cad_lock); 520 read_unlock(&port->cad_lock);
523} 521}
524 522
diff --git a/include/linux/profile.h b/include/linux/profile.h
index e633004ae052..acce53fd38b6 100644
--- a/include/linux/profile.h
+++ b/include/linux/profile.h
@@ -17,7 +17,7 @@ struct notifier_block;
17 17
18/* init basic kernel profiler */ 18/* init basic kernel profiler */
19void __init profile_init(void); 19void __init profile_init(void);
20void profile_tick(int, struct pt_regs *); 20void profile_tick(int);
21void profile_hit(int, void *); 21void profile_hit(int, void *);
22#ifdef CONFIG_PROC_FS 22#ifdef CONFIG_PROC_FS
23void create_prof_cpu_mask(struct proc_dir_entry *); 23void create_prof_cpu_mask(struct proc_dir_entry *);
diff --git a/include/linux/rtc.h b/include/linux/rtc.h
index b89f09357054..09ff4c3e2713 100644
--- a/include/linux/rtc.h
+++ b/include/linux/rtc.h
@@ -208,7 +208,7 @@ int rtc_register(rtc_task_t *task);
208int rtc_unregister(rtc_task_t *task); 208int rtc_unregister(rtc_task_t *task);
209int rtc_control(rtc_task_t *t, unsigned int cmd, unsigned long arg); 209int rtc_control(rtc_task_t *t, unsigned int cmd, unsigned long arg);
210void rtc_get_rtc_time(struct rtc_time *rtc_tm); 210void rtc_get_rtc_time(struct rtc_time *rtc_tm);
211irqreturn_t rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs); 211irqreturn_t rtc_interrupt(int irq, void *dev_id);
212 212
213#endif /* __KERNEL__ */ 213#endif /* __KERNEL__ */
214 214
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index b661c19f3f72..463ab953b092 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -409,13 +409,12 @@ int uart_resume_port(struct uart_driver *reg, struct uart_port *port);
409 * The following are helper functions for the low level drivers. 409 * The following are helper functions for the low level drivers.
410 */ 410 */
411static inline int 411static inline int
412uart_handle_sysrq_char(struct uart_port *port, unsigned int ch, 412uart_handle_sysrq_char(struct uart_port *port, unsigned int ch)
413 struct pt_regs *regs)
414{ 413{
415#ifdef SUPPORT_SYSRQ 414#ifdef SUPPORT_SYSRQ
416 if (port->sysrq) { 415 if (port->sysrq) {
417 if (ch && time_before(jiffies, port->sysrq)) { 416 if (ch && time_before(jiffies, port->sysrq)) {
418 handle_sysrq(ch, regs, port->info->tty); 417 handle_sysrq(ch, port->info->tty);
419 port->sysrq = 0; 418 port->sysrq = 0;
420 return 1; 419 return 1;
421 } 420 }
@@ -425,7 +424,7 @@ uart_handle_sysrq_char(struct uart_port *port, unsigned int ch,
425 return 0; 424 return 0;
426} 425}
427#ifndef SUPPORT_SYSRQ 426#ifndef SUPPORT_SYSRQ
428#define uart_handle_sysrq_char(port,ch,regs) uart_handle_sysrq_char(port, 0, NULL) 427#define uart_handle_sysrq_char(port,ch) uart_handle_sysrq_char(port, 0)
429#endif 428#endif
430 429
431/* 430/*
diff --git a/include/linux/serio.h b/include/linux/serio.h
index c9069310b6ac..3a697cc6ecae 100644
--- a/include/linux/serio.h
+++ b/include/linux/serio.h
@@ -60,8 +60,7 @@ struct serio_driver {
60 unsigned int manual_bind; 60 unsigned int manual_bind;
61 61
62 void (*write_wakeup)(struct serio *); 62 void (*write_wakeup)(struct serio *);
63 irqreturn_t (*interrupt)(struct serio *, unsigned char, 63 irqreturn_t (*interrupt)(struct serio *, unsigned char, unsigned int);
64 unsigned int, struct pt_regs *);
65 int (*connect)(struct serio *, struct serio_driver *drv); 64 int (*connect)(struct serio *, struct serio_driver *drv);
66 int (*reconnect)(struct serio *); 65 int (*reconnect)(struct serio *);
67 void (*disconnect)(struct serio *); 66 void (*disconnect)(struct serio *);
@@ -75,7 +74,7 @@ int serio_open(struct serio *serio, struct serio_driver *drv);
75void serio_close(struct serio *serio); 74void serio_close(struct serio *serio);
76void serio_rescan(struct serio *serio); 75void serio_rescan(struct serio *serio);
77void serio_reconnect(struct serio *serio); 76void serio_reconnect(struct serio *serio);
78irqreturn_t serio_interrupt(struct serio *serio, unsigned char data, unsigned int flags, struct pt_regs *regs); 77irqreturn_t serio_interrupt(struct serio *serio, unsigned char data, unsigned int flags);
79 78
80void __serio_register_port(struct serio *serio, struct module *owner); 79void __serio_register_port(struct serio *serio, struct module *owner);
81static inline void serio_register_port(struct serio *serio) 80static inline void serio_register_port(struct serio *serio)
diff --git a/include/linux/sysrq.h b/include/linux/sysrq.h
index e657e523b9bf..9df8833670cb 100644
--- a/include/linux/sysrq.h
+++ b/include/linux/sysrq.h
@@ -29,7 +29,7 @@ struct tty_struct;
29#define SYSRQ_ENABLE_RTNICE 0x0100 29#define SYSRQ_ENABLE_RTNICE 0x0100
30 30
31struct sysrq_key_op { 31struct sysrq_key_op {
32 void (*handler)(int, struct pt_regs *, struct tty_struct *); 32 void (*handler)(int, struct tty_struct *);
33 char *help_msg; 33 char *help_msg;
34 char *action_msg; 34 char *action_msg;
35 int enable_mask; 35 int enable_mask;
@@ -42,8 +42,8 @@ struct sysrq_key_op {
42 * are available -- else NULL's). 42 * are available -- else NULL's).
43 */ 43 */
44 44
45void handle_sysrq(int, struct pt_regs *, struct tty_struct *); 45void handle_sysrq(int, struct tty_struct *);
46void __handle_sysrq(int, struct pt_regs *, struct tty_struct *, int check_mask); 46void __handle_sysrq(int, struct tty_struct *, int check_mask);
47int register_sysrq_key(int, struct sysrq_key_op *); 47int register_sysrq_key(int, struct sysrq_key_op *);
48int unregister_sysrq_key(int, struct sysrq_key_op *); 48int unregister_sysrq_key(int, struct sysrq_key_op *);
49struct sysrq_key_op *__sysrq_get_key_op(int key); 49struct sysrq_key_op *__sysrq_get_key_op(int key);
diff --git a/include/linux/usb.h b/include/linux/usb.h
index 190cc1b78fe2..5482bfb3303d 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -764,9 +764,8 @@ struct usb_iso_packet_descriptor {
764}; 764};
765 765
766struct urb; 766struct urb;
767struct pt_regs;
768 767
769typedef void (*usb_complete_t)(struct urb *, struct pt_regs *); 768typedef void (*usb_complete_t)(struct urb *);
770 769
771/** 770/**
772 * struct urb - USB Request Block 771 * struct urb - USB Request Block
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h
index 91c983eef899..91b3ea2bbb14 100644
--- a/include/linux/usb/serial.h
+++ b/include/linux/usb/serial.h
@@ -226,10 +226,10 @@ struct usb_serial_driver {
226 int (*tiocmget) (struct usb_serial_port *port, struct file *file); 226 int (*tiocmget) (struct usb_serial_port *port, struct file *file);
227 int (*tiocmset) (struct usb_serial_port *port, struct file *file, unsigned int set, unsigned int clear); 227 int (*tiocmset) (struct usb_serial_port *port, struct file *file, unsigned int set, unsigned int clear);
228 228
229 void (*read_int_callback)(struct urb *urb, struct pt_regs *regs); 229 void (*read_int_callback)(struct urb *urb);
230 void (*write_int_callback)(struct urb *urb, struct pt_regs *regs); 230 void (*write_int_callback)(struct urb *urb);
231 void (*read_bulk_callback)(struct urb *urb, struct pt_regs *regs); 231 void (*read_bulk_callback)(struct urb *urb);
232 void (*write_bulk_callback)(struct urb *urb, struct pt_regs *regs); 232 void (*write_bulk_callback)(struct urb *urb);
233}; 233};
234#define to_usb_serial_driver(d) container_of(d, struct usb_serial_driver, driver) 234#define to_usb_serial_driver(d) container_of(d, struct usb_serial_driver, driver)
235 235
@@ -262,8 +262,8 @@ extern int usb_serial_generic_write (struct usb_serial_port *port, const unsigne
262extern void usb_serial_generic_close (struct usb_serial_port *port, struct file *filp); 262extern void usb_serial_generic_close (struct usb_serial_port *port, struct file *filp);
263extern int usb_serial_generic_write_room (struct usb_serial_port *port); 263extern int usb_serial_generic_write_room (struct usb_serial_port *port);
264extern int usb_serial_generic_chars_in_buffer (struct usb_serial_port *port); 264extern int usb_serial_generic_chars_in_buffer (struct usb_serial_port *port);
265extern void usb_serial_generic_read_bulk_callback (struct urb *urb, struct pt_regs *regs); 265extern void usb_serial_generic_read_bulk_callback (struct urb *urb);
266extern void usb_serial_generic_write_bulk_callback (struct urb *urb, struct pt_regs *regs); 266extern void usb_serial_generic_write_bulk_callback (struct urb *urb);
267extern void usb_serial_generic_shutdown (struct usb_serial *serial); 267extern void usb_serial_generic_shutdown (struct usb_serial *serial);
268extern int usb_serial_generic_register (int debug); 268extern int usb_serial_generic_register (int debug);
269extern void usb_serial_generic_deregister (void); 269extern void usb_serial_generic_deregister (void);