Commit 8774cb81 authored by Al Viro's avatar Al Viro Committed by Linus Torvalds

[PATCH] minimal alpha pt_regs fixes

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Acked-by: default avatarJeff Garzik <jeff@garzik.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 2850bc27
...@@ -129,6 +129,7 @@ show_interrupts(struct seq_file *p, void *v) ...@@ -129,6 +129,7 @@ show_interrupts(struct seq_file *p, void *v)
void void
handle_irq(int irq, struct pt_regs * regs) handle_irq(int irq, struct pt_regs * regs)
{ {
struct pt_regs *old_regs;
/* /*
* We ack quickly, we don't want the irq controller * We ack quickly, we don't want the irq controller
* thinking we're snobs just because some other CPU has * thinking we're snobs just because some other CPU has
...@@ -149,6 +150,7 @@ handle_irq(int irq, struct pt_regs * regs) ...@@ -149,6 +150,7 @@ handle_irq(int irq, struct pt_regs * regs)
return; return;
} }
old_regs = set_irq_regs(regs);
irq_enter(); irq_enter();
/* /*
* __do_IRQ() must be called with IPL_MAX. Note that we do not * __do_IRQ() must be called with IPL_MAX. Note that we do not
...@@ -157,6 +159,7 @@ handle_irq(int irq, struct pt_regs * regs) ...@@ -157,6 +159,7 @@ handle_irq(int irq, struct pt_regs * regs)
* at IPL 0. * at IPL 0.
*/ */
local_irq_disable(); local_irq_disable();
__do_IRQ(irq, regs); __do_IRQ(irq);
irq_exit(); irq_exit();
set_irq_regs(old_regs);
} }
...@@ -133,7 +133,7 @@ extern void smp_percpu_timer_interrupt(struct pt_regs *); ...@@ -133,7 +133,7 @@ extern void smp_percpu_timer_interrupt(struct pt_regs *);
/* extern void reset_for_srm(void); */ /* extern void reset_for_srm(void); */
/* time.c */ /* time.c */
extern irqreturn_t timer_interrupt(int irq, void *dev, struct pt_regs * regs); extern irqreturn_t timer_interrupt(int irq, void *dev);
extern void common_init_rtc(void); extern void common_init_rtc(void);
extern unsigned long est_cycle_freq; extern unsigned long est_cycle_freq;
......
...@@ -515,12 +515,15 @@ smp_cpus_done(unsigned int max_cpus) ...@@ -515,12 +515,15 @@ smp_cpus_done(unsigned int max_cpus)
void void
smp_percpu_timer_interrupt(struct pt_regs *regs) smp_percpu_timer_interrupt(struct pt_regs *regs)
{ {
struct pt_regs *old_regs;
int cpu = smp_processor_id(); int cpu = smp_processor_id();
unsigned long user = user_mode(regs); unsigned long user = user_mode(regs);
struct cpuinfo_alpha *data = &cpu_data[cpu]; struct cpuinfo_alpha *data = &cpu_data[cpu];
old_regs = set_irq_regs(regs);
/* Record kernel PC. */ /* Record kernel PC. */
profile_tick(CPU_PROFILING, regs); profile_tick(CPU_PROFILING);
if (!--data->prof_counter) { if (!--data->prof_counter) {
/* We need to make like a normal interrupt -- otherwise /* We need to make like a normal interrupt -- otherwise
...@@ -534,6 +537,7 @@ smp_percpu_timer_interrupt(struct pt_regs *regs) ...@@ -534,6 +537,7 @@ smp_percpu_timer_interrupt(struct pt_regs *regs)
irq_exit(); irq_exit();
} }
set_irq_regs(old_regs);
} }
int __init int __init
......
...@@ -104,7 +104,7 @@ unsigned long long sched_clock(void) ...@@ -104,7 +104,7 @@ unsigned long long sched_clock(void)
* timer_interrupt() needs to keep up the real-time clock, * timer_interrupt() needs to keep up the real-time clock,
* as well as call the "do_timer()" routine every clocktick * as well as call the "do_timer()" routine every clocktick
*/ */
irqreturn_t timer_interrupt(int irq, void *dev, struct pt_regs * regs) irqreturn_t timer_interrupt(int irq, void *dev)
{ {
unsigned long delta; unsigned long delta;
__u32 now; __u32 now;
...@@ -112,7 +112,7 @@ irqreturn_t timer_interrupt(int irq, void *dev, struct pt_regs * regs) ...@@ -112,7 +112,7 @@ irqreturn_t timer_interrupt(int irq, void *dev, struct pt_regs * regs)
#ifndef CONFIG_SMP #ifndef CONFIG_SMP
/* Not SMP, do kernel PC profiling here. */ /* Not SMP, do kernel PC profiling here. */
profile_tick(CPU_PROFILING, regs); profile_tick(CPU_PROFILING);
#endif #endif
write_seqlock(&xtime_lock); write_seqlock(&xtime_lock);
...@@ -132,7 +132,7 @@ irqreturn_t timer_interrupt(int irq, void *dev, struct pt_regs * regs) ...@@ -132,7 +132,7 @@ irqreturn_t timer_interrupt(int irq, void *dev, struct pt_regs * regs)
while (nticks > 0) { while (nticks > 0) {
do_timer(1); do_timer(1);
#ifndef CONFIG_SMP #ifndef CONFIG_SMP
update_process_times(user_mode(regs)); update_process_times(user_mode(get_irq_regs()));
#endif #endif
nticks--; nticks--;
} }
......
#include <asm-generic/irq_regs.h>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment