diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2006-10-08 09:30:44 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-08 15:32:35 -0400 |
commit | 0d84438d98777b0f9425d39121c42f47a06878ca (patch) | |
tree | 9d3486664ecf836183f982f7011c5b8b37c4091e /arch/sparc/kernel/sun4d_irq.c | |
parent | 7ff3e52cf2947ebd38c84159af68e5a29d228f6c (diff) |
[PATCH] sparc32 pt_regs fixes
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/sparc/kernel/sun4d_irq.c')
-rw-r--r-- | arch/sparc/kernel/sun4d_irq.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/arch/sparc/kernel/sun4d_irq.c b/arch/sparc/kernel/sun4d_irq.c index 74eed9775ac0..836d1562787a 100644 --- a/arch/sparc/kernel/sun4d_irq.c +++ b/arch/sparc/kernel/sun4d_irq.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <asm/sbus.h> | 38 | #include <asm/sbus.h> |
39 | #include <asm/sbi.h> | 39 | #include <asm/sbi.h> |
40 | #include <asm/cacheflush.h> | 40 | #include <asm/cacheflush.h> |
41 | #include <asm/irq_regs.h> | ||
41 | 42 | ||
42 | /* If you trust current SCSI layer to handle different SCSI IRQs, enable this. I don't trust it... -jj */ | 43 | /* If you trust current SCSI layer to handle different SCSI IRQs, enable this. I don't trust it... -jj */ |
43 | /* #define DISTRIBUTE_IRQS */ | 44 | /* #define DISTRIBUTE_IRQS */ |
@@ -198,6 +199,7 @@ extern void unexpected_irq(int, void *, struct pt_regs *); | |||
198 | 199 | ||
199 | void sun4d_handler_irq(int irq, struct pt_regs * regs) | 200 | void sun4d_handler_irq(int irq, struct pt_regs * regs) |
200 | { | 201 | { |
202 | struct pt_regs *old_regs; | ||
201 | struct irqaction * action; | 203 | struct irqaction * action; |
202 | int cpu = smp_processor_id(); | 204 | int cpu = smp_processor_id(); |
203 | /* SBUS IRQ level (1 - 7) */ | 205 | /* SBUS IRQ level (1 - 7) */ |
@@ -208,6 +210,7 @@ void sun4d_handler_irq(int irq, struct pt_regs * regs) | |||
208 | 210 | ||
209 | cc_set_iclr(1 << irq); | 211 | cc_set_iclr(1 << irq); |
210 | 212 | ||
213 | old_regs = set_irq_regs(regs); | ||
211 | irq_enter(); | 214 | irq_enter(); |
212 | kstat_cpu(cpu).irqs[irq]++; | 215 | kstat_cpu(cpu).irqs[irq]++; |
213 | if (!sbusl) { | 216 | if (!sbusl) { |
@@ -215,7 +218,7 @@ void sun4d_handler_irq(int irq, struct pt_regs * regs) | |||
215 | if (!action) | 218 | if (!action) |
216 | unexpected_irq(irq, NULL, regs); | 219 | unexpected_irq(irq, NULL, regs); |
217 | do { | 220 | do { |
218 | action->handler(irq, action->dev_id, regs); | 221 | action->handler(irq, action->dev_id); |
219 | action = action->next; | 222 | action = action->next; |
220 | } while (action); | 223 | } while (action); |
221 | } else { | 224 | } else { |
@@ -242,7 +245,7 @@ void sun4d_handler_irq(int irq, struct pt_regs * regs) | |||
242 | if (!action) | 245 | if (!action) |
243 | unexpected_irq(irq, NULL, regs); | 246 | unexpected_irq(irq, NULL, regs); |
244 | do { | 247 | do { |
245 | action->handler(irq, action->dev_id, regs); | 248 | action->handler(irq, action->dev_id); |
246 | action = action->next; | 249 | action = action->next; |
247 | } while (action); | 250 | } while (action); |
248 | release_sbi(SBI2DEVID(sbino), slot); | 251 | release_sbi(SBI2DEVID(sbino), slot); |
@@ -250,6 +253,7 @@ void sun4d_handler_irq(int irq, struct pt_regs * regs) | |||
250 | } | 253 | } |
251 | } | 254 | } |
252 | irq_exit(); | 255 | irq_exit(); |
256 | set_irq_regs(old_regs); | ||
253 | } | 257 | } |
254 | 258 | ||
255 | unsigned int sun4d_build_irq(struct sbus_dev *sdev, int irq) | 259 | unsigned int sun4d_build_irq(struct sbus_dev *sdev, int irq) |
@@ -272,7 +276,7 @@ unsigned int sun4d_sbint_to_irq(struct sbus_dev *sdev, unsigned int sbint) | |||
272 | } | 276 | } |
273 | 277 | ||
274 | int sun4d_request_irq(unsigned int irq, | 278 | int sun4d_request_irq(unsigned int irq, |
275 | irqreturn_t (*handler)(int, void *, struct pt_regs *), | 279 | irqreturn_t (*handler)(int, void *), |
276 | unsigned long irqflags, const char * devname, void *dev_id) | 280 | unsigned long irqflags, const char * devname, void *dev_id) |
277 | { | 281 | { |
278 | struct irqaction *action, *tmp = NULL, **actionp; | 282 | struct irqaction *action, *tmp = NULL, **actionp; |
@@ -466,7 +470,7 @@ static void sun4d_load_profile_irq(int cpu, unsigned int limit) | |||
466 | bw_set_prof_limit(cpu, limit); | 470 | bw_set_prof_limit(cpu, limit); |
467 | } | 471 | } |
468 | 472 | ||
469 | static void __init sun4d_init_timers(irqreturn_t (*counter_fn)(int, void *, struct pt_regs *)) | 473 | static void __init sun4d_init_timers(irqreturn_t (*counter_fn)(int, void *)) |
470 | { | 474 | { |
471 | int irq; | 475 | int irq; |
472 | int cpu; | 476 | int cpu; |