aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m32r
diff options
context:
space:
mode:
Diffstat (limited to 'arch/m32r')
-rw-r--r--arch/m32r/kernel/irq.c5
-rw-r--r--arch/m32r/kernel/setup.c8
-rw-r--r--arch/m32r/kernel/setup_mappi.c16
-rw-r--r--arch/m32r/kernel/signal.c6
-rw-r--r--arch/m32r/kernel/smp.c15
-rw-r--r--arch/m32r/kernel/sys_m32r.c6
-rw-r--r--arch/m32r/kernel/time.c10
-rw-r--r--arch/m32r/kernel/traps.c2
8 files changed, 37 insertions, 31 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/setup.c b/arch/m32r/kernel/setup.c
index 3f35ab3d2dc2..0e7778be33cc 100644
--- a/arch/m32r/kernel/setup.c
+++ b/arch/m32r/kernel/setup.c
@@ -369,10 +369,10 @@ static void c_stop(struct seq_file *m, void *v)
369} 369}
370 370
371struct seq_operations cpuinfo_op = { 371struct seq_operations cpuinfo_op = {
372 start: c_start, 372 .start = c_start,
373 next: c_next, 373 .next = c_next,
374 stop: c_stop, 374 .stop = c_stop,
375 show: show_cpuinfo, 375 .show = show_cpuinfo,
376}; 376};
377#endif /* CONFIG_PROC_FS */ 377#endif /* CONFIG_PROC_FS */
378 378
diff --git a/arch/m32r/kernel/setup_mappi.c b/arch/m32r/kernel/setup_mappi.c
index 67dbbdc9d111..6b2d77da0683 100644
--- a/arch/m32r/kernel/setup_mappi.c
+++ b/arch/m32r/kernel/setup_mappi.c
@@ -86,7 +86,7 @@ void __init init_IRQ(void)
86 /* INT0 : LAN controller (RTL8019AS) */ 86 /* INT0 : LAN controller (RTL8019AS) */
87 irq_desc[M32R_IRQ_INT0].status = IRQ_DISABLED; 87 irq_desc[M32R_IRQ_INT0].status = IRQ_DISABLED;
88 irq_desc[M32R_IRQ_INT0].chip = &mappi_irq_type; 88 irq_desc[M32R_IRQ_INT0].chip = &mappi_irq_type;
89 irq_desc[M32R_IRQ_INT0].action = 0; 89 irq_desc[M32R_IRQ_INT0].action = NULL;
90 irq_desc[M32R_IRQ_INT0].depth = 1; 90 irq_desc[M32R_IRQ_INT0].depth = 1;
91 icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; 91 icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10;
92 disable_mappi_irq(M32R_IRQ_INT0); 92 disable_mappi_irq(M32R_IRQ_INT0);
@@ -95,7 +95,7 @@ void __init init_IRQ(void)
95 /* MFT2 : system timer */ 95 /* MFT2 : system timer */
96 irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED; 96 irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED;
97 irq_desc[M32R_IRQ_MFT2].chip = &mappi_irq_type; 97 irq_desc[M32R_IRQ_MFT2].chip = &mappi_irq_type;
98 irq_desc[M32R_IRQ_MFT2].action = 0; 98 irq_desc[M32R_IRQ_MFT2].action = NULL;
99 irq_desc[M32R_IRQ_MFT2].depth = 1; 99 irq_desc[M32R_IRQ_MFT2].depth = 1;
100 icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; 100 icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN;
101 disable_mappi_irq(M32R_IRQ_MFT2); 101 disable_mappi_irq(M32R_IRQ_MFT2);
@@ -104,7 +104,7 @@ void __init init_IRQ(void)
104 /* SIO0_R : uart receive data */ 104 /* SIO0_R : uart receive data */
105 irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED; 105 irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED;
106 irq_desc[M32R_IRQ_SIO0_R].chip = &mappi_irq_type; 106 irq_desc[M32R_IRQ_SIO0_R].chip = &mappi_irq_type;
107 irq_desc[M32R_IRQ_SIO0_R].action = 0; 107 irq_desc[M32R_IRQ_SIO0_R].action = NULL;
108 irq_desc[M32R_IRQ_SIO0_R].depth = 1; 108 irq_desc[M32R_IRQ_SIO0_R].depth = 1;
109 icu_data[M32R_IRQ_SIO0_R].icucr = 0; 109 icu_data[M32R_IRQ_SIO0_R].icucr = 0;
110 disable_mappi_irq(M32R_IRQ_SIO0_R); 110 disable_mappi_irq(M32R_IRQ_SIO0_R);
@@ -112,7 +112,7 @@ void __init init_IRQ(void)
112 /* SIO0_S : uart send data */ 112 /* SIO0_S : uart send data */
113 irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED; 113 irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED;
114 irq_desc[M32R_IRQ_SIO0_S].chip = &mappi_irq_type; 114 irq_desc[M32R_IRQ_SIO0_S].chip = &mappi_irq_type;
115 irq_desc[M32R_IRQ_SIO0_S].action = 0; 115 irq_desc[M32R_IRQ_SIO0_S].action = NULL;
116 irq_desc[M32R_IRQ_SIO0_S].depth = 1; 116 irq_desc[M32R_IRQ_SIO0_S].depth = 1;
117 icu_data[M32R_IRQ_SIO0_S].icucr = 0; 117 icu_data[M32R_IRQ_SIO0_S].icucr = 0;
118 disable_mappi_irq(M32R_IRQ_SIO0_S); 118 disable_mappi_irq(M32R_IRQ_SIO0_S);
@@ -120,7 +120,7 @@ void __init init_IRQ(void)
120 /* SIO1_R : uart receive data */ 120 /* SIO1_R : uart receive data */
121 irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED; 121 irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED;
122 irq_desc[M32R_IRQ_SIO1_R].chip = &mappi_irq_type; 122 irq_desc[M32R_IRQ_SIO1_R].chip = &mappi_irq_type;
123 irq_desc[M32R_IRQ_SIO1_R].action = 0; 123 irq_desc[M32R_IRQ_SIO1_R].action = NULL;
124 irq_desc[M32R_IRQ_SIO1_R].depth = 1; 124 irq_desc[M32R_IRQ_SIO1_R].depth = 1;
125 icu_data[M32R_IRQ_SIO1_R].icucr = 0; 125 icu_data[M32R_IRQ_SIO1_R].icucr = 0;
126 disable_mappi_irq(M32R_IRQ_SIO1_R); 126 disable_mappi_irq(M32R_IRQ_SIO1_R);
@@ -128,7 +128,7 @@ void __init init_IRQ(void)
128 /* SIO1_S : uart send data */ 128 /* SIO1_S : uart send data */
129 irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED; 129 irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED;
130 irq_desc[M32R_IRQ_SIO1_S].chip = &mappi_irq_type; 130 irq_desc[M32R_IRQ_SIO1_S].chip = &mappi_irq_type;
131 irq_desc[M32R_IRQ_SIO1_S].action = 0; 131 irq_desc[M32R_IRQ_SIO1_S].action = NULL;
132 irq_desc[M32R_IRQ_SIO1_S].depth = 1; 132 irq_desc[M32R_IRQ_SIO1_S].depth = 1;
133 icu_data[M32R_IRQ_SIO1_S].icucr = 0; 133 icu_data[M32R_IRQ_SIO1_S].icucr = 0;
134 disable_mappi_irq(M32R_IRQ_SIO1_S); 134 disable_mappi_irq(M32R_IRQ_SIO1_S);
@@ -138,7 +138,7 @@ void __init init_IRQ(void)
138 /* INT1 : pccard0 interrupt */ 138 /* INT1 : pccard0 interrupt */
139 irq_desc[M32R_IRQ_INT1].status = IRQ_DISABLED; 139 irq_desc[M32R_IRQ_INT1].status = IRQ_DISABLED;
140 irq_desc[M32R_IRQ_INT1].chip = &mappi_irq_type; 140 irq_desc[M32R_IRQ_INT1].chip = &mappi_irq_type;
141 irq_desc[M32R_IRQ_INT1].action = 0; 141 irq_desc[M32R_IRQ_INT1].action = NULL;
142 irq_desc[M32R_IRQ_INT1].depth = 1; 142 irq_desc[M32R_IRQ_INT1].depth = 1;
143 icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD00; 143 icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD00;
144 disable_mappi_irq(M32R_IRQ_INT1); 144 disable_mappi_irq(M32R_IRQ_INT1);
@@ -146,7 +146,7 @@ void __init init_IRQ(void)
146 /* INT2 : pccard1 interrupt */ 146 /* INT2 : pccard1 interrupt */
147 irq_desc[M32R_IRQ_INT2].status = IRQ_DISABLED; 147 irq_desc[M32R_IRQ_INT2].status = IRQ_DISABLED;
148 irq_desc[M32R_IRQ_INT2].chip = &mappi_irq_type; 148 irq_desc[M32R_IRQ_INT2].chip = &mappi_irq_type;
149 irq_desc[M32R_IRQ_INT2].action = 0; 149 irq_desc[M32R_IRQ_INT2].action = NULL;
150 irq_desc[M32R_IRQ_INT2].depth = 1; 150 irq_desc[M32R_IRQ_INT2].depth = 1;
151 icu_data[M32R_IRQ_INT2].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD00; 151 icu_data[M32R_IRQ_INT2].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD00;
152 disable_mappi_irq(M32R_IRQ_INT2); 152 disable_mappi_irq(M32R_IRQ_INT2);
diff --git a/arch/m32r/kernel/signal.c b/arch/m32r/kernel/signal.c
index a9174efe80cb..b60cea4aebaa 100644
--- a/arch/m32r/kernel/signal.c
+++ b/arch/m32r/kernel/signal.c
@@ -33,7 +33,7 @@
33int do_signal(struct pt_regs *, sigset_t *); 33int do_signal(struct pt_regs *, sigset_t *);
34 34
35asmlinkage int 35asmlinkage int
36sys_rt_sigsuspend(sigset_t *unewset, size_t sigsetsize, 36sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize,
37 unsigned long r2, unsigned long r3, unsigned long r4, 37 unsigned long r2, unsigned long r3, unsigned long r4,
38 unsigned long r5, unsigned long r6, struct pt_regs *regs) 38 unsigned long r5, unsigned long r6, struct pt_regs *regs)
39{ 39{
@@ -78,8 +78,8 @@ sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss,
78struct rt_sigframe 78struct rt_sigframe
79{ 79{
80 int sig; 80 int sig;
81 struct siginfo *pinfo; 81 struct siginfo __user *pinfo;
82 void *puc; 82 void __user *puc;
83 struct siginfo info; 83 struct siginfo info;
84 struct ucontext uc; 84 struct ucontext uc;
85// struct _fpstate fpstate; 85// struct _fpstate fpstate;
diff --git a/arch/m32r/kernel/smp.c b/arch/m32r/kernel/smp.c
index 8b1f6eb76870..360129174b2b 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);
@@ -231,7 +231,7 @@ void smp_flush_tlb_all(void)
231 local_irq_save(flags); 231 local_irq_save(flags);
232 __flush_tlb_all(); 232 __flush_tlb_all();
233 local_irq_restore(flags); 233 local_irq_restore(flags);
234 smp_call_function(flush_tlb_all_ipi, 0, 1, 1); 234 smp_call_function(flush_tlb_all_ipi, NULL, 1, 1);
235 preempt_enable(); 235 preempt_enable();
236} 236}
237 237
@@ -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/sys_m32r.c b/arch/m32r/kernel/sys_m32r.c
index b567351f3c52..b4e7bcb43540 100644
--- a/arch/m32r/kernel/sys_m32r.c
+++ b/arch/m32r/kernel/sys_m32r.c
@@ -31,7 +31,7 @@
31/* 31/*
32 * sys_tas() - test-and-set 32 * sys_tas() - test-and-set
33 */ 33 */
34asmlinkage int sys_tas(int *addr) 34asmlinkage int sys_tas(int __user *addr)
35{ 35{
36 int oldval; 36 int oldval;
37 37
@@ -90,7 +90,7 @@ sys_pipe(unsigned long r0, unsigned long r1, unsigned long r2,
90 90
91 error = do_pipe(fd); 91 error = do_pipe(fd);
92 if (!error) { 92 if (!error) {
93 if (copy_to_user((void *)r0, (void *)fd, 2*sizeof(int))) 93 if (copy_to_user((void __user *)r0, fd, 2*sizeof(int)))
94 error = -EFAULT; 94 error = -EFAULT;
95 } 95 }
96 return error; 96 return error;
@@ -201,7 +201,7 @@ asmlinkage int sys_ipc(uint call, int first, int second,
201 } 201 }
202} 202}
203 203
204asmlinkage int sys_uname(struct old_utsname * name) 204asmlinkage int sys_uname(struct old_utsname __user * name)
205{ 205{
206 int err; 206 int err;
207 if (!name) 207 if (!name)
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/arch/m32r/kernel/traps.c b/arch/m32r/kernel/traps.c
index c1daf2c40c7c..97e0b1c0830e 100644
--- a/arch/m32r/kernel/traps.c
+++ b/arch/m32r/kernel/traps.c
@@ -268,7 +268,7 @@ static __inline__ void do_trap(int trapnr, int signr, const char * str,
268#define DO_ERROR(trapnr, signr, str, name) \ 268#define DO_ERROR(trapnr, signr, str, name) \
269asmlinkage void do_##name(struct pt_regs * regs, long error_code) \ 269asmlinkage void do_##name(struct pt_regs * regs, long error_code) \
270{ \ 270{ \
271 do_trap(trapnr, signr, 0, regs, error_code, NULL); \ 271 do_trap(trapnr, signr, NULL, regs, error_code, NULL); \
272} 272}
273 273
274#define DO_ERROR_INFO(trapnr, signr, str, name, sicode, siaddr) \ 274#define DO_ERROR_INFO(trapnr, signr, str, name, sicode, siaddr) \