aboutsummaryrefslogtreecommitdiffstats
path: root/include
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
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')
-rw-r--r--include/asm-frv/dma.h5
-rw-r--r--include/asm-frv/irq_regs.h27
-rw-r--r--include/asm-frv/ptrace.h1
-rw-r--r--include/asm-generic/irq_regs.h37
-rw-r--r--include/asm-i386/apic.h4
-rw-r--r--include/asm-i386/arch_hooks.h2
-rw-r--r--include/asm-i386/floppy.h6
-rw-r--r--include/asm-i386/hpet.h2
-rw-r--r--include/asm-i386/hw_irq.h2
-rw-r--r--include/asm-i386/irq_regs.h1
-rw-r--r--include/asm-i386/mach-default/do_timer.h8
-rw-r--r--include/asm-i386/mach-visws/do_timer.h8
-rw-r--r--include/asm-i386/mach-voyager/do_timer.h6
-rw-r--r--include/asm-i386/voyager.h4
-rw-r--r--include/asm-ia64/irq_regs.h1
-rw-r--r--include/asm-ia64/machvec.h4
-rw-r--r--include/asm-mips/irq_regs.h1
-rw-r--r--include/asm-mips/time.h4
-rw-r--r--include/asm-powerpc/irq.h2
-rw-r--r--include/asm-powerpc/irq_regs.h2
-rw-r--r--include/asm-powerpc/smp.h3
-rw-r--r--include/asm-x86_64/apic.h2
-rw-r--r--include/asm-x86_64/floppy.h6
-rw-r--r--include/asm-x86_64/irq_regs.h1
-rw-r--r--include/asm-x86_64/proto.h4
-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
-rw-r--r--include/sound/cs4231.h2
-rw-r--r--include/sound/emu10k1.h2
-rw-r--r--include/sound/gus.h2
-rw-r--r--include/sound/initval.h2
-rw-r--r--include/sound/mpu401.h6
-rw-r--r--include/sound/sb.h6
-rw-r--r--include/sound/vx_core.h2
49 files changed, 165 insertions, 122 deletions
diff --git a/include/asm-frv/dma.h b/include/asm-frv/dma.h
index 18d6bb8f84fc..683c47d48a5b 100644
--- a/include/asm-frv/dma.h
+++ b/include/asm-frv/dma.h
@@ -24,10 +24,7 @@
24/* 24/*
25 * FRV DMA controller management 25 * FRV DMA controller management
26 */ 26 */
27struct pt_regs; 27typedef irqreturn_t (*dma_irq_handler_t)(int dmachan, unsigned long cstr, void *data);
28
29typedef irqreturn_t (*dma_irq_handler_t)(int dmachan, unsigned long cstr, void *data,
30 struct pt_regs *regs);
31 28
32extern void frv_dma_init(void); 29extern void frv_dma_init(void);
33 30
diff --git a/include/asm-frv/irq_regs.h b/include/asm-frv/irq_regs.h
new file mode 100644
index 000000000000..d22e83289ad1
--- /dev/null
+++ b/include/asm-frv/irq_regs.h
@@ -0,0 +1,27 @@
1/* FRV per-CPU frame pointer holder
2 *
3 * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
10 */
11
12#ifndef _ASM_IRQ_REGS_H
13#define _ASM_IRQ_REGS_H
14
15/*
16 * Per-cpu current frame pointer - the location of the last exception frame on
17 * the stack
18 * - on FRV, GR28 is dedicated to keeping a pointer to the current exception
19 * frame
20 */
21#define ARCH_HAS_OWN_IRQ_REGS
22
23#ifndef __ASSEMBLY__
24#define get_irq_regs() (__frame)
25#endif
26
27#endif /* _ASM_IRQ_REGS_H */
diff --git a/include/asm-frv/ptrace.h b/include/asm-frv/ptrace.h
index 7ff525162a72..9a2241b8eb1e 100644
--- a/include/asm-frv/ptrace.h
+++ b/include/asm-frv/ptrace.h
@@ -12,6 +12,7 @@
12#define _ASM_PTRACE_H 12#define _ASM_PTRACE_H
13 13
14#include <asm/registers.h> 14#include <asm/registers.h>
15#include <asm/irq_regs.h>
15 16
16#define in_syscall(regs) (((regs)->tbr & TBR_TT) == TBR_TT_TRAP0) 17#define in_syscall(regs) (((regs)->tbr & TBR_TT) == TBR_TT_TRAP0)
17 18
diff --git a/include/asm-generic/irq_regs.h b/include/asm-generic/irq_regs.h
new file mode 100644
index 000000000000..5ae1d07d4a12
--- /dev/null
+++ b/include/asm-generic/irq_regs.h
@@ -0,0 +1,37 @@
1/* Fallback per-CPU frame pointer holder
2 *
3 * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
10 */
11
12#ifndef _ASM_GENERIC_IRQ_REGS_H
13#define _ASM_GENERIC_IRQ_REGS_H
14
15#include <linux/percpu.h>
16
17/*
18 * Per-cpu current frame pointer - the location of the last exception frame on
19 * the stack
20 */
21DECLARE_PER_CPU(struct pt_regs *, __irq_regs);
22
23static inline struct pt_regs *get_irq_regs(void)
24{
25 return __get_cpu_var(__irq_regs);
26}
27
28static inline struct pt_regs *set_irq_regs(struct pt_regs *new_regs)
29{
30 struct pt_regs *old_regs, **pp_regs = &__get_cpu_var(__irq_regs);
31
32 old_regs = *pp_regs;
33 *pp_regs = new_regs;
34 return old_regs;
35}
36
37#endif /* _ASM_GENERIC_IRQ_REGS_H */
diff --git a/include/asm-i386/apic.h b/include/asm-i386/apic.h
index 3a42b7d6fc92..b9529578fc37 100644
--- a/include/asm-i386/apic.h
+++ b/include/asm-i386/apic.h
@@ -98,7 +98,7 @@ extern void sync_Arb_IDs (void);
98extern void init_bsp_APIC (void); 98extern void init_bsp_APIC (void);
99extern void setup_local_APIC (void); 99extern void setup_local_APIC (void);
100extern void init_apic_mappings (void); 100extern void init_apic_mappings (void);
101extern void smp_local_timer_interrupt (struct pt_regs * regs); 101extern void smp_local_timer_interrupt (void);
102extern void setup_boot_APIC_clock (void); 102extern void setup_boot_APIC_clock (void);
103extern void setup_secondary_APIC_clock (void); 103extern void setup_secondary_APIC_clock (void);
104extern int APIC_init_uniprocessor (void); 104extern int APIC_init_uniprocessor (void);
@@ -107,7 +107,7 @@ extern void enable_APIC_timer(void);
107 107
108extern void enable_NMI_through_LVT0 (void * dummy); 108extern void enable_NMI_through_LVT0 (void * dummy);
109 109
110void smp_send_timer_broadcast_ipi(struct pt_regs *regs); 110void smp_send_timer_broadcast_ipi(void);
111void switch_APIC_timer_to_ipi(void *cpumask); 111void switch_APIC_timer_to_ipi(void *cpumask);
112void switch_ipi_to_APIC_timer(void *cpumask); 112void switch_ipi_to_APIC_timer(void *cpumask);
113#define ARCH_APICTIMER_STOPS_ON_C3 1 113#define ARCH_APICTIMER_STOPS_ON_C3 1
diff --git a/include/asm-i386/arch_hooks.h b/include/asm-i386/arch_hooks.h
index 238cf4275b96..a8c1fca9726d 100644
--- a/include/asm-i386/arch_hooks.h
+++ b/include/asm-i386/arch_hooks.h
@@ -14,7 +14,7 @@
14extern void init_ISA_irqs(void); 14extern void init_ISA_irqs(void);
15extern void apic_intr_init(void); 15extern void apic_intr_init(void);
16extern void smp_intr_init(void); 16extern void smp_intr_init(void);
17extern irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs); 17extern irqreturn_t timer_interrupt(int irq, void *dev_id);
18 18
19/* these are the defined hooks */ 19/* these are the defined hooks */
20extern void intr_init_hook(void); 20extern void intr_init_hook(void);
diff --git a/include/asm-i386/floppy.h b/include/asm-i386/floppy.h
index 359ead60b718..44ef2f55a8e9 100644
--- a/include/asm-i386/floppy.h
+++ b/include/asm-i386/floppy.h
@@ -51,7 +51,7 @@ static char *virtual_dma_addr;
51static int virtual_dma_mode; 51static int virtual_dma_mode;
52static int doing_pdma; 52static int doing_pdma;
53 53
54static irqreturn_t floppy_hardint(int irq, void *dev_id, struct pt_regs * regs) 54static irqreturn_t floppy_hardint(int irq, void *dev_id)
55{ 55{
56 register unsigned char st; 56 register unsigned char st;
57 57
@@ -63,7 +63,7 @@ static irqreturn_t floppy_hardint(int irq, void *dev_id, struct pt_regs * regs)
63 static int dma_wait=0; 63 static int dma_wait=0;
64#endif 64#endif
65 if (!doing_pdma) 65 if (!doing_pdma)
66 return floppy_interrupt(irq, dev_id, regs); 66 return floppy_interrupt(irq, dev_id);
67 67
68#ifdef TRACE_FLPY_INT 68#ifdef TRACE_FLPY_INT
69 if(!calls) 69 if(!calls)
@@ -106,7 +106,7 @@ static irqreturn_t floppy_hardint(int irq, void *dev_id, struct pt_regs * regs)
106 dma_wait=0; 106 dma_wait=0;
107#endif 107#endif
108 doing_pdma = 0; 108 doing_pdma = 0;
109 floppy_interrupt(irq, dev_id, regs); 109 floppy_interrupt(irq, dev_id);
110 return IRQ_HANDLED; 110 return IRQ_HANDLED;
111 } 111 }
112#ifdef TRACE_FLPY_INT 112#ifdef TRACE_FLPY_INT
diff --git a/include/asm-i386/hpet.h b/include/asm-i386/hpet.h
index af5d435519d1..e47be9a56cc2 100644
--- a/include/asm-i386/hpet.h
+++ b/include/asm-i386/hpet.h
@@ -108,7 +108,7 @@ extern int hpet_set_alarm_time(unsigned char hrs, unsigned char min, unsigned ch
108extern int hpet_set_periodic_freq(unsigned long freq); 108extern int hpet_set_periodic_freq(unsigned long freq);
109extern int hpet_rtc_dropped_irq(void); 109extern int hpet_rtc_dropped_irq(void);
110extern int hpet_rtc_timer_init(void); 110extern int hpet_rtc_timer_init(void);
111extern irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs); 111extern irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id);
112#endif /* CONFIG_HPET_EMULATE_RTC */ 112#endif /* CONFIG_HPET_EMULATE_RTC */
113#endif /* CONFIG_HPET_TIMER */ 113#endif /* CONFIG_HPET_TIMER */
114#endif /* _I386_HPET_H */ 114#endif /* _I386_HPET_H */
diff --git a/include/asm-i386/hw_irq.h b/include/asm-i386/hw_irq.h
index 88f02a073561..8806c7e002a7 100644
--- a/include/asm-i386/hw_irq.h
+++ b/include/asm-i386/hw_irq.h
@@ -41,7 +41,7 @@ fastcall void call_function_interrupt(void);
41fastcall void apic_timer_interrupt(void); 41fastcall void apic_timer_interrupt(void);
42fastcall void error_interrupt(void); 42fastcall void error_interrupt(void);
43fastcall void spurious_interrupt(void); 43fastcall void spurious_interrupt(void);
44fastcall void thermal_interrupt(struct pt_regs *); 44fastcall void thermal_interrupt(void);
45#define platform_legacy_irq(irq) ((irq) < 16) 45#define platform_legacy_irq(irq) ((irq) < 16)
46#endif 46#endif
47 47
diff --git a/include/asm-i386/irq_regs.h b/include/asm-i386/irq_regs.h
new file mode 100644
index 000000000000..3dd9c0b70270
--- /dev/null
+++ b/include/asm-i386/irq_regs.h
@@ -0,0 +1 @@
#include <asm-generic/irq_regs.h>
diff --git a/include/asm-i386/mach-default/do_timer.h b/include/asm-i386/mach-default/do_timer.h
index 4182c347ef85..7d606e3364ae 100644
--- a/include/asm-i386/mach-default/do_timer.h
+++ b/include/asm-i386/mach-default/do_timer.h
@@ -14,11 +14,11 @@
14 * timer interrupt as a means of triggering reschedules etc. 14 * timer interrupt as a means of triggering reschedules etc.
15 **/ 15 **/
16 16
17static inline void do_timer_interrupt_hook(struct pt_regs *regs) 17static inline void do_timer_interrupt_hook(void)
18{ 18{
19 do_timer(1); 19 do_timer(1);
20#ifndef CONFIG_SMP 20#ifndef CONFIG_SMP
21 update_process_times(user_mode_vm(regs)); 21 update_process_times(user_mode_vm(get_irq_regs()));
22#endif 22#endif
23/* 23/*
24 * In the SMP case we use the local APIC timer interrupt to do the 24 * In the SMP case we use the local APIC timer interrupt to do the
@@ -26,10 +26,10 @@ static inline void do_timer_interrupt_hook(struct pt_regs *regs)
26 * system, in that case we have to call the local interrupt handler. 26 * system, in that case we have to call the local interrupt handler.
27 */ 27 */
28#ifndef CONFIG_X86_LOCAL_APIC 28#ifndef CONFIG_X86_LOCAL_APIC
29 profile_tick(CPU_PROFILING, regs); 29 profile_tick(CPU_PROFILING);
30#else 30#else
31 if (!using_apic_timer) 31 if (!using_apic_timer)
32 smp_local_timer_interrupt(regs); 32 smp_local_timer_interrupt();
33#endif 33#endif
34} 34}
35 35
diff --git a/include/asm-i386/mach-visws/do_timer.h b/include/asm-i386/mach-visws/do_timer.h
index 8db618c5a72b..21cd696d4d0f 100644
--- a/include/asm-i386/mach-visws/do_timer.h
+++ b/include/asm-i386/mach-visws/do_timer.h
@@ -4,14 +4,14 @@
4#include <asm/i8259.h> 4#include <asm/i8259.h>
5#include "cobalt.h" 5#include "cobalt.h"
6 6
7static inline void do_timer_interrupt_hook(struct pt_regs *regs) 7static inline void do_timer_interrupt_hook(void)
8{ 8{
9 /* Clear the interrupt */ 9 /* Clear the interrupt */
10 co_cpu_write(CO_CPU_STAT,co_cpu_read(CO_CPU_STAT) & ~CO_STAT_TIMEINTR); 10 co_cpu_write(CO_CPU_STAT,co_cpu_read(CO_CPU_STAT) & ~CO_STAT_TIMEINTR);
11 11
12 do_timer(1); 12 do_timer(1);
13#ifndef CONFIG_SMP 13#ifndef CONFIG_SMP
14 update_process_times(user_mode_vm(regs)); 14 update_process_times(user_mode_vm(irq_regs));
15#endif 15#endif
16/* 16/*
17 * In the SMP case we use the local APIC timer interrupt to do the 17 * In the SMP case we use the local APIC timer interrupt to do the
@@ -19,10 +19,10 @@ static inline void do_timer_interrupt_hook(struct pt_regs *regs)
19 * system, in that case we have to call the local interrupt handler. 19 * system, in that case we have to call the local interrupt handler.
20 */ 20 */
21#ifndef CONFIG_X86_LOCAL_APIC 21#ifndef CONFIG_X86_LOCAL_APIC
22 profile_tick(CPU_PROFILING, regs); 22 profile_tick(CPU_PROFILING);
23#else 23#else
24 if (!using_apic_timer) 24 if (!using_apic_timer)
25 smp_local_timer_interrupt(regs); 25 smp_local_timer_interrupt();
26#endif 26#endif
27} 27}
28 28
diff --git a/include/asm-i386/mach-voyager/do_timer.h b/include/asm-i386/mach-voyager/do_timer.h
index 099fe9f5c1b2..04e69c104a74 100644
--- a/include/asm-i386/mach-voyager/do_timer.h
+++ b/include/asm-i386/mach-voyager/do_timer.h
@@ -1,14 +1,14 @@
1/* defines for inline arch setup functions */ 1/* defines for inline arch setup functions */
2#include <asm/voyager.h> 2#include <asm/voyager.h>
3 3
4static inline void do_timer_interrupt_hook(struct pt_regs *regs) 4static inline void do_timer_interrupt_hook(void)
5{ 5{
6 do_timer(1); 6 do_timer(1);
7#ifndef CONFIG_SMP 7#ifndef CONFIG_SMP
8 update_process_times(user_mode_vm(regs)); 8 update_process_times(user_mode_vm(irq_regs));
9#endif 9#endif
10 10
11 voyager_timer_interrupt(regs); 11 voyager_timer_interrupt();
12} 12}
13 13
14static inline int do_timer_overflow(int count) 14static inline int do_timer_overflow(int count)
diff --git a/include/asm-i386/voyager.h b/include/asm-i386/voyager.h
index aaf432dd7673..e74c54aa757f 100644
--- a/include/asm-i386/voyager.h
+++ b/include/asm-i386/voyager.h
@@ -505,8 +505,8 @@ extern int voyager_memory_detect(int region, __u32 *addr, __u32 *length);
505extern void voyager_smp_intr_init(void); 505extern void voyager_smp_intr_init(void);
506extern __u8 voyager_extended_cmos_read(__u16 cmos_address); 506extern __u8 voyager_extended_cmos_read(__u16 cmos_address);
507extern void voyager_smp_dump(void); 507extern void voyager_smp_dump(void);
508extern void voyager_timer_interrupt(struct pt_regs *regs); 508extern void voyager_timer_interrupt(void);
509extern void smp_local_timer_interrupt(struct pt_regs * regs); 509extern void smp_local_timer_interrupt(void);
510extern void voyager_power_off(void); 510extern void voyager_power_off(void);
511extern void smp_voyager_power_off(void *dummy); 511extern void smp_voyager_power_off(void *dummy);
512extern void voyager_restart(void); 512extern void voyager_restart(void);
diff --git a/include/asm-ia64/irq_regs.h b/include/asm-ia64/irq_regs.h
new file mode 100644
index 000000000000..3dd9c0b70270
--- /dev/null
+++ b/include/asm-ia64/irq_regs.h
@@ -0,0 +1 @@
#include <asm-generic/irq_regs.h>
diff --git a/include/asm-ia64/machvec.h b/include/asm-ia64/machvec.h
index 90cba967df35..7ffbddf5306f 100644
--- a/include/asm-ia64/machvec.h
+++ b/include/asm-ia64/machvec.h
@@ -26,7 +26,7 @@ typedef void ia64_mv_setup_t (char **);
26typedef void ia64_mv_cpu_init_t (void); 26typedef void ia64_mv_cpu_init_t (void);
27typedef void ia64_mv_irq_init_t (void); 27typedef void ia64_mv_irq_init_t (void);
28typedef void ia64_mv_send_ipi_t (int, int, int, int); 28typedef void ia64_mv_send_ipi_t (int, int, int, int);
29typedef void ia64_mv_timer_interrupt_t (int, void *, struct pt_regs *); 29typedef void ia64_mv_timer_interrupt_t (int, void *);
30typedef void ia64_mv_global_tlb_purge_t (struct mm_struct *, unsigned long, unsigned long, unsigned long); 30typedef void ia64_mv_global_tlb_purge_t (struct mm_struct *, unsigned long, unsigned long, unsigned long);
31typedef void ia64_mv_tlb_migrate_finish_t (struct mm_struct *); 31typedef void ia64_mv_tlb_migrate_finish_t (struct mm_struct *);
32typedef unsigned int ia64_mv_local_vector_to_irq (u8); 32typedef unsigned int ia64_mv_local_vector_to_irq (u8);
@@ -96,7 +96,7 @@ machvec_noop_task (struct task_struct *task)
96} 96}
97 97
98extern void machvec_setup (char **); 98extern void machvec_setup (char **);
99extern void machvec_timer_interrupt (int, void *, struct pt_regs *); 99extern void machvec_timer_interrupt (int, void *);
100extern void machvec_dma_sync_single (struct device *, dma_addr_t, size_t, int); 100extern void machvec_dma_sync_single (struct device *, dma_addr_t, size_t, int);
101extern void machvec_dma_sync_sg (struct device *, struct scatterlist *, int, int); 101extern void machvec_dma_sync_sg (struct device *, struct scatterlist *, int, int);
102extern void machvec_tlb_migrate_finish (struct mm_struct *); 102extern void machvec_tlb_migrate_finish (struct mm_struct *);
diff --git a/include/asm-mips/irq_regs.h b/include/asm-mips/irq_regs.h
new file mode 100644
index 000000000000..3dd9c0b70270
--- /dev/null
+++ b/include/asm-mips/irq_regs.h
@@ -0,0 +1 @@
#include <asm-generic/irq_regs.h>
diff --git a/include/asm-mips/time.h b/include/asm-mips/time.h
index 2d543735668b..30f21df39253 100644
--- a/include/asm-mips/time.h
+++ b/include/asm-mips/time.h
@@ -67,7 +67,7 @@ extern unsigned long (*do_gettimeoffset)(void);
67/* 67/*
68 * high-level timer interrupt routines. 68 * high-level timer interrupt routines.
69 */ 69 */
70extern irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs); 70extern irqreturn_t timer_interrupt(int irq, void *dev_id);
71 71
72/* 72/*
73 * the corresponding low-level timer interrupt routine. 73 * the corresponding low-level timer interrupt routine.
@@ -77,7 +77,7 @@ extern asmlinkage void ll_timer_interrupt(int irq, struct pt_regs *regs);
77/* 77/*
78 * profiling and process accouting is done separately in local_timer_interrupt 78 * profiling and process accouting is done separately in local_timer_interrupt
79 */ 79 */
80extern void local_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs); 80extern void local_timer_interrupt(int irq, void *dev_id);
81extern asmlinkage void ll_local_timer_interrupt(int irq, struct pt_regs *regs); 81extern asmlinkage void ll_local_timer_interrupt(int irq, struct pt_regs *regs);
82 82
83/* 83/*
diff --git a/include/asm-powerpc/irq.h b/include/asm-powerpc/irq.h
index 89ed545b446b..f960f5346f40 100644
--- a/include/asm-powerpc/irq.h
+++ b/include/asm-powerpc/irq.h
@@ -825,7 +825,7 @@ extern struct thread_info *softirq_ctx[NR_CPUS];
825 825
826extern void irq_ctx_init(void); 826extern void irq_ctx_init(void);
827extern void call_do_softirq(struct thread_info *tp); 827extern void call_do_softirq(struct thread_info *tp);
828extern int call_handle_irq(int irq, void *p1, void *p2, 828extern int call_handle_irq(int irq, void *p1,
829 struct thread_info *tp, void *func); 829 struct thread_info *tp, void *func);
830#else 830#else
831#define irq_ctx_init() 831#define irq_ctx_init()
diff --git a/include/asm-powerpc/irq_regs.h b/include/asm-powerpc/irq_regs.h
new file mode 100644
index 000000000000..ba94b51a0a70
--- /dev/null
+++ b/include/asm-powerpc/irq_regs.h
@@ -0,0 +1,2 @@
1#include <asm-generic/irq_regs.h>
2
diff --git a/include/asm-powerpc/smp.h b/include/asm-powerpc/smp.h
index 068f119aa298..20ea7c70bc38 100644
--- a/include/asm-powerpc/smp.h
+++ b/include/asm-powerpc/smp.h
@@ -34,8 +34,7 @@ extern void cpu_die(void);
34#ifdef CONFIG_SMP 34#ifdef CONFIG_SMP
35 35
36extern void smp_send_debugger_break(int cpu); 36extern void smp_send_debugger_break(int cpu);
37struct pt_regs; 37extern void smp_message_recv(int);
38extern void smp_message_recv(int, struct pt_regs *);
39 38
40#ifdef CONFIG_HOTPLUG_CPU 39#ifdef CONFIG_HOTPLUG_CPU
41extern void fixup_irqs(cpumask_t map); 40extern void fixup_irqs(cpumask_t map);
diff --git a/include/asm-x86_64/apic.h b/include/asm-x86_64/apic.h
index 9e66d32330c9..e81d0f289f0b 100644
--- a/include/asm-x86_64/apic.h
+++ b/include/asm-x86_64/apic.h
@@ -77,7 +77,7 @@ extern void sync_Arb_IDs (void);
77extern void init_bsp_APIC (void); 77extern void init_bsp_APIC (void);
78extern void setup_local_APIC (void); 78extern void setup_local_APIC (void);
79extern void init_apic_mappings (void); 79extern void init_apic_mappings (void);
80extern void smp_local_timer_interrupt (struct pt_regs * regs); 80extern void smp_local_timer_interrupt (void);
81extern void setup_boot_APIC_clock (void); 81extern void setup_boot_APIC_clock (void);
82extern void setup_secondary_APIC_clock (void); 82extern void setup_secondary_APIC_clock (void);
83extern int APIC_init_uniprocessor (void); 83extern int APIC_init_uniprocessor (void);
diff --git a/include/asm-x86_64/floppy.h b/include/asm-x86_64/floppy.h
index 32ff5d132714..6ea13c3806f3 100644
--- a/include/asm-x86_64/floppy.h
+++ b/include/asm-x86_64/floppy.h
@@ -51,7 +51,7 @@ static char *virtual_dma_addr;
51static int virtual_dma_mode; 51static int virtual_dma_mode;
52static int doing_pdma; 52static int doing_pdma;
53 53
54static irqreturn_t floppy_hardint(int irq, void *dev_id, struct pt_regs * regs) 54static irqreturn_t floppy_hardint(int irq, void *dev_id)
55{ 55{
56 register unsigned char st; 56 register unsigned char st;
57 57
@@ -63,7 +63,7 @@ static irqreturn_t floppy_hardint(int irq, void *dev_id, struct pt_regs * regs)
63 static int dma_wait=0; 63 static int dma_wait=0;
64#endif 64#endif
65 if (!doing_pdma) 65 if (!doing_pdma)
66 return floppy_interrupt(irq, dev_id, regs); 66 return floppy_interrupt(irq, dev_id);
67 67
68#ifdef TRACE_FLPY_INT 68#ifdef TRACE_FLPY_INT
69 if(!calls) 69 if(!calls)
@@ -106,7 +106,7 @@ static irqreturn_t floppy_hardint(int irq, void *dev_id, struct pt_regs * regs)
106 dma_wait=0; 106 dma_wait=0;
107#endif 107#endif
108 doing_pdma = 0; 108 doing_pdma = 0;
109 floppy_interrupt(irq, dev_id, regs); 109 floppy_interrupt(irq, dev_id);
110 return IRQ_HANDLED; 110 return IRQ_HANDLED;
111 } 111 }
112#ifdef TRACE_FLPY_INT 112#ifdef TRACE_FLPY_INT
diff --git a/include/asm-x86_64/irq_regs.h b/include/asm-x86_64/irq_regs.h
new file mode 100644
index 000000000000..3dd9c0b70270
--- /dev/null
+++ b/include/asm-x86_64/irq_regs.h
@@ -0,0 +1 @@
#include <asm-generic/irq_regs.h>
diff --git a/include/asm-x86_64/proto.h b/include/asm-x86_64/proto.h
index c28fc2db2171..c181fef786e4 100644
--- a/include/asm-x86_64/proto.h
+++ b/include/asm-x86_64/proto.h
@@ -66,7 +66,7 @@ extern void free_bootmem_generic(unsigned long phys, unsigned len);
66extern void load_gs_index(unsigned gs); 66extern void load_gs_index(unsigned gs);
67 67
68extern void stop_timer_interrupt(void); 68extern void stop_timer_interrupt(void);
69extern void main_timer_handler(struct pt_regs *regs); 69extern void main_timer_handler(void);
70 70
71extern unsigned long end_pfn_map; 71extern unsigned long end_pfn_map;
72 72
@@ -124,7 +124,7 @@ extern int notsc_setup(char *);
124 124
125extern int gsi_irq_sharing(int gsi); 125extern int gsi_irq_sharing(int gsi);
126 126
127extern void smp_local_timer_interrupt(struct pt_regs * regs); 127extern void smp_local_timer_interrupt(void);
128 128
129long do_arch_prctl(struct task_struct *task, int code, unsigned long addr); 129long do_arch_prctl(struct task_struct *task, int code, unsigned long addr);
130 130
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);
diff --git a/include/sound/cs4231.h b/include/sound/cs4231.h
index 60b5b92a1319..ab51ce1ba9a5 100644
--- a/include/sound/cs4231.h
+++ b/include/sound/cs4231.h
@@ -273,7 +273,7 @@ unsigned char snd_cs4236_ext_in(struct snd_cs4231 *chip, unsigned char reg);
273void snd_cs4231_mce_up(struct snd_cs4231 *chip); 273void snd_cs4231_mce_up(struct snd_cs4231 *chip);
274void snd_cs4231_mce_down(struct snd_cs4231 *chip); 274void snd_cs4231_mce_down(struct snd_cs4231 *chip);
275 275
276irqreturn_t snd_cs4231_interrupt(int irq, void *dev_id, struct pt_regs *regs); 276irqreturn_t snd_cs4231_interrupt(int irq, void *dev_id);
277 277
278const char *snd_cs4231_chip_id(struct snd_cs4231 *chip); 278const char *snd_cs4231_chip_id(struct snd_cs4231 *chip);
279 279
diff --git a/include/sound/emu10k1.h b/include/sound/emu10k1.h
index 892e310c504d..3d3c1514cf71 100644
--- a/include/sound/emu10k1.h
+++ b/include/sound/emu10k1.h
@@ -1194,7 +1194,7 @@ int snd_emu10k1_mixer(struct snd_emu10k1 * emu, int pcm_device, int multi_device
1194int snd_emu10k1_timer(struct snd_emu10k1 * emu, int device); 1194int snd_emu10k1_timer(struct snd_emu10k1 * emu, int device);
1195int snd_emu10k1_fx8010_new(struct snd_emu10k1 *emu, int device, struct snd_hwdep ** rhwdep); 1195int snd_emu10k1_fx8010_new(struct snd_emu10k1 *emu, int device, struct snd_hwdep ** rhwdep);
1196 1196
1197irqreturn_t snd_emu10k1_interrupt(int irq, void *dev_id, struct pt_regs *regs); 1197irqreturn_t snd_emu10k1_interrupt(int irq, void *dev_id);
1198 1198
1199void snd_emu10k1_voice_init(struct snd_emu10k1 * emu, int voice); 1199void snd_emu10k1_voice_init(struct snd_emu10k1 * emu, int voice);
1200int snd_emu10k1_init_efx(struct snd_emu10k1 *emu); 1200int snd_emu10k1_init_efx(struct snd_emu10k1 *emu);
diff --git a/include/sound/gus.h b/include/sound/gus.h
index 68a664ab97f3..c49ea57db8cc 100644
--- a/include/sound/gus.h
+++ b/include/sound/gus.h
@@ -638,7 +638,7 @@ int snd_gus_initialize(struct snd_gus_card * gus);
638 638
639/* gus_irq.c */ 639/* gus_irq.c */
640 640
641irqreturn_t snd_gus_interrupt(int irq, void *dev_id, struct pt_regs *regs); 641irqreturn_t snd_gus_interrupt(int irq, void *dev_id);
642#ifdef CONFIG_SND_DEBUG 642#ifdef CONFIG_SND_DEBUG
643void snd_gus_irq_profile_init(struct snd_gus_card *gus); 643void snd_gus_irq_profile_init(struct snd_gus_card *gus);
644#endif 644#endif
diff --git a/include/sound/initval.h b/include/sound/initval.h
index 2ae76efc696f..e85b90750a59 100644
--- a/include/sound/initval.h
+++ b/include/sound/initval.h
@@ -53,7 +53,7 @@
53#ifdef SNDRV_LEGACY_FIND_FREE_IRQ 53#ifdef SNDRV_LEGACY_FIND_FREE_IRQ
54#include <linux/interrupt.h> 54#include <linux/interrupt.h>
55 55
56static irqreturn_t snd_legacy_empty_irq_handler(int irq, void *dev_id, struct pt_regs *regs) 56static irqreturn_t snd_legacy_empty_irq_handler(int irq, void *dev_id)
57{ 57{
58 return IRQ_HANDLED; 58 return IRQ_HANDLED;
59} 59}
diff --git a/include/sound/mpu401.h b/include/sound/mpu401.h
index ac504321ea56..8c88267e9bea 100644
--- a/include/sound/mpu401.h
+++ b/include/sound/mpu401.h
@@ -106,10 +106,8 @@ struct snd_mpu401 {
106 106
107 */ 107 */
108 108
109irqreturn_t snd_mpu401_uart_interrupt(int irq, void *dev_id, 109irqreturn_t snd_mpu401_uart_interrupt(int irq, void *dev_id);
110 struct pt_regs *regs); 110irqreturn_t snd_mpu401_uart_interrupt_tx(int irq, void *dev_id);
111irqreturn_t snd_mpu401_uart_interrupt_tx(int irq, void *dev_id,
112 struct pt_regs *regs);
113 111
114int snd_mpu401_uart_new(struct snd_card *card, 112int snd_mpu401_uart_new(struct snd_card *card,
115 int device, 113 int device,
diff --git a/include/sound/sb.h b/include/sound/sb.h
index 431d06675e36..2dd5c8e5b4fe 100644
--- a/include/sound/sb.h
+++ b/include/sound/sb.h
@@ -100,7 +100,7 @@ struct snd_sb {
100 struct snd_rawmidi *rmidi; 100 struct snd_rawmidi *rmidi;
101 struct snd_rawmidi_substream *midi_substream_input; 101 struct snd_rawmidi_substream *midi_substream_input;
102 struct snd_rawmidi_substream *midi_substream_output; 102 struct snd_rawmidi_substream *midi_substream_output;
103 irqreturn_t (*rmidi_callback)(int irq, void *dev_id, struct pt_regs *regs); 103 irq_handler_t rmidi_callback;
104 104
105 spinlock_t reg_lock; 105 spinlock_t reg_lock;
106 spinlock_t open_lock; 106 spinlock_t open_lock;
@@ -286,7 +286,7 @@ int snd_sbdsp_reset(struct snd_sb *chip);
286int snd_sbdsp_create(struct snd_card *card, 286int snd_sbdsp_create(struct snd_card *card,
287 unsigned long port, 287 unsigned long port,
288 int irq, 288 int irq,
289 irqreturn_t (*irq_handler)(int, void *, struct pt_regs *), 289 irq_handler_t irq_handler,
290 int dma8, int dma16, 290 int dma8, int dma16,
291 unsigned short hardware, 291 unsigned short hardware,
292 struct snd_sb **r_chip); 292 struct snd_sb **r_chip);
@@ -316,7 +316,7 @@ int snd_sb16dsp_pcm(struct snd_sb *chip, int device, struct snd_pcm ** rpcm);
316const struct snd_pcm_ops *snd_sb16dsp_get_pcm_ops(int direction); 316const struct snd_pcm_ops *snd_sb16dsp_get_pcm_ops(int direction);
317int snd_sb16dsp_configure(struct snd_sb *chip); 317int snd_sb16dsp_configure(struct snd_sb *chip);
318/* sb16.c */ 318/* sb16.c */
319irqreturn_t snd_sb16dsp_interrupt(int irq, void *dev_id, struct pt_regs *regs); 319irqreturn_t snd_sb16dsp_interrupt(int irq, void *dev_id);
320 320
321/* exported mixer stuffs */ 321/* exported mixer stuffs */
322enum { 322enum {
diff --git a/include/sound/vx_core.h b/include/sound/vx_core.h
index dbca14170615..217394652090 100644
--- a/include/sound/vx_core.h
+++ b/include/sound/vx_core.h
@@ -228,7 +228,7 @@ void snd_vx_free_firmware(struct vx_core *chip);
228/* 228/*
229 * interrupt handler; exported for pcmcia 229 * interrupt handler; exported for pcmcia
230 */ 230 */
231irqreturn_t snd_vx_irq_handler(int irq, void *dev, struct pt_regs *regs); 231irqreturn_t snd_vx_irq_handler(int irq, void *dev);
232 232
233/* 233/*
234 * lowlevel functions 234 * lowlevel functions