Commit 9c8e7f5cc965d30006c917ab19221e06fcc5a4f9
Committed by
Linus Torvalds
1 parent
8774cb815f
Exists in
master
and in
7 other branches
[PATCH] m32r pt_regs fixes
... and now with irq_regs.h not forgotten... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing 7 changed files with 21 additions and 14 deletions Side-by-side Diff
arch/m32r/kernel/irq.c
... | ... | @@ -77,13 +77,16 @@ |
77 | 77 | */ |
78 | 78 | asmlinkage unsigned int do_IRQ(int irq, struct pt_regs *regs) |
79 | 79 | { |
80 | + struct pt_regs *old_regs; | |
81 | + old_regs = set_irq_regs(regs); | |
80 | 82 | irq_enter(); |
81 | 83 | |
82 | 84 | #ifdef CONFIG_DEBUG_STACKOVERFLOW |
83 | 85 | /* FIXME M32R */ |
84 | 86 | #endif |
85 | - __do_IRQ(irq, regs); | |
87 | + __do_IRQ(irq); | |
86 | 88 | irq_exit(); |
89 | + set_irq_regs(old_regs); | |
87 | 90 | |
88 | 91 | return 1; |
89 | 92 | } |
arch/m32r/kernel/smp.c
... | ... | @@ -101,7 +101,7 @@ |
101 | 101 | |
102 | 102 | void smp_send_timer(void); |
103 | 103 | void smp_ipi_timer_interrupt(struct pt_regs *); |
104 | -void smp_local_timer_interrupt(struct pt_regs *); | |
104 | +void smp_local_timer_interrupt(void); | |
105 | 105 | |
106 | 106 | void send_IPI_allbutself(int, int); |
107 | 107 | static void send_IPI_mask(cpumask_t, int, int); |
108 | 108 | |
109 | 109 | |
... | ... | @@ -734,9 +734,12 @@ |
734 | 734 | *==========================================================================*/ |
735 | 735 | void smp_ipi_timer_interrupt(struct pt_regs *regs) |
736 | 736 | { |
737 | + struct pt_regs *old_regs; | |
738 | + old_regs = set_irq_regs(regs); | |
737 | 739 | irq_enter(); |
738 | - smp_local_timer_interrupt(regs); | |
740 | + smp_local_timer_interrupt(); | |
739 | 741 | irq_exit(); |
742 | + set_irq_regs(old_regs); | |
740 | 743 | } |
741 | 744 | |
742 | 745 | /*==========================================================================* |
743 | 746 | |
... | ... | @@ -762,9 +765,9 @@ |
762 | 765 | * ---------- --- -------------------------------------------------------- |
763 | 766 | * 2003-06-24 hy use per_cpu structure. |
764 | 767 | *==========================================================================*/ |
765 | -void smp_local_timer_interrupt(struct pt_regs *regs) | |
768 | +void smp_local_timer_interrupt(void) | |
766 | 769 | { |
767 | - int user = user_mode(regs); | |
770 | + int user = user_mode(get_irq_regs()); | |
768 | 771 | int cpu_id = smp_processor_id(); |
769 | 772 | |
770 | 773 | /* |
... | ... | @@ -774,7 +777,7 @@ |
774 | 777 | * useful with a profiling multiplier != 1 |
775 | 778 | */ |
776 | 779 | |
777 | - profile_tick(CPU_PROFILING, regs); | |
780 | + profile_tick(CPU_PROFILING); | |
778 | 781 | |
779 | 782 | if (--per_cpu(prof_counter, cpu_id) <= 0) { |
780 | 783 | /* |
arch/m32r/kernel/time.c
... | ... | @@ -35,7 +35,7 @@ |
35 | 35 | |
36 | 36 | #ifdef CONFIG_SMP |
37 | 37 | extern void send_IPI_allbutself(int, int); |
38 | -extern void smp_local_timer_interrupt(struct pt_regs *); | |
38 | +extern void smp_local_timer_interrupt(void); | |
39 | 39 | #endif |
40 | 40 | |
41 | 41 | #define TICK_SIZE (tick_nsec / 1000) |
42 | 42 | |
43 | 43 | |
... | ... | @@ -188,15 +188,15 @@ |
188 | 188 | * timer_interrupt() needs to keep up the real-time clock, |
189 | 189 | * as well as call the "do_timer()" routine every clocktick |
190 | 190 | */ |
191 | -irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) | |
191 | +irqreturn_t timer_interrupt(int irq, void *dev_id) | |
192 | 192 | { |
193 | 193 | #ifndef CONFIG_SMP |
194 | - profile_tick(CPU_PROFILING, regs); | |
194 | + profile_tick(CPU_PROFILING); | |
195 | 195 | #endif |
196 | 196 | do_timer(1); |
197 | 197 | |
198 | 198 | #ifndef CONFIG_SMP |
199 | - update_process_times(user_mode(regs)); | |
199 | + update_process_times(user_mode(get_irq_regs())); | |
200 | 200 | #endif |
201 | 201 | /* |
202 | 202 | * If we have an externally synchronized Linux clock, then update |
... | ... | @@ -221,7 +221,7 @@ |
221 | 221 | a hack, so don't look closely for now.. */ |
222 | 222 | |
223 | 223 | #ifdef CONFIG_SMP |
224 | - smp_local_timer_interrupt(regs); | |
224 | + smp_local_timer_interrupt(); | |
225 | 225 | smp_send_timer(); |
226 | 226 | #endif |
227 | 227 |
drivers/net/smc91x.c
drivers/pcmcia/m32r_pcc.c
drivers/serial/m32r_sio.c
include/asm-m32r/irq_regs.h
1 | +#include <asm-generic/irq_regs.h> |