aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-10-05 19:32:01 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-05 19:32:01 -0400
commit44aefd2706bb6f5b65ba2c38cd89e7609e2b43d3 (patch)
tree93824f573767da634fbc82c388b6d33cc454212b /arch
parentc1a26e7d40fb814716950122353a1a556844286b (diff)
parent7d12e780e003f93433d49ce78cfedf4b4c52adc5 (diff)
Merge git://git.infradead.org/~dhowells/irq-2.6
* git://git.infradead.org/~dhowells/irq-2.6: IRQ: Maintain regs pointer globally rather than passing to IRQ handlers IRQ: Typedef the IRQ handler function type IRQ: Typedef the IRQ flow handler function type
Diffstat (limited to 'arch')
-rw-r--r--arch/frv/kernel/dma.c5
-rw-r--r--arch/frv/kernel/irq-mb93091.c4
-rw-r--r--arch/frv/kernel/irq-mb93093.c4
-rw-r--r--arch/frv/kernel/irq-mb93493.c4
-rw-r--r--arch/frv/kernel/irq.c2
-rw-r--r--arch/frv/kernel/time.c8
-rw-r--r--arch/i386/kernel/apic.c18
-rw-r--r--arch/i386/kernel/i8259.c4
-rw-r--r--arch/i386/kernel/irq.c12
-rw-r--r--arch/i386/kernel/smp.c6
-rw-r--r--arch/i386/kernel/time.c6
-rw-r--r--arch/i386/kernel/time_hpet.c4
-rw-r--r--arch/i386/kernel/vm86.c2
-rw-r--r--arch/i386/mach-visws/visws_apic.c4
-rw-r--r--arch/i386/mach-voyager/voyager_basic.c2
-rw-r--r--arch/i386/mach-voyager/voyager_smp.c28
-rw-r--r--arch/ia64/kernel/irq_ia64.c4
-rw-r--r--arch/ia64/kernel/machvec.c2
-rw-r--r--arch/ia64/kernel/mca.c32
-rw-r--r--arch/ia64/kernel/time.c8
-rw-r--r--arch/ia64/sn/pci/tioca_provider.c3
-rw-r--r--arch/ia64/sn/pci/tioce_provider.c3
-rw-r--r--arch/mips/kernel/irq.c4
-rw-r--r--arch/mips/kernel/time.c24
-rw-r--r--arch/mips/sgi-ip22/ip22-reset.c2
-rw-r--r--arch/mips/sgi-ip22/ip22-time.c4
-rw-r--r--arch/powerpc/kernel/irq.c6
-rw-r--r--arch/powerpc/kernel/misc_64.S6
-rw-r--r--arch/powerpc/kernel/smp.c6
-rw-r--r--arch/powerpc/kernel/time.c6
-rw-r--r--arch/powerpc/platforms/cell/interrupt.c4
-rw-r--r--arch/powerpc/platforms/cell/spider-pic.c5
-rw-r--r--arch/powerpc/platforms/powermac/low_i2c.c2
-rw-r--r--arch/powerpc/platforms/powermac/pfunc_base.c2
-rw-r--r--arch/powerpc/platforms/powermac/pic.c7
-rw-r--r--arch/powerpc/platforms/pseries/ras.c14
-rw-r--r--arch/powerpc/platforms/pseries/setup.c7
-rw-r--r--arch/powerpc/platforms/pseries/xics.c18
-rw-r--r--arch/powerpc/platforms/pseries/xics.h3
-rw-r--r--arch/powerpc/sysdev/mpic.c4
-rw-r--r--arch/powerpc/xmon/xmon.c6
-rw-r--r--arch/x86_64/kernel/apic.c12
-rw-r--r--arch/x86_64/kernel/irq.c7
-rw-r--r--arch/x86_64/kernel/time.c20
44 files changed, 178 insertions, 156 deletions
diff --git a/arch/frv/kernel/dma.c b/arch/frv/kernel/dma.c
index f5de6cf7df4e..156184e17e57 100644
--- a/arch/frv/kernel/dma.c
+++ b/arch/frv/kernel/dma.c
@@ -121,15 +121,14 @@ unsigned long frv_dma_inprogress;
121/* 121/*
122 * DMA irq handler - determine channel involved, grab status and call real handler 122 * DMA irq handler - determine channel involved, grab status and call real handler
123 */ 123 */
124static irqreturn_t dma_irq_handler(int irq, void *_channel, struct pt_regs *regs) 124static irqreturn_t dma_irq_handler(int irq, void *_channel)
125{ 125{
126 struct frv_dma_channel *channel = _channel; 126 struct frv_dma_channel *channel = _channel;
127 127
128 frv_clear_dma_inprogress(channel - frv_dma_channels); 128 frv_clear_dma_inprogress(channel - frv_dma_channels);
129 return channel->handler(channel - frv_dma_channels, 129 return channel->handler(channel - frv_dma_channels,
130 __get_DMAC(channel->ioaddr, CSTR), 130 __get_DMAC(channel->ioaddr, CSTR),
131 channel->data, 131 channel->data);
132 regs);
133 132
134} /* end dma_irq_handler() */ 133} /* end dma_irq_handler() */
135 134
diff --git a/arch/frv/kernel/irq-mb93091.c b/arch/frv/kernel/irq-mb93091.c
index 369bc0a7443d..ad753c1e9b8f 100644
--- a/arch/frv/kernel/irq-mb93091.c
+++ b/arch/frv/kernel/irq-mb93091.c
@@ -80,7 +80,7 @@ static struct irq_chip frv_fpga_pic = {
80/* 80/*
81 * FPGA PIC interrupt handler 81 * FPGA PIC interrupt handler
82 */ 82 */
83static irqreturn_t fpga_interrupt(int irq, void *_mask, struct pt_regs *regs) 83static irqreturn_t fpga_interrupt(int irq, void *_mask)
84{ 84{
85 uint16_t imr, mask = (unsigned long) _mask; 85 uint16_t imr, mask = (unsigned long) _mask;
86 86
@@ -95,7 +95,7 @@ static irqreturn_t fpga_interrupt(int irq, void *_mask, struct pt_regs *regs)
95 irq = 31 - irq; 95 irq = 31 - irq;
96 mask &= ~(1 << irq); 96 mask &= ~(1 << irq);
97 97
98 generic_handle_irq(IRQ_BASE_FPGA + irq, regs); 98 generic_handle_irq(IRQ_BASE_FPGA + irq);
99 } 99 }
100 100
101 return IRQ_HANDLED; 101 return IRQ_HANDLED;
diff --git a/arch/frv/kernel/irq-mb93093.c b/arch/frv/kernel/irq-mb93093.c
index a43a22158956..e0983f6926ed 100644
--- a/arch/frv/kernel/irq-mb93093.c
+++ b/arch/frv/kernel/irq-mb93093.c
@@ -79,7 +79,7 @@ static struct irq_chip frv_fpga_pic = {
79/* 79/*
80 * FPGA PIC interrupt handler 80 * FPGA PIC interrupt handler
81 */ 81 */
82static irqreturn_t fpga_interrupt(int irq, void *_mask, struct pt_regs *regs) 82static irqreturn_t fpga_interrupt(int irq, void *_mask)
83{ 83{
84 uint16_t imr, mask = (unsigned long) _mask; 84 uint16_t imr, mask = (unsigned long) _mask;
85 85
@@ -94,7 +94,7 @@ static irqreturn_t fpga_interrupt(int irq, void *_mask, struct pt_regs *regs)
94 irq = 31 - irq; 94 irq = 31 - irq;
95 mask &= ~(1 << irq); 95 mask &= ~(1 << irq);
96 96
97 generic_irq_handle(IRQ_BASE_FPGA + irq, regs); 97 generic_irq_handle(IRQ_BASE_FPGA + irq);
98 } 98 }
99 99
100 return IRQ_HANDLED; 100 return IRQ_HANDLED;
diff --git a/arch/frv/kernel/irq-mb93493.c b/arch/frv/kernel/irq-mb93493.c
index 39c0188a3498..c157eeff871d 100644
--- a/arch/frv/kernel/irq-mb93493.c
+++ b/arch/frv/kernel/irq-mb93493.c
@@ -90,7 +90,7 @@ static struct irq_chip frv_mb93493_pic = {
90/* 90/*
91 * MB93493 PIC interrupt handler 91 * MB93493 PIC interrupt handler
92 */ 92 */
93static irqreturn_t mb93493_interrupt(int irq, void *_piqsr, struct pt_regs *regs) 93static irqreturn_t mb93493_interrupt(int irq, void *_piqsr)
94{ 94{
95 volatile void *piqsr = _piqsr; 95 volatile void *piqsr = _piqsr;
96 uint32_t iqsr; 96 uint32_t iqsr;
@@ -106,7 +106,7 @@ static irqreturn_t mb93493_interrupt(int irq, void *_piqsr, struct pt_regs *regs
106 irq = 31 - irq; 106 irq = 31 - irq;
107 iqsr &= ~(1 << irq); 107 iqsr &= ~(1 << irq);
108 108
109 generic_handle_irq(IRQ_BASE_MB93493 + irq, regs); 109 generic_handle_irq(IRQ_BASE_MB93493 + irq);
110 } 110 }
111 111
112 return IRQ_HANDLED; 112 return IRQ_HANDLED;
diff --git a/arch/frv/kernel/irq.c b/arch/frv/kernel/irq.c
index 5ac041c7c0a4..87f360a4ea27 100644
--- a/arch/frv/kernel/irq.c
+++ b/arch/frv/kernel/irq.c
@@ -143,7 +143,7 @@ static struct irq_chip frv_cpu_pic = {
143asmlinkage void do_IRQ(void) 143asmlinkage void do_IRQ(void)
144{ 144{
145 irq_enter(); 145 irq_enter();
146 generic_handle_irq(__get_IRL(), __frame); 146 generic_handle_irq(__get_IRL());
147 irq_exit(); 147 irq_exit();
148} 148}
149 149
diff --git a/arch/frv/kernel/time.c b/arch/frv/kernel/time.c
index 44a9aebc4f5a..ed588d73d7d8 100644
--- a/arch/frv/kernel/time.c
+++ b/arch/frv/kernel/time.c
@@ -40,7 +40,7 @@ unsigned long __nongprelbss __dsu_clock_speed_HZ;
40unsigned long __nongprelbss __serial_clock_speed_HZ; 40unsigned long __nongprelbss __serial_clock_speed_HZ;
41unsigned long __delay_loops_MHz; 41unsigned long __delay_loops_MHz;
42 42
43static irqreturn_t timer_interrupt(int irq, void *dummy, struct pt_regs *regs); 43static irqreturn_t timer_interrupt(int irq, void *dummy);
44 44
45static struct irqaction timer_irq = { 45static struct irqaction timer_irq = {
46 timer_interrupt, IRQF_DISABLED, CPU_MASK_NONE, "timer", NULL, NULL 46 timer_interrupt, IRQF_DISABLED, CPU_MASK_NONE, "timer", NULL, NULL
@@ -55,7 +55,7 @@ static inline int set_rtc_mmss(unsigned long nowtime)
55 * timer_interrupt() needs to keep up the real-time clock, 55 * timer_interrupt() needs to keep up the real-time clock,
56 * as well as call the "do_timer()" routine every clocktick 56 * as well as call the "do_timer()" routine every clocktick
57 */ 57 */
58static irqreturn_t timer_interrupt(int irq, void *dummy, struct pt_regs * regs) 58static irqreturn_t timer_interrupt(int irq, void *dummy)
59{ 59{
60 /* last time the cmos clock got updated */ 60 /* last time the cmos clock got updated */
61 static long last_rtc_update = 0; 61 static long last_rtc_update = 0;
@@ -70,8 +70,8 @@ static irqreturn_t timer_interrupt(int irq, void *dummy, struct pt_regs * regs)
70 write_seqlock(&xtime_lock); 70 write_seqlock(&xtime_lock);
71 71
72 do_timer(1); 72 do_timer(1);
73 update_process_times(user_mode(regs)); 73 update_process_times(user_mode(get_irq_regs()));
74 profile_tick(CPU_PROFILING, regs); 74 profile_tick(CPU_PROFILING);
75 75
76 /* 76 /*
77 * If we have an externally synchronized Linux clock, then update 77 * If we have an externally synchronized Linux clock, then update
diff --git a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c
index 90faae5c5d30..7d500da0e63b 100644
--- a/arch/i386/kernel/apic.c
+++ b/arch/i386/kernel/apic.c
@@ -1193,11 +1193,11 @@ EXPORT_SYMBOL(switch_ipi_to_APIC_timer);
1193 * value into /proc/profile. 1193 * value into /proc/profile.
1194 */ 1194 */
1195 1195
1196inline void smp_local_timer_interrupt(struct pt_regs * regs) 1196inline void smp_local_timer_interrupt(void)
1197{ 1197{
1198 profile_tick(CPU_PROFILING, regs); 1198 profile_tick(CPU_PROFILING);
1199#ifdef CONFIG_SMP 1199#ifdef CONFIG_SMP
1200 update_process_times(user_mode_vm(regs)); 1200 update_process_times(user_mode_vm(irq_regs));
1201#endif 1201#endif
1202 1202
1203 /* 1203 /*
@@ -1223,6 +1223,7 @@ inline void smp_local_timer_interrupt(struct pt_regs * regs)
1223 1223
1224fastcall void smp_apic_timer_interrupt(struct pt_regs *regs) 1224fastcall void smp_apic_timer_interrupt(struct pt_regs *regs)
1225{ 1225{
1226 struct pt_regs *old_regs = set_irq_regs(regs);
1226 int cpu = smp_processor_id(); 1227 int cpu = smp_processor_id();
1227 1228
1228 /* 1229 /*
@@ -1241,12 +1242,13 @@ fastcall void smp_apic_timer_interrupt(struct pt_regs *regs)
1241 * interrupt lock, which is the WrongThing (tm) to do. 1242 * interrupt lock, which is the WrongThing (tm) to do.
1242 */ 1243 */
1243 irq_enter(); 1244 irq_enter();
1244 smp_local_timer_interrupt(regs); 1245 smp_local_timer_interrupt();
1245 irq_exit(); 1246 irq_exit();
1247 set_irq_regs(old_regs);
1246} 1248}
1247 1249
1248#ifndef CONFIG_SMP 1250#ifndef CONFIG_SMP
1249static void up_apic_timer_interrupt_call(struct pt_regs *regs) 1251static void up_apic_timer_interrupt_call(void)
1250{ 1252{
1251 int cpu = smp_processor_id(); 1253 int cpu = smp_processor_id();
1252 1254
@@ -1255,11 +1257,11 @@ static void up_apic_timer_interrupt_call(struct pt_regs *regs)
1255 */ 1257 */
1256 per_cpu(irq_stat, cpu).apic_timer_irqs++; 1258 per_cpu(irq_stat, cpu).apic_timer_irqs++;
1257 1259
1258 smp_local_timer_interrupt(regs); 1260 smp_local_timer_interrupt();
1259} 1261}
1260#endif 1262#endif
1261 1263
1262void smp_send_timer_broadcast_ipi(struct pt_regs *regs) 1264void smp_send_timer_broadcast_ipi(void)
1263{ 1265{
1264 cpumask_t mask; 1266 cpumask_t mask;
1265 1267
@@ -1272,7 +1274,7 @@ void smp_send_timer_broadcast_ipi(struct pt_regs *regs)
1272 * We can directly call the apic timer interrupt handler 1274 * We can directly call the apic timer interrupt handler
1273 * in UP case. Minus all irq related functions 1275 * in UP case. Minus all irq related functions
1274 */ 1276 */
1275 up_apic_timer_interrupt_call(regs); 1277 up_apic_timer_interrupt_call();
1276#endif 1278#endif
1277 } 1279 }
1278} 1280}
diff --git a/arch/i386/kernel/i8259.c b/arch/i386/kernel/i8259.c
index d07ed31f11e3..d53eafb6daa7 100644
--- a/arch/i386/kernel/i8259.c
+++ b/arch/i386/kernel/i8259.c
@@ -335,13 +335,13 @@ void init_8259A(int auto_eoi)
335 */ 335 */
336 336
337 337
338static irqreturn_t math_error_irq(int cpl, void *dev_id, struct pt_regs *regs) 338static irqreturn_t math_error_irq(int cpl, void *dev_id)
339{ 339{
340 extern void math_error(void __user *); 340 extern void math_error(void __user *);
341 outb(0,0xF0); 341 outb(0,0xF0);
342 if (ignore_fpu_irq || !boot_cpu_data.hard_math) 342 if (ignore_fpu_irq || !boot_cpu_data.hard_math)
343 return IRQ_NONE; 343 return IRQ_NONE;
344 math_error((void __user *)regs->eip); 344 math_error((void __user *)get_irq_regs()->eip);
345 return IRQ_HANDLED; 345 return IRQ_HANDLED;
346} 346}
347 347
diff --git a/arch/i386/kernel/irq.c b/arch/i386/kernel/irq.c
index 3dd2e180151b..8cfc7dbec7b9 100644
--- a/arch/i386/kernel/irq.c
+++ b/arch/i386/kernel/irq.c
@@ -53,6 +53,7 @@ static union irq_ctx *softirq_ctx[NR_CPUS] __read_mostly;
53 */ 53 */
54fastcall unsigned int do_IRQ(struct pt_regs *regs) 54fastcall unsigned int do_IRQ(struct pt_regs *regs)
55{ 55{
56 struct pt_regs *old_regs;
56 /* high bit used in ret_from_ code */ 57 /* high bit used in ret_from_ code */
57 int irq = ~regs->orig_eax; 58 int irq = ~regs->orig_eax;
58 struct irq_desc *desc = irq_desc + irq; 59 struct irq_desc *desc = irq_desc + irq;
@@ -67,6 +68,7 @@ fastcall unsigned int do_IRQ(struct pt_regs *regs)
67 BUG(); 68 BUG();
68 } 69 }
69 70
71 old_regs = set_irq_regs(regs);
70 irq_enter(); 72 irq_enter();
71#ifdef CONFIG_DEBUG_STACKOVERFLOW 73#ifdef CONFIG_DEBUG_STACKOVERFLOW
72 /* Debugging check for stack overflow: is there less than 1KB free? */ 74 /* Debugging check for stack overflow: is there less than 1KB free? */
@@ -95,7 +97,7 @@ fastcall unsigned int do_IRQ(struct pt_regs *regs)
95 * current stack (which is the irq stack already after all) 97 * current stack (which is the irq stack already after all)
96 */ 98 */
97 if (curctx != irqctx) { 99 if (curctx != irqctx) {
98 int arg1, arg2, arg3, ebx; 100 int arg1, arg2, ebx;
99 101
100 /* build the stack frame on the IRQ stack */ 102 /* build the stack frame on the IRQ stack */
101 isp = (u32*) ((char*)irqctx + sizeof(*irqctx)); 103 isp = (u32*) ((char*)irqctx + sizeof(*irqctx));
@@ -114,17 +116,17 @@ fastcall unsigned int do_IRQ(struct pt_regs *regs)
114 " xchgl %%ebx,%%esp \n" 116 " xchgl %%ebx,%%esp \n"
115 " call *%%edi \n" 117 " call *%%edi \n"
116 " movl %%ebx,%%esp \n" 118 " movl %%ebx,%%esp \n"
117 : "=a" (arg1), "=d" (arg2), "=c" (arg3), "=b" (ebx) 119 : "=a" (arg1), "=d" (arg2), "=b" (ebx)
118 : "0" (irq), "1" (desc), "2" (regs), "3" (isp), 120 : "0" (irq), "1" (desc), "2" (isp),
119 "D" (desc->handle_irq) 121 "D" (desc->handle_irq)
120 : "memory", "cc" 122 : "memory", "cc"
121 ); 123 );
122 } else 124 } else
123#endif 125#endif
124 desc->handle_irq(irq, desc, regs); 126 desc->handle_irq(irq, desc);
125 127
126 irq_exit(); 128 irq_exit();
127 129 set_irq_regs(old_regs);
128 return 1; 130 return 1;
129} 131}
130 132
diff --git a/arch/i386/kernel/smp.c b/arch/i386/kernel/smp.c
index 1b080ab8a49f..31e5c6573aae 100644
--- a/arch/i386/kernel/smp.c
+++ b/arch/i386/kernel/smp.c
@@ -321,6 +321,7 @@ static inline void leave_mm (unsigned long cpu)
321 321
322fastcall void smp_invalidate_interrupt(struct pt_regs *regs) 322fastcall void smp_invalidate_interrupt(struct pt_regs *regs)
323{ 323{
324 struct pt_regs *old_regs = set_irq_regs(regs);
324 unsigned long cpu; 325 unsigned long cpu;
325 326
326 cpu = get_cpu(); 327 cpu = get_cpu();
@@ -351,6 +352,7 @@ fastcall void smp_invalidate_interrupt(struct pt_regs *regs)
351 smp_mb__after_clear_bit(); 352 smp_mb__after_clear_bit();
352out: 353out:
353 put_cpu_no_resched(); 354 put_cpu_no_resched();
355 set_irq_regs(old_regs);
354} 356}
355 357
356static void flush_tlb_others(cpumask_t cpumask, struct mm_struct *mm, 358static void flush_tlb_others(cpumask_t cpumask, struct mm_struct *mm,
@@ -605,11 +607,14 @@ void smp_send_stop(void)
605 */ 607 */
606fastcall void smp_reschedule_interrupt(struct pt_regs *regs) 608fastcall void smp_reschedule_interrupt(struct pt_regs *regs)
607{ 609{
610 struct pt_regs *old_regs = set_irq_regs(regs);
608 ack_APIC_irq(); 611 ack_APIC_irq();
612 set_irq_regs(old_regs);
609} 613}
610 614
611fastcall void smp_call_function_interrupt(struct pt_regs *regs) 615fastcall void smp_call_function_interrupt(struct pt_regs *regs)
612{ 616{
617 struct pt_regs *old_regs = set_irq_regs(regs);
613 void (*func) (void *info) = call_data->func; 618 void (*func) (void *info) = call_data->func;
614 void *info = call_data->info; 619 void *info = call_data->info;
615 int wait = call_data->wait; 620 int wait = call_data->wait;
@@ -632,6 +637,7 @@ fastcall void smp_call_function_interrupt(struct pt_regs *regs)
632 mb(); 637 mb();
633 atomic_inc(&call_data->finished); 638 atomic_inc(&call_data->finished);
634 } 639 }
640 set_irq_regs(old_regs);
635} 641}
636 642
637/* 643/*
diff --git a/arch/i386/kernel/time.c b/arch/i386/kernel/time.c
index 58a2d5582419..3f221f5eb47e 100644
--- a/arch/i386/kernel/time.c
+++ b/arch/i386/kernel/time.c
@@ -161,7 +161,7 @@ EXPORT_SYMBOL(profile_pc);
161 * Time Stamp Counter value at the time of the timer interrupt, so that 161 * Time Stamp Counter value at the time of the timer interrupt, so that
162 * we later on can estimate the time of day more exactly. 162 * we later on can estimate the time of day more exactly.
163 */ 163 */
164irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) 164irqreturn_t timer_interrupt(int irq, void *dev_id)
165{ 165{
166 /* 166 /*
167 * Here we are in the timer irq handler. We just have irqs locally 167 * Here we are in the timer irq handler. We just have irqs locally
@@ -188,7 +188,7 @@ irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
188 } 188 }
189#endif 189#endif
190 190
191 do_timer_interrupt_hook(regs); 191 do_timer_interrupt_hook();
192 192
193 193
194 if (MCA_bus) { 194 if (MCA_bus) {
@@ -209,7 +209,7 @@ irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
209 209
210#ifdef CONFIG_X86_LOCAL_APIC 210#ifdef CONFIG_X86_LOCAL_APIC
211 if (using_apic_timer) 211 if (using_apic_timer)
212 smp_send_timer_broadcast_ipi(regs); 212 smp_send_timer_broadcast_ipi();
213#endif 213#endif
214 214
215 return IRQ_HANDLED; 215 return IRQ_HANDLED;
diff --git a/arch/i386/kernel/time_hpet.c b/arch/i386/kernel/time_hpet.c
index 6bf14a4e995e..1a2a979cf6a3 100644
--- a/arch/i386/kernel/time_hpet.c
+++ b/arch/i386/kernel/time_hpet.c
@@ -441,7 +441,7 @@ int hpet_rtc_dropped_irq(void)
441 return 1; 441 return 1;
442} 442}
443 443
444irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs) 444irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id)
445{ 445{
446 struct rtc_time curr_time; 446 struct rtc_time curr_time;
447 unsigned long rtc_int_flag = 0; 447 unsigned long rtc_int_flag = 0;
@@ -480,7 +480,7 @@ irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
480 } 480 }
481 if (call_rtc_interrupt) { 481 if (call_rtc_interrupt) {
482 rtc_int_flag |= (RTC_IRQF | (RTC_NUM_INTS << 8)); 482 rtc_int_flag |= (RTC_IRQF | (RTC_NUM_INTS << 8));
483 rtc_interrupt(rtc_int_flag, dev_id, regs); 483 rtc_interrupt(rtc_int_flag, dev_id);
484 } 484 }
485 return IRQ_HANDLED; 485 return IRQ_HANDLED;
486} 486}
diff --git a/arch/i386/kernel/vm86.c b/arch/i386/kernel/vm86.c
index 8355d8d87d18..cbcd61d6120b 100644
--- a/arch/i386/kernel/vm86.c
+++ b/arch/i386/kernel/vm86.c
@@ -714,7 +714,7 @@ static int irqbits;
714 | (1 << SIGUSR1) | (1 << SIGUSR2) | (1 << SIGIO) | (1 << SIGURG) \ 714 | (1 << SIGUSR1) | (1 << SIGUSR2) | (1 << SIGIO) | (1 << SIGURG) \
715 | (1 << SIGUNUSED) ) 715 | (1 << SIGUNUSED) )
716 716
717static irqreturn_t irq_handler(int intno, void *dev_id, struct pt_regs * regs) 717static irqreturn_t irq_handler(int intno, void *dev_id)
718{ 718{
719 int irq_bit; 719 int irq_bit;
720 unsigned long flags; 720 unsigned long flags;
diff --git a/arch/i386/mach-visws/visws_apic.c b/arch/i386/mach-visws/visws_apic.c
index 5929f884d79b..07097ed48890 100644
--- a/arch/i386/mach-visws/visws_apic.c
+++ b/arch/i386/mach-visws/visws_apic.c
@@ -191,7 +191,7 @@ static struct hw_interrupt_type piix4_virtual_irq_type = {
191 * enable_irq gets the right irq. This 'master' irq is never directly 191 * enable_irq gets the right irq. This 'master' irq is never directly
192 * manipulated by any driver. 192 * manipulated by any driver.
193 */ 193 */
194static irqreturn_t piix4_master_intr(int irq, void *dev_id, struct pt_regs * regs) 194static irqreturn_t piix4_master_intr(int irq, void *dev_id)
195{ 195{
196 int realirq; 196 int realirq;
197 irq_desc_t *desc; 197 irq_desc_t *desc;
@@ -244,7 +244,7 @@ static irqreturn_t piix4_master_intr(int irq, void *dev_id, struct pt_regs * reg
244 kstat_cpu(smp_processor_id()).irqs[realirq]++; 244 kstat_cpu(smp_processor_id()).irqs[realirq]++;
245 245
246 if (likely(desc->action != NULL)) 246 if (likely(desc->action != NULL))
247 handle_IRQ_event(realirq, regs, desc->action); 247 handle_IRQ_event(realirq, desc->action);
248 248
249 if (!(desc->status & IRQ_DISABLED)) 249 if (!(desc->status & IRQ_DISABLED))
250 enable_8259A_irq(realirq); 250 enable_8259A_irq(realirq);
diff --git a/arch/i386/mach-voyager/voyager_basic.c b/arch/i386/mach-voyager/voyager_basic.c
index 80b7f2fc4f46..c639d30d8bdc 100644
--- a/arch/i386/mach-voyager/voyager_basic.c
+++ b/arch/i386/mach-voyager/voyager_basic.c
@@ -87,7 +87,7 @@ voyager_detect(struct voyager_bios_info *bios)
87} 87}
88 88
89void 89void
90voyager_system_interrupt(int cpl, void *dev_id, struct pt_regs *regs) 90voyager_system_interrupt(int cpl, void *dev_id)
91{ 91{
92 printk("Voyager: detected system interrupt\n"); 92 printk("Voyager: detected system interrupt\n");
93} 93}
diff --git a/arch/i386/mach-voyager/voyager_smp.c b/arch/i386/mach-voyager/voyager_smp.c
index 856c73fcb7e7..d42422fc4af3 100644
--- a/arch/i386/mach-voyager/voyager_smp.c
+++ b/arch/i386/mach-voyager/voyager_smp.c
@@ -126,10 +126,10 @@ send_QIC_CPI(__u32 cpuset, __u8 cpi)
126} 126}
127 127
128static inline void 128static inline void
129wrapper_smp_local_timer_interrupt(struct pt_regs *regs) 129wrapper_smp_local_timer_interrupt(void)
130{ 130{
131 irq_enter(); 131 irq_enter();
132 smp_local_timer_interrupt(regs); 132 smp_local_timer_interrupt();
133 irq_exit(); 133 irq_exit();
134} 134}
135 135
@@ -786,7 +786,7 @@ fastcall void
786smp_vic_sys_interrupt(struct pt_regs *regs) 786smp_vic_sys_interrupt(struct pt_regs *regs)
787{ 787{
788 ack_CPI(VIC_SYS_INT); 788 ack_CPI(VIC_SYS_INT);
789 printk("Voyager SYSTEM INTERRUPT\n"); 789 printk("Voyager SYSTEM INTERRUPT\n");
790} 790}
791 791
792/* Handle a voyager CMN_INT; These interrupts occur either because of 792/* Handle a voyager CMN_INT; These interrupts occur either because of
@@ -1135,7 +1135,9 @@ EXPORT_SYMBOL(smp_call_function);
1135fastcall void 1135fastcall void
1136smp_apic_timer_interrupt(struct pt_regs *regs) 1136smp_apic_timer_interrupt(struct pt_regs *regs)
1137{ 1137{
1138 wrapper_smp_local_timer_interrupt(regs); 1138 struct pt_regs *old_regs = set_irq_regs(regs);
1139 wrapper_smp_local_timer_interrupt();
1140 set_irq_regs(old_regs);
1139} 1141}
1140 1142
1141/* All of the QUAD interrupt GATES */ 1143/* All of the QUAD interrupt GATES */
@@ -1143,7 +1145,9 @@ fastcall void
1143smp_qic_timer_interrupt(struct pt_regs *regs) 1145smp_qic_timer_interrupt(struct pt_regs *regs)
1144{ 1146{
1145 ack_QIC_CPI(QIC_TIMER_CPI); 1147 ack_QIC_CPI(QIC_TIMER_CPI);
1146 wrapper_smp_local_timer_interrupt(regs); 1148 struct pt_regs *old_regs = set_irq_regs(regs);
1149 wrapper_smp_local_timer_interrupt(void);
1150 set_irq_regs(old_regs);
1147} 1151}
1148 1152
1149fastcall void 1153fastcall void
@@ -1177,6 +1181,7 @@ smp_qic_call_function_interrupt(struct pt_regs *regs)
1177fastcall void 1181fastcall void
1178smp_vic_cpi_interrupt(struct pt_regs *regs) 1182smp_vic_cpi_interrupt(struct pt_regs *regs)
1179{ 1183{
1184 struct pt_regs *old_regs = set_irq_regs(regs);
1180 __u8 cpu = smp_processor_id(); 1185 __u8 cpu = smp_processor_id();
1181 1186
1182 if(is_cpu_quad()) 1187 if(is_cpu_quad())
@@ -1185,7 +1190,7 @@ smp_vic_cpi_interrupt(struct pt_regs *regs)
1185 ack_VIC_CPI(VIC_CPI_LEVEL0); 1190 ack_VIC_CPI(VIC_CPI_LEVEL0);
1186 1191
1187 if(test_and_clear_bit(VIC_TIMER_CPI, &vic_cpi_mailbox[cpu])) 1192 if(test_and_clear_bit(VIC_TIMER_CPI, &vic_cpi_mailbox[cpu]))
1188 wrapper_smp_local_timer_interrupt(regs); 1193 wrapper_smp_local_timer_interrupt();
1189 if(test_and_clear_bit(VIC_INVALIDATE_CPI, &vic_cpi_mailbox[cpu])) 1194 if(test_and_clear_bit(VIC_INVALIDATE_CPI, &vic_cpi_mailbox[cpu]))
1190 smp_invalidate_interrupt(); 1195 smp_invalidate_interrupt();
1191 if(test_and_clear_bit(VIC_RESCHEDULE_CPI, &vic_cpi_mailbox[cpu])) 1196 if(test_and_clear_bit(VIC_RESCHEDULE_CPI, &vic_cpi_mailbox[cpu]))
@@ -1194,6 +1199,7 @@ smp_vic_cpi_interrupt(struct pt_regs *regs)
1194 smp_enable_irq_interrupt(); 1199 smp_enable_irq_interrupt();
1195 if(test_and_clear_bit(VIC_CALL_FUNCTION_CPI, &vic_cpi_mailbox[cpu])) 1200 if(test_and_clear_bit(VIC_CALL_FUNCTION_CPI, &vic_cpi_mailbox[cpu]))
1196 smp_call_function_interrupt(); 1201 smp_call_function_interrupt();
1202 set_irq_regs(old_regs);
1197} 1203}
1198 1204
1199static void 1205static void
@@ -1266,8 +1272,10 @@ smp_send_stop(void)
1266void 1272void
1267smp_vic_timer_interrupt(struct pt_regs *regs) 1273smp_vic_timer_interrupt(struct pt_regs *regs)
1268{ 1274{
1275 struct pt_regs *old_regs = set_irq_regs(regs);
1269 send_CPI_allbutself(VIC_TIMER_CPI); 1276 send_CPI_allbutself(VIC_TIMER_CPI);
1270 smp_local_timer_interrupt(regs); 1277 smp_local_timer_interrupt();
1278 set_irq_regs(old_regs);
1271} 1279}
1272 1280
1273/* local (per CPU) timer interrupt. It does both profiling and 1281/* local (per CPU) timer interrupt. It does both profiling and
@@ -1279,12 +1287,12 @@ smp_vic_timer_interrupt(struct pt_regs *regs)
1279 * value into /proc/profile. 1287 * value into /proc/profile.
1280 */ 1288 */
1281void 1289void
1282smp_local_timer_interrupt(struct pt_regs * regs) 1290smp_local_timer_interrupt(void)
1283{ 1291{
1284 int cpu = smp_processor_id(); 1292 int cpu = smp_processor_id();
1285 long weight; 1293 long weight;
1286 1294
1287 profile_tick(CPU_PROFILING, regs); 1295 profile_tick(CPU_PROFILING);
1288 if (--per_cpu(prof_counter, cpu) <= 0) { 1296 if (--per_cpu(prof_counter, cpu) <= 0) {
1289 /* 1297 /*
1290 * The multiplier may have changed since the last time we got 1298 * The multiplier may have changed since the last time we got
@@ -1302,7 +1310,7 @@ smp_local_timer_interrupt(struct pt_regs * regs)
1302 per_cpu(prof_counter, cpu); 1310 per_cpu(prof_counter, cpu);
1303 } 1311 }
1304 1312
1305 update_process_times(user_mode_vm(regs)); 1313 update_process_times(user_mode_vm(irq_regs));
1306 } 1314 }
1307 1315
1308 if( ((1<<cpu) & voyager_extended_vic_processors) == 0) 1316 if( ((1<<cpu) & voyager_extended_vic_processors) == 0)
diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c
index ab2d19c3661f..7fd3ef9e064d 100644
--- a/arch/ia64/kernel/irq_ia64.c
+++ b/arch/ia64/kernel/irq_ia64.c
@@ -138,6 +138,7 @@ void destroy_irq(unsigned int irq)
138void 138void
139ia64_handle_irq (ia64_vector vector, struct pt_regs *regs) 139ia64_handle_irq (ia64_vector vector, struct pt_regs *regs)
140{ 140{
141 struct pt_regs *old_regs = set_irq_regs(regs);
141 unsigned long saved_tpr; 142 unsigned long saved_tpr;
142 143
143#if IRQ_DEBUG 144#if IRQ_DEBUG
@@ -183,7 +184,7 @@ ia64_handle_irq (ia64_vector vector, struct pt_regs *regs)
183 ia64_setreg(_IA64_REG_CR_TPR, vector); 184 ia64_setreg(_IA64_REG_CR_TPR, vector);
184 ia64_srlz_d(); 185 ia64_srlz_d();
185 186
186 __do_IRQ(local_vector_to_irq(vector), regs); 187 __do_IRQ(local_vector_to_irq(vector));
187 188
188 /* 189 /*
189 * Disable interrupts and send EOI: 190 * Disable interrupts and send EOI:
@@ -200,6 +201,7 @@ ia64_handle_irq (ia64_vector vector, struct pt_regs *regs)
200 * come through until ia64_eoi() has been done. 201 * come through until ia64_eoi() has been done.
201 */ 202 */
202 irq_exit(); 203 irq_exit();
204 set_irq_regs(old_regs);
203} 205}
204 206
205#ifdef CONFIG_HOTPLUG_CPU 207#ifdef CONFIG_HOTPLUG_CPU
diff --git a/arch/ia64/kernel/machvec.c b/arch/ia64/kernel/machvec.c
index d4a546aa5048..9620822270a6 100644
--- a/arch/ia64/kernel/machvec.c
+++ b/arch/ia64/kernel/machvec.c
@@ -60,7 +60,7 @@ machvec_setup (char **arg)
60EXPORT_SYMBOL(machvec_setup); 60EXPORT_SYMBOL(machvec_setup);
61 61
62void 62void
63machvec_timer_interrupt (int irq, void *dev_id, struct pt_regs *regs) 63machvec_timer_interrupt (int irq, void *dev_id)
64{ 64{
65} 65}
66EXPORT_SYMBOL(machvec_timer_interrupt); 66EXPORT_SYMBOL(machvec_timer_interrupt);
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c
index 663230183254..7cfa63a98cb3 100644
--- a/arch/ia64/kernel/mca.c
+++ b/arch/ia64/kernel/mca.c
@@ -499,7 +499,7 @@ int cpe_vector = -1;
499int ia64_cpe_irq = -1; 499int ia64_cpe_irq = -1;
500 500
501static irqreturn_t 501static irqreturn_t
502ia64_mca_cpe_int_handler (int cpe_irq, void *arg, struct pt_regs *ptregs) 502ia64_mca_cpe_int_handler (int cpe_irq, void *arg)
503{ 503{
504 static unsigned long cpe_history[CPE_HISTORY_LENGTH]; 504 static unsigned long cpe_history[CPE_HISTORY_LENGTH];
505 static int index; 505 static int index;
@@ -744,7 +744,7 @@ ia64_mca_wakeup_all(void)
744 * Outputs : None 744 * Outputs : None
745 */ 745 */
746static irqreturn_t 746static irqreturn_t
747ia64_mca_rendez_int_handler(int rendez_irq, void *arg, struct pt_regs *regs) 747ia64_mca_rendez_int_handler(int rendez_irq, void *arg)
748{ 748{
749 unsigned long flags; 749 unsigned long flags;
750 int cpu = smp_processor_id(); 750 int cpu = smp_processor_id();
@@ -753,8 +753,8 @@ ia64_mca_rendez_int_handler(int rendez_irq, void *arg, struct pt_regs *regs)
753 753
754 /* Mask all interrupts */ 754 /* Mask all interrupts */
755 local_irq_save(flags); 755 local_irq_save(flags);
756 if (notify_die(DIE_MCA_RENDZVOUS_ENTER, "MCA", regs, (long)&nd, 0, 0) 756 if (notify_die(DIE_MCA_RENDZVOUS_ENTER, "MCA", get_irq_regs(),
757 == NOTIFY_STOP) 757 (long)&nd, 0, 0) == NOTIFY_STOP)
758 ia64_mca_spin(__FUNCTION__); 758 ia64_mca_spin(__FUNCTION__);
759 759
760 ia64_mc_info.imi_rendez_checkin[cpu] = IA64_MCA_RENDEZ_CHECKIN_DONE; 760 ia64_mc_info.imi_rendez_checkin[cpu] = IA64_MCA_RENDEZ_CHECKIN_DONE;
@@ -763,16 +763,16 @@ ia64_mca_rendez_int_handler(int rendez_irq, void *arg, struct pt_regs *regs)
763 */ 763 */
764 ia64_sal_mc_rendez(); 764 ia64_sal_mc_rendez();
765 765
766 if (notify_die(DIE_MCA_RENDZVOUS_PROCESS, "MCA", regs, (long)&nd, 0, 0) 766 if (notify_die(DIE_MCA_RENDZVOUS_PROCESS, "MCA", get_irq_regs(),
767 == NOTIFY_STOP) 767 (long)&nd, 0, 0) == NOTIFY_STOP)
768 ia64_mca_spin(__FUNCTION__); 768 ia64_mca_spin(__FUNCTION__);
769 769
770 /* Wait for the monarch cpu to exit. */ 770 /* Wait for the monarch cpu to exit. */
771 while (monarch_cpu != -1) 771 while (monarch_cpu != -1)
772 cpu_relax(); /* spin until monarch leaves */ 772 cpu_relax(); /* spin until monarch leaves */
773 773
774 if (notify_die(DIE_MCA_RENDZVOUS_LEAVE, "MCA", regs, (long)&nd, 0, 0) 774 if (notify_die(DIE_MCA_RENDZVOUS_LEAVE, "MCA", get_irq_regs(),
775 == NOTIFY_STOP) 775 (long)&nd, 0, 0) == NOTIFY_STOP)
776 ia64_mca_spin(__FUNCTION__); 776 ia64_mca_spin(__FUNCTION__);
777 777
778 /* Enable all interrupts */ 778 /* Enable all interrupts */
@@ -791,12 +791,11 @@ ia64_mca_rendez_int_handler(int rendez_irq, void *arg, struct pt_regs *regs)
791 * 791 *
792 * Inputs : wakeup_irq (Wakeup-interrupt bit) 792 * Inputs : wakeup_irq (Wakeup-interrupt bit)
793 * arg (Interrupt handler specific argument) 793 * arg (Interrupt handler specific argument)
794 * ptregs (Exception frame at the time of the interrupt)
795 * Outputs : None 794 * Outputs : None
796 * 795 *
797 */ 796 */
798static irqreturn_t 797static irqreturn_t
799ia64_mca_wakeup_int_handler(int wakeup_irq, void *arg, struct pt_regs *ptregs) 798ia64_mca_wakeup_int_handler(int wakeup_irq, void *arg)
800{ 799{
801 return IRQ_HANDLED; 800 return IRQ_HANDLED;
802} 801}
@@ -1261,13 +1260,12 @@ static DECLARE_WORK(cmc_enable_work, ia64_mca_cmc_vector_enable_keventd, NULL);
1261 * Inputs 1260 * Inputs
1262 * interrupt number 1261 * interrupt number
1263 * client data arg ptr 1262 * client data arg ptr
1264 * saved registers ptr
1265 * 1263 *
1266 * Outputs 1264 * Outputs
1267 * None 1265 * None
1268 */ 1266 */
1269static irqreturn_t 1267static irqreturn_t
1270ia64_mca_cmc_int_handler(int cmc_irq, void *arg, struct pt_regs *ptregs) 1268ia64_mca_cmc_int_handler(int cmc_irq, void *arg)
1271{ 1269{
1272 static unsigned long cmc_history[CMC_HISTORY_LENGTH]; 1270 static unsigned long cmc_history[CMC_HISTORY_LENGTH];
1273 static int index; 1271 static int index;
@@ -1336,12 +1334,11 @@ out:
1336 * Inputs 1334 * Inputs
1337 * interrupt number 1335 * interrupt number
1338 * client data arg ptr 1336 * client data arg ptr
1339 * saved registers ptr
1340 * Outputs 1337 * Outputs
1341 * handled 1338 * handled
1342 */ 1339 */
1343static irqreturn_t 1340static irqreturn_t
1344ia64_mca_cmc_int_caller(int cmc_irq, void *arg, struct pt_regs *ptregs) 1341ia64_mca_cmc_int_caller(int cmc_irq, void *arg)
1345{ 1342{
1346 static int start_count = -1; 1343 static int start_count = -1;
1347 unsigned int cpuid; 1344 unsigned int cpuid;
@@ -1352,7 +1349,7 @@ ia64_mca_cmc_int_caller(int cmc_irq, void *arg, struct pt_regs *ptregs)
1352 if (start_count == -1) 1349 if (start_count == -1)
1353 start_count = IA64_LOG_COUNT(SAL_INFO_TYPE_CMC); 1350 start_count = IA64_LOG_COUNT(SAL_INFO_TYPE_CMC);
1354 1351
1355 ia64_mca_cmc_int_handler(cmc_irq, arg, ptregs); 1352 ia64_mca_cmc_int_handler(cmc_irq, arg);
1356 1353
1357 for (++cpuid ; cpuid < NR_CPUS && !cpu_online(cpuid) ; cpuid++); 1354 for (++cpuid ; cpuid < NR_CPUS && !cpu_online(cpuid) ; cpuid++);
1358 1355
@@ -1403,14 +1400,13 @@ ia64_mca_cmc_poll (unsigned long dummy)
1403 * Inputs 1400 * Inputs
1404 * interrupt number 1401 * interrupt number
1405 * client data arg ptr 1402 * client data arg ptr
1406 * saved registers ptr
1407 * Outputs 1403 * Outputs
1408 * handled 1404 * handled
1409 */ 1405 */
1410#ifdef CONFIG_ACPI 1406#ifdef CONFIG_ACPI
1411 1407
1412static irqreturn_t 1408static irqreturn_t
1413ia64_mca_cpe_int_caller(int cpe_irq, void *arg, struct pt_regs *ptregs) 1409ia64_mca_cpe_int_caller(int cpe_irq, void *arg)
1414{ 1410{
1415 static int start_count = -1; 1411 static int start_count = -1;
1416 static int poll_time = MIN_CPE_POLL_INTERVAL; 1412 static int poll_time = MIN_CPE_POLL_INTERVAL;
@@ -1422,7 +1418,7 @@ ia64_mca_cpe_int_caller(int cpe_irq, void *arg, struct pt_regs *ptregs)
1422 if (start_count == -1) 1418 if (start_count == -1)
1423 start_count = IA64_LOG_COUNT(SAL_INFO_TYPE_CPE); 1419 start_count = IA64_LOG_COUNT(SAL_INFO_TYPE_CPE);
1424 1420
1425 ia64_mca_cpe_int_handler(cpe_irq, arg, ptregs); 1421 ia64_mca_cpe_int_handler(cpe_irq, arg);
1426 1422
1427 for (++cpuid ; cpuid < NR_CPUS && !cpu_online(cpuid) ; cpuid++); 1423 for (++cpuid ; cpuid < NR_CPUS && !cpu_online(cpuid) ; cpuid++);
1428 1424
diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c
index 62e07f906e05..41169a9bc301 100644
--- a/arch/ia64/kernel/time.c
+++ b/arch/ia64/kernel/time.c
@@ -45,7 +45,7 @@ static struct time_interpolator itc_interpolator = {
45}; 45};
46 46
47static irqreturn_t 47static irqreturn_t
48timer_interrupt (int irq, void *dev_id, struct pt_regs *regs) 48timer_interrupt (int irq, void *dev_id)
49{ 49{
50 unsigned long new_itm; 50 unsigned long new_itm;
51 51
@@ -53,7 +53,7 @@ timer_interrupt (int irq, void *dev_id, struct pt_regs *regs)
53 return IRQ_HANDLED; 53 return IRQ_HANDLED;
54 } 54 }
55 55
56 platform_timer_interrupt(irq, dev_id, regs); 56 platform_timer_interrupt(irq, dev_id);
57 57
58 new_itm = local_cpu_data->itm_next; 58 new_itm = local_cpu_data->itm_next;
59 59
@@ -61,10 +61,10 @@ timer_interrupt (int irq, void *dev_id, struct pt_regs *regs)
61 printk(KERN_ERR "Oops: timer tick before it's due (itc=%lx,itm=%lx)\n", 61 printk(KERN_ERR "Oops: timer tick before it's due (itc=%lx,itm=%lx)\n",
62 ia64_get_itc(), new_itm); 62 ia64_get_itc(), new_itm);
63 63
64 profile_tick(CPU_PROFILING, regs); 64 profile_tick(CPU_PROFILING);
65 65
66 while (1) { 66 while (1) {
67 update_process_times(user_mode(regs)); 67 update_process_times(user_mode(get_irq_regs()));
68 68
69 new_itm += local_cpu_data->itm_delta; 69 new_itm += local_cpu_data->itm_delta;
70 70
diff --git a/arch/ia64/sn/pci/tioca_provider.c b/arch/ia64/sn/pci/tioca_provider.c
index c36b0f5affb3..8a2cb4e691fd 100644
--- a/arch/ia64/sn/pci/tioca_provider.c
+++ b/arch/ia64/sn/pci/tioca_provider.c
@@ -550,13 +550,12 @@ tioca_dma_map(struct pci_dev *pdev, u64 paddr, size_t byte_count, int dma_flags)
550 * tioca_error_intr_handler - SGI TIO CA error interrupt handler 550 * tioca_error_intr_handler - SGI TIO CA error interrupt handler
551 * @irq: unused 551 * @irq: unused
552 * @arg: pointer to tioca_common struct for the given CA 552 * @arg: pointer to tioca_common struct for the given CA
553 * @pt: unused
554 * 553 *
555 * Handle a CA error interrupt. Simply a wrapper around a SAL call which 554 * Handle a CA error interrupt. Simply a wrapper around a SAL call which
556 * defers processing to the SGI prom. 555 * defers processing to the SGI prom.
557 */ 556 */
558static irqreturn_t 557static irqreturn_t
559tioca_error_intr_handler(int irq, void *arg, struct pt_regs *pt) 558tioca_error_intr_handler(int irq, void *arg)
560{ 559{
561 struct tioca_common *soft = arg; 560 struct tioca_common *soft = arg;
562 struct ia64_sal_retval ret_stuff; 561 struct ia64_sal_retval ret_stuff;
diff --git a/arch/ia64/sn/pci/tioce_provider.c b/arch/ia64/sn/pci/tioce_provider.c
index af7171adcd2c..0e81f68aaf8e 100644
--- a/arch/ia64/sn/pci/tioce_provider.c
+++ b/arch/ia64/sn/pci/tioce_provider.c
@@ -666,12 +666,11 @@ tioce_dma_consistent(struct pci_dev *pdev, u64 paddr, size_t byte_count, int dma
666 * tioce_error_intr_handler - SGI TIO CE error interrupt handler 666 * tioce_error_intr_handler - SGI TIO CE error interrupt handler
667 * @irq: unused 667 * @irq: unused
668 * @arg: pointer to tioce_common struct for the given CE 668 * @arg: pointer to tioce_common struct for the given CE
669 * @pt: unused
670 * 669 *
671 * Handle a CE error interrupt. Simply a wrapper around a SAL call which 670 * Handle a CE error interrupt. Simply a wrapper around a SAL call which
672 * defers processing to the SGI prom. 671 * defers processing to the SGI prom.
673 */ static irqreturn_t 672 */ static irqreturn_t
674tioce_error_intr_handler(int irq, void *arg, struct pt_regs *pt) 673tioce_error_intr_handler(int irq, void *arg)
675{ 674{
676 struct tioce_common *soft = arg; 675 struct tioce_common *soft = arg;
677 struct ia64_sal_retval ret_stuff; 676 struct ia64_sal_retval ret_stuff;
diff --git a/arch/mips/kernel/irq.c b/arch/mips/kernel/irq.c
index d955aaefbb8e..a00b0e7ab9b1 100644
--- a/arch/mips/kernel/irq.c
+++ b/arch/mips/kernel/irq.c
@@ -55,13 +55,15 @@ unsigned long irq_hwmask[NR_IRQS];
55 */ 55 */
56asmlinkage unsigned int do_IRQ(unsigned int irq, struct pt_regs *regs) 56asmlinkage unsigned int do_IRQ(unsigned int irq, struct pt_regs *regs)
57{ 57{
58 struct pt_regs *old_regs = set_irq_regs(regs);
58 irq_enter(); 59 irq_enter();
59 60
60 __DO_IRQ_SMTC_HOOK(); 61 __DO_IRQ_SMTC_HOOK();
61 __do_IRQ(irq, regs); 62 __do_IRQ(irq);
62 63
63 irq_exit(); 64 irq_exit();
64 65
66 set_irq_regs(old_regs);
65 return 1; 67 return 1;
66} 68}
67 69
diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c
index a8340802f2d7..d349eb9e4ffb 100644
--- a/arch/mips/kernel/time.c
+++ b/arch/mips/kernel/time.c
@@ -322,18 +322,18 @@ static long last_rtc_update;
322 * a broadcasted inter-processor interrupt which itself is triggered 322 * a broadcasted inter-processor interrupt which itself is triggered
323 * by the global timer interrupt. 323 * by the global timer interrupt.
324 */ 324 */
325void local_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) 325void local_timer_interrupt(int irq, void *dev_id)
326{ 326{
327 if (current->pid) 327 if (current->pid)
328 profile_tick(CPU_PROFILING, regs); 328 profile_tick(CPU_PROFILING);
329 update_process_times(user_mode(regs)); 329 update_process_times(user_mode(get_irq_regs()));
330} 330}
331 331
332/* 332/*
333 * High-level timer interrupt service routines. This function 333 * High-level timer interrupt service routines. This function
334 * is set as irqaction->handler and is invoked through do_IRQ. 334 * is set as irqaction->handler and is invoked through do_IRQ.
335 */ 335 */
336irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) 336irqreturn_t timer_interrupt(int irq, void *dev_id)
337{ 337{
338 unsigned long j; 338 unsigned long j;
339 unsigned int count; 339 unsigned int count;
@@ -419,23 +419,24 @@ irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
419 * In SMP mode, local_timer_interrupt() is invoked by appropriate 419 * In SMP mode, local_timer_interrupt() is invoked by appropriate
420 * low-level local timer interrupt handler. 420 * low-level local timer interrupt handler.
421 */ 421 */
422 local_timer_interrupt(irq, dev_id, regs); 422 local_timer_interrupt(irq, dev_id);
423 423
424 return IRQ_HANDLED; 424 return IRQ_HANDLED;
425} 425}
426 426
427int null_perf_irq(struct pt_regs *regs) 427int null_perf_irq(void)
428{ 428{
429 return 0; 429 return 0;
430} 430}
431 431
432int (*perf_irq)(struct pt_regs *regs) = null_perf_irq; 432int (*perf_irq)(void) = null_perf_irq;
433 433
434EXPORT_SYMBOL(null_perf_irq); 434EXPORT_SYMBOL(null_perf_irq);
435EXPORT_SYMBOL(perf_irq); 435EXPORT_SYMBOL(perf_irq);
436 436
437asmlinkage void ll_timer_interrupt(int irq, struct pt_regs *regs) 437asmlinkage void ll_timer_interrupt(int irq, struct pt_regs *regs)
438{ 438{
439 struct pt_regs *old_regs = set_irq_regs(regs);
439 int r2 = cpu_has_mips_r2; 440 int r2 = cpu_has_mips_r2;
440 441
441 irq_enter(); 442 irq_enter();
@@ -448,27 +449,30 @@ asmlinkage void ll_timer_interrupt(int irq, struct pt_regs *regs)
448 * performance counter interrupt handler anyway. 449 * performance counter interrupt handler anyway.
449 */ 450 */
450 if (!r2 || (read_c0_cause() & (1 << 26))) 451 if (!r2 || (read_c0_cause() & (1 << 26)))
451 if (perf_irq(regs)) 452 if (perf_irq())
452 goto out; 453 goto out;
453 454
454 /* we keep interrupt disabled all the time */ 455 /* we keep interrupt disabled all the time */
455 if (!r2 || (read_c0_cause() & (1 << 30))) 456 if (!r2 || (read_c0_cause() & (1 << 30)))
456 timer_interrupt(irq, NULL, regs); 457 timer_interrupt(irq, NULL);
457 458
458out: 459out:
459 irq_exit(); 460 irq_exit();
461 set_irq_regs(old_regs);
460} 462}
461 463
462asmlinkage void ll_local_timer_interrupt(int irq, struct pt_regs *regs) 464asmlinkage void ll_local_timer_interrupt(int irq, struct pt_regs *regs)
463{ 465{
466 struct pt_regs *old_regs = set_irq_regs(regs);
464 irq_enter(); 467 irq_enter();
465 if (smp_processor_id() != 0) 468 if (smp_processor_id() != 0)
466 kstat_this_cpu.irqs[irq]++; 469 kstat_this_cpu.irqs[irq]++;
467 470
468 /* we keep interrupt disabled all the time */ 471 /* we keep interrupt disabled all the time */
469 local_timer_interrupt(irq, NULL, regs); 472 local_timer_interrupt(irq, NULL);
470 473
471 irq_exit(); 474 irq_exit();
475 set_irq_regs(old_regs);
472} 476}
473 477
474/* 478/*
diff --git a/arch/mips/sgi-ip22/ip22-reset.c b/arch/mips/sgi-ip22/ip22-reset.c
index 7a941ecff3bb..66df5ac8f089 100644
--- a/arch/mips/sgi-ip22/ip22-reset.c
+++ b/arch/mips/sgi-ip22/ip22-reset.c
@@ -169,7 +169,7 @@ static inline void volume_down_button(unsigned long data)
169 } 169 }
170} 170}
171 171
172static irqreturn_t panel_int(int irq, void *dev_id, struct pt_regs *regs) 172static irqreturn_t panel_int(int irq, void *dev_id)
173{ 173{
174 unsigned int buttons; 174 unsigned int buttons;
175 175
diff --git a/arch/mips/sgi-ip22/ip22-time.c b/arch/mips/sgi-ip22/ip22-time.c
index 0e061890f797..3462b0d98def 100644
--- a/arch/mips/sgi-ip22/ip22-time.c
+++ b/arch/mips/sgi-ip22/ip22-time.c
@@ -191,12 +191,14 @@ void indy_8254timer_irq(struct pt_regs *regs)
191 191
192void indy_r4k_timer_interrupt(struct pt_regs *regs) 192void indy_r4k_timer_interrupt(struct pt_regs *regs)
193{ 193{
194 struct pt_regs *old_regs = set_irq_regs(regs);
194 int irq = SGI_TIMER_IRQ; 195 int irq = SGI_TIMER_IRQ;
195 196
196 irq_enter(); 197 irq_enter();
197 kstat_this_cpu.irqs[irq]++; 198 kstat_this_cpu.irqs[irq]++;
198 timer_interrupt(irq, NULL, regs); 199 timer_interrupt(irq, NULL);
199 irq_exit(); 200 irq_exit();
201 set_irq_regs(old_regs);
200} 202}
201 203
202void __init plat_timer_setup(struct irqaction *irq) 204void __init plat_timer_setup(struct irqaction *irq)
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index c3f58f2f9f52..5deaab3090b4 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -187,6 +187,7 @@ void fixup_irqs(cpumask_t map)
187 187
188void do_IRQ(struct pt_regs *regs) 188void do_IRQ(struct pt_regs *regs)
189{ 189{
190 struct pt_regs *old_regs = set_irq_regs(regs);
190 unsigned int irq; 191 unsigned int irq;
191#ifdef CONFIG_IRQSTACKS 192#ifdef CONFIG_IRQSTACKS
192 struct thread_info *curtp, *irqtp; 193 struct thread_info *curtp, *irqtp;
@@ -230,18 +231,19 @@ void do_IRQ(struct pt_regs *regs)
230 handler = &__do_IRQ; 231 handler = &__do_IRQ;
231 irqtp->task = curtp->task; 232 irqtp->task = curtp->task;
232 irqtp->flags = 0; 233 irqtp->flags = 0;
233 call_handle_irq(irq, desc, regs, irqtp, handler); 234 call_handle_irq(irq, desc, irqtp, handler);
234 irqtp->task = NULL; 235 irqtp->task = NULL;
235 if (irqtp->flags) 236 if (irqtp->flags)
236 set_bits(irqtp->flags, &curtp->flags); 237 set_bits(irqtp->flags, &curtp->flags);
237 } else 238 } else
238#endif 239#endif
239 generic_handle_irq(irq, regs); 240 generic_handle_irq(irq);
240 } else if (irq != NO_IRQ_IGNORE) 241 } else if (irq != NO_IRQ_IGNORE)
241 /* That's not SMP safe ... but who cares ? */ 242 /* That's not SMP safe ... but who cares ? */
242 ppc_spurious_interrupts++; 243 ppc_spurious_interrupts++;
243 244
244 irq_exit(); 245 irq_exit();
246 set_irq_regs(old_regs);
245 247
246#ifdef CONFIG_PPC_ISERIES 248#ifdef CONFIG_PPC_ISERIES
247 if (get_lppaca()->int_dword.fields.decr_int) { 249 if (get_lppaca()->int_dword.fields.decr_int) {
diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S
index 41521b30c3cd..c70e20708a1f 100644
--- a/arch/powerpc/kernel/misc_64.S
+++ b/arch/powerpc/kernel/misc_64.S
@@ -52,12 +52,12 @@ _GLOBAL(call_do_softirq)
52 blr 52 blr
53 53
54_GLOBAL(call_handle_irq) 54_GLOBAL(call_handle_irq)
55 ld r8,0(r7) 55 ld r8,0(r6)
56 mflr r0 56 mflr r0
57 std r0,16(r1) 57 std r0,16(r1)
58 mtctr r8 58 mtctr r8
59 stdu r1,THREAD_SIZE-112(r6) 59 stdu r1,THREAD_SIZE-112(r5)
60 mr r1,r6 60 mr r1,r5
61 bctrl 61 bctrl
62 ld r1,0(r1) 62 ld r1,0(r1)
63 ld r0,16(r1) 63 ld r0,16(r1)
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index 6a9bc9ce54e0..35c6309bdb76 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -115,7 +115,7 @@ void __devinit smp_generic_kick_cpu(int nr)
115} 115}
116#endif 116#endif
117 117
118void smp_message_recv(int msg, struct pt_regs *regs) 118void smp_message_recv(int msg)
119{ 119{
120 switch(msg) { 120 switch(msg) {
121 case PPC_MSG_CALL_FUNCTION: 121 case PPC_MSG_CALL_FUNCTION:
@@ -127,11 +127,11 @@ void smp_message_recv(int msg, struct pt_regs *regs)
127 break; 127 break;
128 case PPC_MSG_DEBUGGER_BREAK: 128 case PPC_MSG_DEBUGGER_BREAK:
129 if (crash_ipi_function_ptr) { 129 if (crash_ipi_function_ptr) {
130 crash_ipi_function_ptr(regs); 130 crash_ipi_function_ptr(get_irq_regs());
131 break; 131 break;
132 } 132 }
133#ifdef CONFIG_DEBUGGER 133#ifdef CONFIG_DEBUGGER
134 debugger_ipi(regs); 134 debugger_ipi(get_irq_regs());
135 break; 135 break;
136#endif /* CONFIG_DEBUGGER */ 136#endif /* CONFIG_DEBUGGER */
137 /* FALLTHROUGH */ 137 /* FALLTHROUGH */
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index 85b9244a098c..d210d0a5006b 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -51,6 +51,7 @@
51#include <linux/rtc.h> 51#include <linux/rtc.h>
52#include <linux/jiffies.h> 52#include <linux/jiffies.h>
53#include <linux/posix-timers.h> 53#include <linux/posix-timers.h>
54#include <linux/irq.h>
54 55
55#include <asm/io.h> 56#include <asm/io.h>
56#include <asm/processor.h> 57#include <asm/processor.h>
@@ -643,6 +644,7 @@ static void iSeries_tb_recal(void)
643 */ 644 */
644void timer_interrupt(struct pt_regs * regs) 645void timer_interrupt(struct pt_regs * regs)
645{ 646{
647 struct pt_regs *old_regs;
646 int next_dec; 648 int next_dec;
647 int cpu = smp_processor_id(); 649 int cpu = smp_processor_id();
648 unsigned long ticks; 650 unsigned long ticks;
@@ -653,9 +655,10 @@ void timer_interrupt(struct pt_regs * regs)
653 do_IRQ(regs); 655 do_IRQ(regs);
654#endif 656#endif
655 657
658 old_regs = set_irq_regs(regs);
656 irq_enter(); 659 irq_enter();
657 660
658 profile_tick(CPU_PROFILING, regs); 661 profile_tick(CPU_PROFILING);
659 calculate_steal_time(); 662 calculate_steal_time();
660 663
661#ifdef CONFIG_PPC_ISERIES 664#ifdef CONFIG_PPC_ISERIES
@@ -715,6 +718,7 @@ void timer_interrupt(struct pt_regs * regs)
715#endif 718#endif
716 719
717 irq_exit(); 720 irq_exit();
721 set_irq_regs(old_regs);
718} 722}
719 723
720void wakeup_decrementer(void) 724void wakeup_decrementer(void)
diff --git a/arch/powerpc/platforms/cell/interrupt.c b/arch/powerpc/platforms/cell/interrupt.c
index 8533f13a5ed1..434fb934dd20 100644
--- a/arch/powerpc/platforms/cell/interrupt.c
+++ b/arch/powerpc/platforms/cell/interrupt.c
@@ -190,11 +190,11 @@ struct irq_host *iic_get_irq_host(int node)
190EXPORT_SYMBOL_GPL(iic_get_irq_host); 190EXPORT_SYMBOL_GPL(iic_get_irq_host);
191 191
192 192
193static irqreturn_t iic_ipi_action(int irq, void *dev_id, struct pt_regs *regs) 193static irqreturn_t iic_ipi_action(int irq, void *dev_id)
194{ 194{
195 int ipi = (int)(long)dev_id; 195 int ipi = (int)(long)dev_id;
196 196
197 smp_message_recv(ipi, regs); 197 smp_message_recv(ipi);
198 198
199 return IRQ_HANDLED; 199 return IRQ_HANDLED;
200} 200}
diff --git a/arch/powerpc/platforms/cell/spider-pic.c b/arch/powerpc/platforms/cell/spider-pic.c
index b0e95d594c51..21a9ebd4978e 100644
--- a/arch/powerpc/platforms/cell/spider-pic.c
+++ b/arch/powerpc/platforms/cell/spider-pic.c
@@ -213,8 +213,7 @@ static struct irq_host_ops spider_host_ops = {
213 .xlate = spider_host_xlate, 213 .xlate = spider_host_xlate,
214}; 214};
215 215
216static void spider_irq_cascade(unsigned int irq, struct irq_desc *desc, 216static void spider_irq_cascade(unsigned int irq, struct irq_desc *desc)
217 struct pt_regs *regs)
218{ 217{
219 struct spider_pic *pic = desc->handler_data; 218 struct spider_pic *pic = desc->handler_data;
220 unsigned int cs, virq; 219 unsigned int cs, virq;
@@ -225,7 +224,7 @@ static void spider_irq_cascade(unsigned int irq, struct irq_desc *desc,
225 else 224 else
226 virq = irq_linear_revmap(pic->host, cs); 225 virq = irq_linear_revmap(pic->host, cs);
227 if (virq != NO_IRQ) 226 if (virq != NO_IRQ)
228 generic_handle_irq(virq, regs); 227 generic_handle_irq(virq);
229 desc->chip->eoi(irq); 228 desc->chip->eoi(irq);
230} 229}
231 230
diff --git a/arch/powerpc/platforms/powermac/low_i2c.c b/arch/powerpc/platforms/powermac/low_i2c.c
index c2c7cf75dd5f..bfc4829162f1 100644
--- a/arch/powerpc/platforms/powermac/low_i2c.c
+++ b/arch/powerpc/platforms/powermac/low_i2c.c
@@ -342,7 +342,7 @@ static void kw_i2c_handle_interrupt(struct pmac_i2c_host_kw *host, u8 isr)
342} 342}
343 343
344/* Interrupt handler */ 344/* Interrupt handler */
345static irqreturn_t kw_i2c_irq(int irq, void *dev_id, struct pt_regs *regs) 345static irqreturn_t kw_i2c_irq(int irq, void *dev_id)
346{ 346{
347 struct pmac_i2c_host_kw *host = dev_id; 347 struct pmac_i2c_host_kw *host = dev_id;
348 unsigned long flags; 348 unsigned long flags;
diff --git a/arch/powerpc/platforms/powermac/pfunc_base.c b/arch/powerpc/platforms/powermac/pfunc_base.c
index ee3b223ab17a..5c6c15c5f9a3 100644
--- a/arch/powerpc/platforms/powermac/pfunc_base.c
+++ b/arch/powerpc/platforms/powermac/pfunc_base.c
@@ -15,7 +15,7 @@
15#define DBG(fmt...) 15#define DBG(fmt...)
16#endif 16#endif
17 17
18static irqreturn_t macio_gpio_irq(int irq, void *data, struct pt_regs *regs) 18static irqreturn_t macio_gpio_irq(int irq, void *data)
19{ 19{
20 pmf_do_irq(data); 20 pmf_do_irq(data);
21 21
diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms/powermac/pic.c
index 39f7ddb554ea..e93a115961aa 100644
--- a/arch/powerpc/platforms/powermac/pic.c
+++ b/arch/powerpc/platforms/powermac/pic.c
@@ -440,14 +440,13 @@ static void __init pmac_pic_probe_oldstyle(void)
440} 440}
441#endif /* CONFIG_PPC32 */ 441#endif /* CONFIG_PPC32 */
442 442
443static void pmac_u3_cascade(unsigned int irq, struct irq_desc *desc, 443static void pmac_u3_cascade(unsigned int irq, struct irq_desc *desc)
444 struct pt_regs *regs)
445{ 444{
446 struct mpic *mpic = desc->handler_data; 445 struct mpic *mpic = desc->handler_data;
447 446
448 unsigned int cascade_irq = mpic_get_one_irq(mpic, regs); 447 unsigned int cascade_irq = mpic_get_one_irq(mpic, get_irq_regs());
449 if (cascade_irq != NO_IRQ) 448 if (cascade_irq != NO_IRQ)
450 generic_handle_irq(cascade_irq, regs); 449 generic_handle_irq(cascade_irq);
451 desc->chip->eoi(irq); 450 desc->chip->eoi(irq);
452} 451}
453 452
diff --git a/arch/powerpc/platforms/pseries/ras.c b/arch/powerpc/platforms/pseries/ras.c
index 311ed1993fc0..b1d3d161249e 100644
--- a/arch/powerpc/platforms/pseries/ras.c
+++ b/arch/powerpc/platforms/pseries/ras.c
@@ -65,16 +65,14 @@ static int ras_check_exception_token;
65#define EPOW_SENSOR_INDEX 0 65#define EPOW_SENSOR_INDEX 0
66#define RAS_VECTOR_OFFSET 0x500 66#define RAS_VECTOR_OFFSET 0x500
67 67
68static irqreturn_t ras_epow_interrupt(int irq, void *dev_id, 68static irqreturn_t ras_epow_interrupt(int irq, void *dev_id);
69 struct pt_regs * regs); 69static irqreturn_t ras_error_interrupt(int irq, void *dev_id);
70static irqreturn_t ras_error_interrupt(int irq, void *dev_id,
71 struct pt_regs * regs);
72 70
73/* #define DEBUG */ 71/* #define DEBUG */
74 72
75 73
76static void request_ras_irqs(struct device_node *np, 74static void request_ras_irqs(struct device_node *np,
77 irqreturn_t (*handler)(int, void *, struct pt_regs *), 75 irq_handler_t handler,
78 const char *name) 76 const char *name)
79{ 77{
80 int i, index, count = 0; 78 int i, index, count = 0;
@@ -166,8 +164,7 @@ __initcall(init_ras_IRQ);
166 * to examine the type of power failure and take appropriate action where 164 * to examine the type of power failure and take appropriate action where
167 * the time horizon permits something useful to be done. 165 * the time horizon permits something useful to be done.
168 */ 166 */
169static irqreturn_t 167static irqreturn_t ras_epow_interrupt(int irq, void *dev_id)
170ras_epow_interrupt(int irq, void *dev_id, struct pt_regs * regs)
171{ 168{
172 int status = 0xdeadbeef; 169 int status = 0xdeadbeef;
173 int state = 0; 170 int state = 0;
@@ -210,8 +207,7 @@ ras_epow_interrupt(int irq, void *dev_id, struct pt_regs * regs)
210 * For nonrecoverable errors, an error is logged and we stop all processing 207 * For nonrecoverable errors, an error is logged and we stop all processing
211 * as quickly as possible in order to prevent propagation of the failure. 208 * as quickly as possible in order to prevent propagation of the failure.
212 */ 209 */
213static irqreturn_t 210static irqreturn_t ras_error_interrupt(int irq, void *dev_id)
214ras_error_interrupt(int irq, void *dev_id, struct pt_regs * regs)
215{ 211{
216 struct rtas_error_log *rtas_elog; 212 struct rtas_error_log *rtas_elog;
217 int status = 0xdeadbeef; 213 int status = 0xdeadbeef;
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index f82b13e531a3..ad9aec2c6fee 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -121,12 +121,11 @@ static void __init fwnmi_init(void)
121 fwnmi_active = 1; 121 fwnmi_active = 1;
122} 122}
123 123
124void pseries_8259_cascade(unsigned int irq, struct irq_desc *desc, 124void pseries_8259_cascade(unsigned int irq, struct irq_desc *desc)
125 struct pt_regs *regs)
126{ 125{
127 unsigned int cascade_irq = i8259_irq(regs); 126 unsigned int cascade_irq = i8259_irq(get_irq_regs());
128 if (cascade_irq != NO_IRQ) 127 if (cascade_irq != NO_IRQ)
129 generic_handle_irq(cascade_irq, regs); 128 generic_handle_irq(cascade_irq);
130 desc->chip->eoi(irq); 129 desc->chip->eoi(irq);
131} 130}
132 131
diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c
index 253972e5479f..f6bd2f285153 100644
--- a/arch/powerpc/platforms/pseries/xics.c
+++ b/arch/powerpc/platforms/pseries/xics.c
@@ -324,7 +324,7 @@ static unsigned int xics_get_irq_lpar(struct pt_regs *regs)
324 324
325#ifdef CONFIG_SMP 325#ifdef CONFIG_SMP
326 326
327static irqreturn_t xics_ipi_dispatch(int cpu, struct pt_regs *regs) 327static irqreturn_t xics_ipi_dispatch(int cpu)
328{ 328{
329 WARN_ON(cpu_is_offline(cpu)); 329 WARN_ON(cpu_is_offline(cpu));
330 330
@@ -332,47 +332,47 @@ static irqreturn_t xics_ipi_dispatch(int cpu, struct pt_regs *regs)
332 if (test_and_clear_bit(PPC_MSG_CALL_FUNCTION, 332 if (test_and_clear_bit(PPC_MSG_CALL_FUNCTION,
333 &xics_ipi_message[cpu].value)) { 333 &xics_ipi_message[cpu].value)) {
334 mb(); 334 mb();
335 smp_message_recv(PPC_MSG_CALL_FUNCTION, regs); 335 smp_message_recv(PPC_MSG_CALL_FUNCTION);
336 } 336 }
337 if (test_and_clear_bit(PPC_MSG_RESCHEDULE, 337 if (test_and_clear_bit(PPC_MSG_RESCHEDULE,
338 &xics_ipi_message[cpu].value)) { 338 &xics_ipi_message[cpu].value)) {
339 mb(); 339 mb();
340 smp_message_recv(PPC_MSG_RESCHEDULE, regs); 340 smp_message_recv(PPC_MSG_RESCHEDULE);
341 } 341 }
342#if 0 342#if 0
343 if (test_and_clear_bit(PPC_MSG_MIGRATE_TASK, 343 if (test_and_clear_bit(PPC_MSG_MIGRATE_TASK,
344 &xics_ipi_message[cpu].value)) { 344 &xics_ipi_message[cpu].value)) {
345 mb(); 345 mb();
346 smp_message_recv(PPC_MSG_MIGRATE_TASK, regs); 346 smp_message_recv(PPC_MSG_MIGRATE_TASK);
347 } 347 }
348#endif 348#endif
349#if defined(CONFIG_DEBUGGER) || defined(CONFIG_KEXEC) 349#if defined(CONFIG_DEBUGGER) || defined(CONFIG_KEXEC)
350 if (test_and_clear_bit(PPC_MSG_DEBUGGER_BREAK, 350 if (test_and_clear_bit(PPC_MSG_DEBUGGER_BREAK,
351 &xics_ipi_message[cpu].value)) { 351 &xics_ipi_message[cpu].value)) {
352 mb(); 352 mb();
353 smp_message_recv(PPC_MSG_DEBUGGER_BREAK, regs); 353 smp_message_recv(PPC_MSG_DEBUGGER_BREAK);
354 } 354 }
355#endif 355#endif
356 } 356 }
357 return IRQ_HANDLED; 357 return IRQ_HANDLED;
358} 358}
359 359
360static irqreturn_t xics_ipi_action_direct(int irq, void *dev_id, struct pt_regs *regs) 360static irqreturn_t xics_ipi_action_direct(int irq, void *dev_id)
361{ 361{
362 int cpu = smp_processor_id(); 362 int cpu = smp_processor_id();
363 363
364 direct_qirr_info(cpu, 0xff); 364 direct_qirr_info(cpu, 0xff);
365 365
366 return xics_ipi_dispatch(cpu, regs); 366 return xics_ipi_dispatch(cpu);
367} 367}
368 368
369static irqreturn_t xics_ipi_action_lpar(int irq, void *dev_id, struct pt_regs *regs) 369static irqreturn_t xics_ipi_action_lpar(int irq, void *dev_id)
370{ 370{
371 int cpu = smp_processor_id(); 371 int cpu = smp_processor_id();
372 372
373 lpar_qirr_info(cpu, 0xff); 373 lpar_qirr_info(cpu, 0xff);
374 374
375 return xics_ipi_dispatch(cpu, regs); 375 return xics_ipi_dispatch(cpu);
376} 376}
377 377
378void xics_cause_IPI(int cpu) 378void xics_cause_IPI(int cpu)
diff --git a/arch/powerpc/platforms/pseries/xics.h b/arch/powerpc/platforms/pseries/xics.h
index 6ee1055b0ffb..db0ec3ba3ae2 100644
--- a/arch/powerpc/platforms/pseries/xics.h
+++ b/arch/powerpc/platforms/pseries/xics.h
@@ -31,7 +31,6 @@ struct xics_ipi_struct {
31extern struct xics_ipi_struct xics_ipi_message[NR_CPUS] __cacheline_aligned; 31extern struct xics_ipi_struct xics_ipi_message[NR_CPUS] __cacheline_aligned;
32 32
33struct irq_desc; 33struct irq_desc;
34extern void pseries_8259_cascade(unsigned int irq, struct irq_desc *desc, 34extern void pseries_8259_cascade(unsigned int irq, struct irq_desc *desc);
35 struct pt_regs *regs);
36 35
37#endif /* _POWERPC_KERNEL_XICS_H */ 36#endif /* _POWERPC_KERNEL_XICS_H */
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index 3ee03a9a98fa..195215560fd7 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -489,9 +489,9 @@ static inline void mpic_eoi(struct mpic *mpic)
489} 489}
490 490
491#ifdef CONFIG_SMP 491#ifdef CONFIG_SMP
492static irqreturn_t mpic_ipi_action(int irq, void *dev_id, struct pt_regs *regs) 492static irqreturn_t mpic_ipi_action(int irq, void *dev_id)
493{ 493{
494 smp_message_recv(mpic_irq_to_hw(irq) - MPIC_VEC_IPI_0, regs); 494 smp_message_recv(mpic_irq_to_hw(irq) - MPIC_VEC_IPI_0);
495 return IRQ_HANDLED; 495 return IRQ_HANDLED;
496} 496}
497#endif /* CONFIG_SMP */ 497#endif /* CONFIG_SMP */
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index 708236f34746..5a854f36383c 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -21,6 +21,7 @@
21#include <linux/module.h> 21#include <linux/module.h>
22#include <linux/sysrq.h> 22#include <linux/sysrq.h>
23#include <linux/interrupt.h> 23#include <linux/interrupt.h>
24#include <linux/irq.h>
24 25
25#include <asm/ptrace.h> 26#include <asm/ptrace.h>
26#include <asm/string.h> 27#include <asm/string.h>
@@ -2577,12 +2578,11 @@ void xmon_init(int enable)
2577} 2578}
2578 2579
2579#ifdef CONFIG_MAGIC_SYSRQ 2580#ifdef CONFIG_MAGIC_SYSRQ
2580static void sysrq_handle_xmon(int key, struct pt_regs *pt_regs, 2581static void sysrq_handle_xmon(int key, struct tty_struct *tty)
2581 struct tty_struct *tty)
2582{ 2582{
2583 /* ensure xmon is enabled */ 2583 /* ensure xmon is enabled */
2584 xmon_init(1); 2584 xmon_init(1);
2585 debugger(pt_regs); 2585 debugger(get_irq_regs());
2586} 2586}
2587 2587
2588static struct sysrq_key_op sysrq_xmon_op = 2588static struct sysrq_key_op sysrq_xmon_op =
diff --git a/arch/x86_64/kernel/apic.c b/arch/x86_64/kernel/apic.c
index 6472e321cad7..af4a1c71a80d 100644
--- a/arch/x86_64/kernel/apic.c
+++ b/arch/x86_64/kernel/apic.c
@@ -885,14 +885,14 @@ void setup_APIC_extened_lvt(unsigned char lvt_off, unsigned char vector,
885 * value into /proc/profile. 885 * value into /proc/profile.
886 */ 886 */
887 887
888void smp_local_timer_interrupt(struct pt_regs *regs) 888void smp_local_timer_interrupt(void)
889{ 889{
890 profile_tick(CPU_PROFILING, regs); 890 profile_tick(CPU_PROFILING);
891#ifdef CONFIG_SMP 891#ifdef CONFIG_SMP
892 update_process_times(user_mode(regs)); 892 update_process_times(user_mode(get_irq_regs()));
893#endif 893#endif
894 if (apic_runs_main_timer > 1 && smp_processor_id() == boot_cpu_id) 894 if (apic_runs_main_timer > 1 && smp_processor_id() == boot_cpu_id)
895 main_timer_handler(regs); 895 main_timer_handler();
896 /* 896 /*
897 * We take the 'long' return path, and there every subsystem 897 * We take the 'long' return path, and there every subsystem
898 * grabs the appropriate locks (kernel lock/ irq lock). 898 * grabs the appropriate locks (kernel lock/ irq lock).
@@ -913,7 +913,7 @@ void smp_local_timer_interrupt(struct pt_regs *regs)
913 * [ if a single-CPU system runs an SMP kernel then we call the local 913 * [ if a single-CPU system runs an SMP kernel then we call the local
914 * interrupt as well. Thus we cannot inline the local irq ... ] 914 * interrupt as well. Thus we cannot inline the local irq ... ]
915 */ 915 */
916void smp_apic_timer_interrupt(struct pt_regs *regs) 916void smp_apic_timer_interrupt(void)
917{ 917{
918 /* 918 /*
919 * the NMI deadlock-detector uses this. 919 * the NMI deadlock-detector uses this.
@@ -932,7 +932,7 @@ void smp_apic_timer_interrupt(struct pt_regs *regs)
932 */ 932 */
933 exit_idle(); 933 exit_idle();
934 irq_enter(); 934 irq_enter();
935 smp_local_timer_interrupt(regs); 935 smp_local_timer_interrupt();
936 irq_exit(); 936 irq_exit();
937} 937}
938 938
diff --git a/arch/x86_64/kernel/irq.c b/arch/x86_64/kernel/irq.c
index 506f27c85ca5..b8a407fcd5d5 100644
--- a/arch/x86_64/kernel/irq.c
+++ b/arch/x86_64/kernel/irq.c
@@ -103,7 +103,9 @@ skip:
103 * handlers). 103 * handlers).
104 */ 104 */
105asmlinkage unsigned int do_IRQ(struct pt_regs *regs) 105asmlinkage unsigned int do_IRQ(struct pt_regs *regs)
106{ 106{
107 struct pt_regs *old_regs = set_irq_regs(regs);
108
107 /* high bit used in ret_from_ code */ 109 /* high bit used in ret_from_ code */
108 unsigned vector = ~regs->orig_rax; 110 unsigned vector = ~regs->orig_rax;
109 unsigned irq; 111 unsigned irq;
@@ -121,9 +123,10 @@ asmlinkage unsigned int do_IRQ(struct pt_regs *regs)
121#ifdef CONFIG_DEBUG_STACKOVERFLOW 123#ifdef CONFIG_DEBUG_STACKOVERFLOW
122 stack_overflow_check(regs); 124 stack_overflow_check(regs);
123#endif 125#endif
124 generic_handle_irq(irq, regs); 126 generic_handle_irq(irq);
125 irq_exit(); 127 irq_exit();
126 128
129 set_irq_regs(old_regs);
127 return 1; 130 return 1;
128} 131}
129 132
diff --git a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c
index 557e92af7bea..1ba5a442ac32 100644
--- a/arch/x86_64/kernel/time.c
+++ b/arch/x86_64/kernel/time.c
@@ -302,20 +302,20 @@ unsigned long long monotonic_clock(void)
302} 302}
303EXPORT_SYMBOL(monotonic_clock); 303EXPORT_SYMBOL(monotonic_clock);
304 304
305static noinline void handle_lost_ticks(int lost, struct pt_regs *regs) 305static noinline void handle_lost_ticks(int lost)
306{ 306{
307 static long lost_count; 307 static long lost_count;
308 static int warned; 308 static int warned;
309 if (report_lost_ticks) { 309 if (report_lost_ticks) {
310 printk(KERN_WARNING "time.c: Lost %d timer tick(s)! ", lost); 310 printk(KERN_WARNING "time.c: Lost %d timer tick(s)! ", lost);
311 print_symbol("rip %s)\n", regs->rip); 311 print_symbol("rip %s)\n", get_irq_regs()->rip);
312 } 312 }
313 313
314 if (lost_count == 1000 && !warned) { 314 if (lost_count == 1000 && !warned) {
315 printk(KERN_WARNING "warning: many lost ticks.\n" 315 printk(KERN_WARNING "warning: many lost ticks.\n"
316 KERN_WARNING "Your time source seems to be instable or " 316 KERN_WARNING "Your time source seems to be instable or "
317 "some driver is hogging interupts\n"); 317 "some driver is hogging interupts\n");
318 print_symbol("rip %s\n", regs->rip); 318 print_symbol("rip %s\n", get_irq_regs()->rip);
319 if (vxtime.mode == VXTIME_TSC && vxtime.hpet_address) { 319 if (vxtime.mode == VXTIME_TSC && vxtime.hpet_address) {
320 printk(KERN_WARNING "Falling back to HPET\n"); 320 printk(KERN_WARNING "Falling back to HPET\n");
321 if (hpet_use_timer) 321 if (hpet_use_timer)
@@ -339,7 +339,7 @@ static noinline void handle_lost_ticks(int lost, struct pt_regs *regs)
339#endif 339#endif
340} 340}
341 341
342void main_timer_handler(struct pt_regs *regs) 342void main_timer_handler(void)
343{ 343{
344 static unsigned long rtc_update = 0; 344 static unsigned long rtc_update = 0;
345 unsigned long tsc; 345 unsigned long tsc;
@@ -411,7 +411,7 @@ void main_timer_handler(struct pt_regs *regs)
411 } 411 }
412 412
413 if (lost > 0) 413 if (lost > 0)
414 handle_lost_ticks(lost, regs); 414 handle_lost_ticks(lost);
415 else 415 else
416 lost = 0; 416 lost = 0;
417 417
@@ -421,7 +421,7 @@ void main_timer_handler(struct pt_regs *regs)
421 421
422 do_timer(lost + 1); 422 do_timer(lost + 1);
423#ifndef CONFIG_SMP 423#ifndef CONFIG_SMP
424 update_process_times(user_mode(regs)); 424 update_process_times(user_mode(get_irq_regs()));
425#endif 425#endif
426 426
427/* 427/*
@@ -431,7 +431,7 @@ void main_timer_handler(struct pt_regs *regs)
431 */ 431 */
432 432
433 if (!using_apic_timer) 433 if (!using_apic_timer)
434 smp_local_timer_interrupt(regs); 434 smp_local_timer_interrupt();
435 435
436/* 436/*
437 * If we have an externally synchronized Linux clock, then update CMOS clock 437 * If we have an externally synchronized Linux clock, then update CMOS clock
@@ -450,11 +450,11 @@ void main_timer_handler(struct pt_regs *regs)
450 write_sequnlock(&xtime_lock); 450 write_sequnlock(&xtime_lock);
451} 451}
452 452
453static irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) 453static irqreturn_t timer_interrupt(int irq, void *dev_id)
454{ 454{
455 if (apic_runs_main_timer > 1) 455 if (apic_runs_main_timer > 1)
456 return IRQ_HANDLED; 456 return IRQ_HANDLED;
457 main_timer_handler(regs); 457 main_timer_handler();
458 if (using_apic_timer) 458 if (using_apic_timer)
459 smp_send_timer_broadcast_ipi(); 459 smp_send_timer_broadcast_ipi();
460 return IRQ_HANDLED; 460 return IRQ_HANDLED;
@@ -1337,7 +1337,7 @@ irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
1337 } 1337 }
1338 if (call_rtc_interrupt) { 1338 if (call_rtc_interrupt) {
1339 rtc_int_flag |= (RTC_IRQF | (RTC_NUM_INTS << 8)); 1339 rtc_int_flag |= (RTC_IRQF | (RTC_NUM_INTS << 8));
1340 rtc_interrupt(rtc_int_flag, dev_id, regs); 1340 rtc_interrupt(rtc_int_flag, dev_id);
1341 } 1341 }
1342 return IRQ_HANDLED; 1342 return IRQ_HANDLED;
1343} 1343}