Skip to content

Commit

Permalink
[PATCH] sparc64 irq pt_regs fallout
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Al Viro authored and Linus Torvalds committed Oct 9, 2006
1 parent 58ba81d commit 63540ba
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
7 changes: 5 additions & 2 deletions arch/sparc64/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -522,25 +522,28 @@ void ack_bad_irq(unsigned int virt_irq)
}

#ifndef CONFIG_SMP
extern irqreturn_t timer_interrupt(int, void *, struct pt_regs *);
extern irqreturn_t timer_interrupt(int, void *);

void timer_irq(int irq, struct pt_regs *regs)
{
unsigned long clr_mask = 1 << irq;
unsigned long tick_mask = tick_ops->softint_mask;
struct pt_regs *old_regs;

if (get_softint() & tick_mask) {
irq = 0;
clr_mask = tick_mask;
}
clear_softint(clr_mask);

old_regs = set_irq_regs(regs);
irq_enter();

kstat_this_cpu.irqs[0]++;
timer_interrupt(irq, NULL, regs);
timer_interrupt(irq, NULL);

irq_exit();
set_irq_regs(old_regs);
}
#endif

Expand Down
7 changes: 4 additions & 3 deletions arch/sparc64/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
#include <asm/cpudata.h>
#include <asm/uaccess.h>
#include <asm/prom.h>
#include <asm/irq_regs.h>

DEFINE_SPINLOCK(mostek_lock);
DEFINE_SPINLOCK(rtc_lock);
Expand Down Expand Up @@ -452,16 +453,16 @@ static inline void timer_check_rtc(void)
}
}

irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs * regs)
irqreturn_t timer_interrupt(int irq, void *dev_id)
{
unsigned long ticks, compare, pstate;

write_seqlock(&xtime_lock);

do {
#ifndef CONFIG_SMP
profile_tick(CPU_PROFILING, regs);
update_process_times(user_mode(regs));
profile_tick(CPU_PROFILING);
update_process_times(user_mode(get_irq_regs()));
#endif
do_timer(1);

Expand Down

0 comments on commit 63540ba

Please sign in to comment.