aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2006-10-07 11:29:18 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-07 13:51:15 -0400
commit9c8e7f5cc965d30006c917ab19221e06fcc5a4f9 (patch)
tree2ee465eedaec181e1eb8f50acbc0f86c03325a32
parent8774cb815f2492a95b90a927f93a2de555753b32 (diff)
[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>
-rw-r--r--arch/m32r/kernel/irq.c5
-rw-r--r--arch/m32r/kernel/smp.c13
-rw-r--r--arch/m32r/kernel/time.c10
-rw-r--r--drivers/net/smc91x.c2
-rw-r--r--drivers/pcmcia/m32r_pcc.c2
-rw-r--r--drivers/serial/m32r_sio.c2
-rw-r--r--include/asm-m32r/irq_regs.h1
7 files changed, 21 insertions, 14 deletions
diff --git a/arch/m32r/kernel/irq.c b/arch/m32r/kernel/irq.c
index 3841861df6a2..f8d8650383e0 100644
--- a/arch/m32r/kernel/irq.c
+++ b/arch/m32r/kernel/irq.c
@@ -77,13 +77,16 @@ skip:
77 */ 77 */
78asmlinkage unsigned int do_IRQ(int irq, struct pt_regs *regs) 78asmlinkage 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 irq_enter(); 82 irq_enter();
81 83
82#ifdef CONFIG_DEBUG_STACKOVERFLOW 84#ifdef CONFIG_DEBUG_STACKOVERFLOW
83 /* FIXME M32R */ 85 /* FIXME M32R */
84#endif 86#endif
85 __do_IRQ(irq, regs); 87 __do_IRQ(irq);
86 irq_exit(); 88 irq_exit();
89 set_irq_regs(old_regs);
87 90
88 return 1; 91 return 1;
89} 92}
diff --git a/arch/m32r/kernel/smp.c b/arch/m32r/kernel/smp.c
index 8b1f6eb76870..722e21f556dc 100644
--- a/arch/m32r/kernel/smp.c
+++ b/arch/m32r/kernel/smp.c
@@ -101,7 +101,7 @@ void smp_call_function_interrupt(void);
101 101
102void smp_send_timer(void); 102void smp_send_timer(void);
103void smp_ipi_timer_interrupt(struct pt_regs *); 103void smp_ipi_timer_interrupt(struct pt_regs *);
104void smp_local_timer_interrupt(struct pt_regs *); 104void smp_local_timer_interrupt(void);
105 105
106void send_IPI_allbutself(int, int); 106void send_IPI_allbutself(int, int);
107static void send_IPI_mask(cpumask_t, int, int); 107static void send_IPI_mask(cpumask_t, int, int);
@@ -734,9 +734,12 @@ void smp_send_timer(void)
734 *==========================================================================*/ 734 *==========================================================================*/
735void smp_ipi_timer_interrupt(struct pt_regs *regs) 735void smp_ipi_timer_interrupt(struct pt_regs *regs)
736{ 736{
737 struct pt_regs *old_regs;
738 old_regs = set_irq_regs(regs);
737 irq_enter(); 739 irq_enter();
738 smp_local_timer_interrupt(regs); 740 smp_local_timer_interrupt();
739 irq_exit(); 741 irq_exit();
742 set_irq_regs(old_regs);
740} 743}
741 744
742/*==========================================================================* 745/*==========================================================================*
@@ -762,9 +765,9 @@ void smp_ipi_timer_interrupt(struct pt_regs *regs)
762 * ---------- --- -------------------------------------------------------- 765 * ---------- --- --------------------------------------------------------
763 * 2003-06-24 hy use per_cpu structure. 766 * 2003-06-24 hy use per_cpu structure.
764 *==========================================================================*/ 767 *==========================================================================*/
765void smp_local_timer_interrupt(struct pt_regs *regs) 768void smp_local_timer_interrupt(void)
766{ 769{
767 int user = user_mode(regs); 770 int user = user_mode(get_irq_regs());
768 int cpu_id = smp_processor_id(); 771 int cpu_id = smp_processor_id();
769 772
770 /* 773 /*
@@ -774,7 +777,7 @@ void smp_local_timer_interrupt(struct pt_regs *regs)
774 * useful with a profiling multiplier != 1 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 if (--per_cpu(prof_counter, cpu_id) <= 0) { 782 if (--per_cpu(prof_counter, cpu_id) <= 0) {
780 /* 783 /*
diff --git a/arch/m32r/kernel/time.c b/arch/m32r/kernel/time.c
index d8af155db984..a09038282c78 100644
--- a/arch/m32r/kernel/time.c
+++ b/arch/m32r/kernel/time.c
@@ -35,7 +35,7 @@
35 35
36#ifdef CONFIG_SMP 36#ifdef CONFIG_SMP
37extern void send_IPI_allbutself(int, int); 37extern void send_IPI_allbutself(int, int);
38extern void smp_local_timer_interrupt(struct pt_regs *); 38extern void smp_local_timer_interrupt(void);
39#endif 39#endif
40 40
41#define TICK_SIZE (tick_nsec / 1000) 41#define TICK_SIZE (tick_nsec / 1000)
@@ -188,15 +188,15 @@ static long last_rtc_update = 0;
188 * timer_interrupt() needs to keep up the real-time clock, 188 * timer_interrupt() needs to keep up the real-time clock,
189 * as well as call the "do_timer()" routine every clocktick 189 * as well as call the "do_timer()" routine every clocktick
190 */ 190 */
191irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) 191irqreturn_t timer_interrupt(int irq, void *dev_id)
192{ 192{
193#ifndef CONFIG_SMP 193#ifndef CONFIG_SMP
194 profile_tick(CPU_PROFILING, regs); 194 profile_tick(CPU_PROFILING);
195#endif 195#endif
196 do_timer(1); 196 do_timer(1);
197 197
198#ifndef CONFIG_SMP 198#ifndef CONFIG_SMP
199 update_process_times(user_mode(regs)); 199 update_process_times(user_mode(get_irq_regs()));
200#endif 200#endif
201 /* 201 /*
202 * If we have an externally synchronized Linux clock, then update 202 * If we have an externally synchronized Linux clock, then update
@@ -221,7 +221,7 @@ irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
221 a hack, so don't look closely for now.. */ 221 a hack, so don't look closely for now.. */
222 222
223#ifdef CONFIG_SMP 223#ifdef CONFIG_SMP
224 smp_local_timer_interrupt(regs); 224 smp_local_timer_interrupt();
225 smp_send_timer(); 225 smp_send_timer();
226#endif 226#endif
227 227
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c
index 506807fa5268..95b6478f55c6 100644
--- a/drivers/net/smc91x.c
+++ b/drivers/net/smc91x.c
@@ -1400,7 +1400,7 @@ static irqreturn_t smc_interrupt(int irq, void *dev_id)
1400static void smc_poll_controller(struct net_device *dev) 1400static void smc_poll_controller(struct net_device *dev)
1401{ 1401{
1402 disable_irq(dev->irq); 1402 disable_irq(dev->irq);
1403 smc_interrupt(dev->irq, dev, NULL); 1403 smc_interrupt(dev->irq, dev);
1404 enable_irq(dev->irq); 1404 enable_irq(dev->irq);
1405} 1405}
1406#endif 1406#endif
diff --git a/drivers/pcmcia/m32r_pcc.c b/drivers/pcmcia/m32r_pcc.c
index 0964fd76bfe3..bbf025874d0c 100644
--- a/drivers/pcmcia/m32r_pcc.c
+++ b/drivers/pcmcia/m32r_pcc.c
@@ -395,7 +395,7 @@ static irqreturn_t pcc_interrupt(int irq, void *dev)
395 395
396static void pcc_interrupt_wrapper(u_long data) 396static void pcc_interrupt_wrapper(u_long data)
397{ 397{
398 pcc_interrupt(0, NULL, NULL); 398 pcc_interrupt(0, NULL);
399 init_timer(&poll_timer); 399 init_timer(&poll_timer);
400 poll_timer.expires = jiffies + poll_interval; 400 poll_timer.expires = jiffies + poll_interval;
401 add_timer(&poll_timer); 401 add_timer(&poll_timer);
diff --git a/drivers/serial/m32r_sio.c b/drivers/serial/m32r_sio.c
index c85ac1a77608..7656a35f5e2f 100644
--- a/drivers/serial/m32r_sio.c
+++ b/drivers/serial/m32r_sio.c
@@ -590,7 +590,7 @@ static void m32r_sio_timeout(unsigned long data)
590 sts = sio_in(up, SIOSTS); 590 sts = sio_in(up, SIOSTS);
591 if (sts & 0x5) { 591 if (sts & 0x5) {
592 spin_lock(&up->port.lock); 592 spin_lock(&up->port.lock);
593 m32r_sio_handle_port(up, sts, NULL); 593 m32r_sio_handle_port(up, sts);
594 spin_unlock(&up->port.lock); 594 spin_unlock(&up->port.lock);
595 } 595 }
596 596
diff --git a/include/asm-m32r/irq_regs.h b/include/asm-m32r/irq_regs.h
new file mode 100644
index 000000000000..3dd9c0b70270
--- /dev/null
+++ b/include/asm-m32r/irq_regs.h
@@ -0,0 +1 @@
#include <asm-generic/irq_regs.h>