diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2006-10-07 09:17:31 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-07 13:51:14 -0400 |
commit | 8774cb815f2492a95b90a927f93a2de555753b32 (patch) | |
tree | 40725c7a7b0618811b2f09753a4e4cd88c1db3e2 | |
parent | 2850bc273776cbb1b510c5828e9e456dffb50a32 (diff) |
[PATCH] minimal alpha pt_regs fixes
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | arch/alpha/kernel/irq.c | 5 | ||||
-rw-r--r-- | arch/alpha/kernel/proto.h | 2 | ||||
-rw-r--r-- | arch/alpha/kernel/smp.c | 6 | ||||
-rw-r--r-- | arch/alpha/kernel/time.c | 6 | ||||
-rw-r--r-- | include/asm-alpha/irq_regs.h | 1 |
5 files changed, 14 insertions, 6 deletions
diff --git a/arch/alpha/kernel/irq.c b/arch/alpha/kernel/irq.c index 729c475d2269..dba4e70926f5 100644 --- a/arch/alpha/kernel/irq.c +++ b/arch/alpha/kernel/irq.c | |||
@@ -129,6 +129,7 @@ unlock: | |||
129 | void | 129 | void |
130 | handle_irq(int irq, struct pt_regs * regs) | 130 | handle_irq(int irq, struct pt_regs * regs) |
131 | { | 131 | { |
132 | struct pt_regs *old_regs; | ||
132 | /* | 133 | /* |
133 | * We ack quickly, we don't want the irq controller | 134 | * We ack quickly, we don't want the irq controller |
134 | * thinking we're snobs just because some other CPU has | 135 | * thinking we're snobs just because some other CPU has |
@@ -149,6 +150,7 @@ handle_irq(int irq, struct pt_regs * regs) | |||
149 | return; | 150 | return; |
150 | } | 151 | } |
151 | 152 | ||
153 | old_regs = set_irq_regs(regs); | ||
152 | irq_enter(); | 154 | irq_enter(); |
153 | /* | 155 | /* |
154 | * __do_IRQ() must be called with IPL_MAX. Note that we do not | 156 | * __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 | * at IPL 0. | 159 | * at IPL 0. |
158 | */ | 160 | */ |
159 | local_irq_disable(); | 161 | local_irq_disable(); |
160 | __do_IRQ(irq, regs); | 162 | __do_IRQ(irq); |
161 | irq_exit(); | 163 | irq_exit(); |
164 | set_irq_regs(old_regs); | ||
162 | } | 165 | } |
diff --git a/arch/alpha/kernel/proto.h b/arch/alpha/kernel/proto.h index 21f71287b6f5..408bda25b0b1 100644 --- a/arch/alpha/kernel/proto.h +++ b/arch/alpha/kernel/proto.h | |||
@@ -133,7 +133,7 @@ extern void smp_percpu_timer_interrupt(struct pt_regs *); | |||
133 | /* extern void reset_for_srm(void); */ | 133 | /* extern void reset_for_srm(void); */ |
134 | 134 | ||
135 | /* time.c */ | 135 | /* time.c */ |
136 | extern irqreturn_t timer_interrupt(int irq, void *dev, struct pt_regs * regs); | 136 | extern irqreturn_t timer_interrupt(int irq, void *dev); |
137 | extern void common_init_rtc(void); | 137 | extern void common_init_rtc(void); |
138 | extern unsigned long est_cycle_freq; | 138 | extern unsigned long est_cycle_freq; |
139 | 139 | ||
diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c index 4dc273e537fd..596780e2c7da 100644 --- a/arch/alpha/kernel/smp.c +++ b/arch/alpha/kernel/smp.c | |||
@@ -515,12 +515,15 @@ smp_cpus_done(unsigned int max_cpus) | |||
515 | void | 515 | void |
516 | smp_percpu_timer_interrupt(struct pt_regs *regs) | 516 | smp_percpu_timer_interrupt(struct pt_regs *regs) |
517 | { | 517 | { |
518 | struct pt_regs *old_regs; | ||
518 | int cpu = smp_processor_id(); | 519 | int cpu = smp_processor_id(); |
519 | unsigned long user = user_mode(regs); | 520 | unsigned long user = user_mode(regs); |
520 | struct cpuinfo_alpha *data = &cpu_data[cpu]; | 521 | struct cpuinfo_alpha *data = &cpu_data[cpu]; |
521 | 522 | ||
523 | old_regs = set_irq_regs(regs); | ||
524 | |||
522 | /* Record kernel PC. */ | 525 | /* Record kernel PC. */ |
523 | profile_tick(CPU_PROFILING, regs); | 526 | profile_tick(CPU_PROFILING); |
524 | 527 | ||
525 | if (!--data->prof_counter) { | 528 | if (!--data->prof_counter) { |
526 | /* We need to make like a normal interrupt -- otherwise | 529 | /* We need to make like a normal interrupt -- otherwise |
@@ -534,6 +537,7 @@ smp_percpu_timer_interrupt(struct pt_regs *regs) | |||
534 | 537 | ||
535 | irq_exit(); | 538 | irq_exit(); |
536 | } | 539 | } |
540 | set_irq_regs(old_regs); | ||
537 | } | 541 | } |
538 | 542 | ||
539 | int __init | 543 | int __init |
diff --git a/arch/alpha/kernel/time.c b/arch/alpha/kernel/time.c index 581ddcc22fc5..cf0666523989 100644 --- a/arch/alpha/kernel/time.c +++ b/arch/alpha/kernel/time.c | |||
@@ -104,7 +104,7 @@ unsigned long long sched_clock(void) | |||
104 | * timer_interrupt() needs to keep up the real-time clock, | 104 | * timer_interrupt() needs to keep up the real-time clock, |
105 | * as well as call the "do_timer()" routine every clocktick | 105 | * as well as call the "do_timer()" routine every clocktick |
106 | */ | 106 | */ |
107 | irqreturn_t timer_interrupt(int irq, void *dev, struct pt_regs * regs) | 107 | irqreturn_t timer_interrupt(int irq, void *dev) |
108 | { | 108 | { |
109 | unsigned long delta; | 109 | unsigned long delta; |
110 | __u32 now; | 110 | __u32 now; |
@@ -112,7 +112,7 @@ irqreturn_t timer_interrupt(int irq, void *dev, struct pt_regs * regs) | |||
112 | 112 | ||
113 | #ifndef CONFIG_SMP | 113 | #ifndef CONFIG_SMP |
114 | /* Not SMP, do kernel PC profiling here. */ | 114 | /* Not SMP, do kernel PC profiling here. */ |
115 | profile_tick(CPU_PROFILING, regs); | 115 | profile_tick(CPU_PROFILING); |
116 | #endif | 116 | #endif |
117 | 117 | ||
118 | write_seqlock(&xtime_lock); | 118 | write_seqlock(&xtime_lock); |
@@ -132,7 +132,7 @@ irqreturn_t timer_interrupt(int irq, void *dev, struct pt_regs * regs) | |||
132 | while (nticks > 0) { | 132 | while (nticks > 0) { |
133 | do_timer(1); | 133 | do_timer(1); |
134 | #ifndef CONFIG_SMP | 134 | #ifndef CONFIG_SMP |
135 | update_process_times(user_mode(regs)); | 135 | update_process_times(user_mode(get_irq_regs())); |
136 | #endif | 136 | #endif |
137 | nticks--; | 137 | nticks--; |
138 | } | 138 | } |
diff --git a/include/asm-alpha/irq_regs.h b/include/asm-alpha/irq_regs.h new file mode 100644 index 000000000000..3dd9c0b70270 --- /dev/null +++ b/include/asm-alpha/irq_regs.h | |||
@@ -0,0 +1 @@ | |||
#include <asm-generic/irq_regs.h> | |||