diff options
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r-- | arch/mips/kernel/cpu-bugs64.c | 2 | ||||
-rw-r--r-- | arch/mips/kernel/gdb-stub.c | 4 | ||||
-rw-r--r-- | arch/mips/kernel/i8259.c | 2 | ||||
-rw-r--r-- | arch/mips/kernel/irixelf.c | 32 | ||||
-rw-r--r-- | arch/mips/kernel/irixinv.c | 42 | ||||
-rw-r--r-- | arch/mips/kernel/irixioctl.c | 2 | ||||
-rw-r--r-- | arch/mips/kernel/irq-msc01.c | 4 | ||||
-rw-r--r-- | arch/mips/kernel/kspd.c | 10 | ||||
-rw-r--r-- | arch/mips/kernel/linux32.c | 14 | ||||
-rw-r--r-- | arch/mips/kernel/mips-mt.c | 2 | ||||
-rw-r--r-- | arch/mips/kernel/process.c | 4 | ||||
-rw-r--r-- | arch/mips/kernel/ptrace.c | 50 | ||||
-rw-r--r-- | arch/mips/kernel/ptrace32.c | 16 | ||||
-rw-r--r-- | arch/mips/kernel/signal32.c | 44 | ||||
-rw-r--r-- | arch/mips/kernel/signal_n32.c | 4 | ||||
-rw-r--r-- | arch/mips/kernel/smp-mt.c | 2 | ||||
-rw-r--r-- | arch/mips/kernel/smtc.c | 4 | ||||
-rw-r--r-- | arch/mips/kernel/syscall.c | 58 | ||||
-rw-r--r-- | arch/mips/kernel/sysirix.c | 20 | ||||
-rw-r--r-- | arch/mips/kernel/time.c | 2 | ||||
-rw-r--r-- | arch/mips/kernel/traps.c | 26 | ||||
-rw-r--r-- | arch/mips/kernel/unaligned.c | 2 |
22 files changed, 173 insertions, 173 deletions
diff --git a/arch/mips/kernel/cpu-bugs64.c b/arch/mips/kernel/cpu-bugs64.c index 6648fde20b9..af78456d413 100644 --- a/arch/mips/kernel/cpu-bugs64.c +++ b/arch/mips/kernel/cpu-bugs64.c | |||
@@ -29,7 +29,7 @@ static inline void align_mod(const int align, const int mod) | |||
29 | ".endr\n\t" | 29 | ".endr\n\t" |
30 | ".set pop" | 30 | ".set pop" |
31 | : | 31 | : |
32 | : GCC_IMM_ASM (align), GCC_IMM_ASM (mod)); | 32 | : GCC_IMM_ASM(align), GCC_IMM_ASM(mod)); |
33 | } | 33 | } |
34 | 34 | ||
35 | static inline void mult_sh_align_mod(long *v1, long *v2, long *w, | 35 | static inline void mult_sh_align_mod(long *v1, long *v2, long *w, |
diff --git a/arch/mips/kernel/gdb-stub.c b/arch/mips/kernel/gdb-stub.c index cb5623aad55..989d06c3827 100644 --- a/arch/mips/kernel/gdb-stub.c +++ b/arch/mips/kernel/gdb-stub.c | |||
@@ -733,7 +733,7 @@ static int kgdb_smp_call_kgdb_wait(void) | |||
733 | * returns 1 if you should skip the instruction at the trap address, 0 | 733 | * returns 1 if you should skip the instruction at the trap address, 0 |
734 | * otherwise. | 734 | * otherwise. |
735 | */ | 735 | */ |
736 | void handle_exception (struct gdb_regs *regs) | 736 | void handle_exception(struct gdb_regs *regs) |
737 | { | 737 | { |
738 | int trap; /* Trap type */ | 738 | int trap; /* Trap type */ |
739 | int sigval; | 739 | int sigval; |
@@ -917,7 +917,7 @@ void handle_exception (struct gdb_regs *regs) | |||
917 | && hexToInt(&ptr, &length)) { | 917 | && hexToInt(&ptr, &length)) { |
918 | if (mem2hex((char *)addr, output_buffer, length, 1)) | 918 | if (mem2hex((char *)addr, output_buffer, length, 1)) |
919 | break; | 919 | break; |
920 | strcpy (output_buffer, "E03"); | 920 | strcpy(output_buffer, "E03"); |
921 | } else | 921 | } else |
922 | strcpy(output_buffer,"E01"); | 922 | strcpy(output_buffer,"E01"); |
923 | break; | 923 | break; |
diff --git a/arch/mips/kernel/i8259.c b/arch/mips/kernel/i8259.c index b6e5bb41b06..a860b21e63e 100644 --- a/arch/mips/kernel/i8259.c +++ b/arch/mips/kernel/i8259.c | |||
@@ -329,7 +329,7 @@ static struct resource pic2_io_resource = { | |||
329 | * driver compatibility reasons interrupts 0 - 15 to be the i8259 | 329 | * driver compatibility reasons interrupts 0 - 15 to be the i8259 |
330 | * interrupts even if the hardware uses a different interrupt numbering. | 330 | * interrupts even if the hardware uses a different interrupt numbering. |
331 | */ | 331 | */ |
332 | void __init init_i8259_irqs (void) | 332 | void __init init_i8259_irqs(void) |
333 | { | 333 | { |
334 | int i; | 334 | int i; |
335 | 335 | ||
diff --git a/arch/mips/kernel/irixelf.c b/arch/mips/kernel/irixelf.c index 403d96f99e7..e3b4b547a82 100644 --- a/arch/mips/kernel/irixelf.c +++ b/arch/mips/kernel/irixelf.c | |||
@@ -203,8 +203,8 @@ static unsigned long * create_irix_tables(char * p, int argc, int envc, | |||
203 | * Put the ELF interpreter info on the stack | 203 | * Put the ELF interpreter info on the stack |
204 | */ | 204 | */ |
205 | #define NEW_AUX_ENT(nr, id, val) \ | 205 | #define NEW_AUX_ENT(nr, id, val) \ |
206 | __put_user ((id), sp+(nr*2)); \ | 206 | __put_user((id), sp+(nr*2)); \ |
207 | __put_user ((val), sp+(nr*2+1)); \ | 207 | __put_user((val), sp+(nr*2+1)); \ |
208 | 208 | ||
209 | sp -= 2; | 209 | sp -= 2; |
210 | NEW_AUX_ENT(0, AT_NULL, 0); | 210 | NEW_AUX_ENT(0, AT_NULL, 0); |
@@ -212,17 +212,17 @@ static unsigned long * create_irix_tables(char * p, int argc, int envc, | |||
212 | if (exec) { | 212 | if (exec) { |
213 | sp -= 11*2; | 213 | sp -= 11*2; |
214 | 214 | ||
215 | NEW_AUX_ENT (0, AT_PHDR, load_addr + exec->e_phoff); | 215 | NEW_AUX_ENT(0, AT_PHDR, load_addr + exec->e_phoff); |
216 | NEW_AUX_ENT (1, AT_PHENT, sizeof (struct elf_phdr)); | 216 | NEW_AUX_ENT(1, AT_PHENT, sizeof(struct elf_phdr)); |
217 | NEW_AUX_ENT (2, AT_PHNUM, exec->e_phnum); | 217 | NEW_AUX_ENT(2, AT_PHNUM, exec->e_phnum); |
218 | NEW_AUX_ENT (3, AT_PAGESZ, ELF_EXEC_PAGESIZE); | 218 | NEW_AUX_ENT(3, AT_PAGESZ, ELF_EXEC_PAGESIZE); |
219 | NEW_AUX_ENT (4, AT_BASE, interp_load_addr); | 219 | NEW_AUX_ENT(4, AT_BASE, interp_load_addr); |
220 | NEW_AUX_ENT (5, AT_FLAGS, 0); | 220 | NEW_AUX_ENT(5, AT_FLAGS, 0); |
221 | NEW_AUX_ENT (6, AT_ENTRY, (elf_addr_t) exec->e_entry); | 221 | NEW_AUX_ENT(6, AT_ENTRY, (elf_addr_t) exec->e_entry); |
222 | NEW_AUX_ENT (7, AT_UID, (elf_addr_t) current->uid); | 222 | NEW_AUX_ENT(7, AT_UID, (elf_addr_t) current->uid); |
223 | NEW_AUX_ENT (8, AT_EUID, (elf_addr_t) current->euid); | 223 | NEW_AUX_ENT(8, AT_EUID, (elf_addr_t) current->euid); |
224 | NEW_AUX_ENT (9, AT_GID, (elf_addr_t) current->gid); | 224 | NEW_AUX_ENT(9, AT_GID, (elf_addr_t) current->gid); |
225 | NEW_AUX_ENT (10, AT_EGID, (elf_addr_t) current->egid); | 225 | NEW_AUX_ENT(10, AT_EGID, (elf_addr_t) current->egid); |
226 | } | 226 | } |
227 | #undef NEW_AUX_ENT | 227 | #undef NEW_AUX_ENT |
228 | 228 | ||
@@ -581,7 +581,7 @@ static void irix_map_prda_page(void) | |||
581 | struct prda *pp; | 581 | struct prda *pp; |
582 | 582 | ||
583 | down_write(¤t->mm->mmap_sem); | 583 | down_write(¤t->mm->mmap_sem); |
584 | v = do_brk (PRDA_ADDRESS, PAGE_SIZE); | 584 | v = do_brk(PRDA_ADDRESS, PAGE_SIZE); |
585 | up_write(¤t->mm->mmap_sem); | 585 | up_write(¤t->mm->mmap_sem); |
586 | 586 | ||
587 | if (v < 0) | 587 | if (v < 0) |
@@ -815,7 +815,7 @@ out_free_interp: | |||
815 | kfree(elf_interpreter); | 815 | kfree(elf_interpreter); |
816 | out_free_file: | 816 | out_free_file: |
817 | out_free_ph: | 817 | out_free_ph: |
818 | kfree (elf_phdata); | 818 | kfree(elf_phdata); |
819 | goto out; | 819 | goto out; |
820 | } | 820 | } |
821 | 821 | ||
@@ -1232,7 +1232,7 @@ static int irix_core_dump(long signr, struct pt_regs * regs, struct file *file) | |||
1232 | strlcpy(psinfo.pr_fname, current->comm, sizeof(psinfo.pr_fname)); | 1232 | strlcpy(psinfo.pr_fname, current->comm, sizeof(psinfo.pr_fname)); |
1233 | 1233 | ||
1234 | /* Try to dump the FPU. */ | 1234 | /* Try to dump the FPU. */ |
1235 | prstatus.pr_fpvalid = dump_fpu (regs, &fpu); | 1235 | prstatus.pr_fpvalid = dump_fpu(regs, &fpu); |
1236 | if (!prstatus.pr_fpvalid) { | 1236 | if (!prstatus.pr_fpvalid) { |
1237 | numnote--; | 1237 | numnote--; |
1238 | } else { | 1238 | } else { |
diff --git a/arch/mips/kernel/irixinv.c b/arch/mips/kernel/irixinv.c index de8584f6231..cf2dcd3d6a9 100644 --- a/arch/mips/kernel/irixinv.c +++ b/arch/mips/kernel/irixinv.c | |||
@@ -14,7 +14,7 @@ int inventory_items = 0; | |||
14 | 14 | ||
15 | static inventory_t inventory [MAX_INVENTORY]; | 15 | static inventory_t inventory [MAX_INVENTORY]; |
16 | 16 | ||
17 | void add_to_inventory (int class, int type, int controller, int unit, int state) | 17 | void add_to_inventory(int class, int type, int controller, int unit, int state) |
18 | { | 18 | { |
19 | inventory_t *ni = &inventory [inventory_items]; | 19 | inventory_t *ni = &inventory [inventory_items]; |
20 | 20 | ||
@@ -30,7 +30,7 @@ void add_to_inventory (int class, int type, int controller, int unit, int state) | |||
30 | inventory_items++; | 30 | inventory_items++; |
31 | } | 31 | } |
32 | 32 | ||
33 | int dump_inventory_to_user (void __user *userbuf, int size) | 33 | int dump_inventory_to_user(void __user *userbuf, int size) |
34 | { | 34 | { |
35 | inventory_t *inv = &inventory [0]; | 35 | inventory_t *inv = &inventory [0]; |
36 | inventory_t __user *user = userbuf; | 36 | inventory_t __user *user = userbuf; |
@@ -45,7 +45,7 @@ int dump_inventory_to_user (void __user *userbuf, int size) | |||
45 | return -EFAULT; | 45 | return -EFAULT; |
46 | user++; | 46 | user++; |
47 | } | 47 | } |
48 | return inventory_items * sizeof (inventory_t); | 48 | return inventory_items * sizeof(inventory_t); |
49 | } | 49 | } |
50 | 50 | ||
51 | int __init init_inventory(void) | 51 | int __init init_inventory(void) |
@@ -55,24 +55,24 @@ int __init init_inventory(void) | |||
55 | * most likely this will not let just anyone run the X server | 55 | * most likely this will not let just anyone run the X server |
56 | * until we put the right values all over the place | 56 | * until we put the right values all over the place |
57 | */ | 57 | */ |
58 | add_to_inventory (10, 3, 0, 0, 16400); | 58 | add_to_inventory(10, 3, 0, 0, 16400); |
59 | add_to_inventory (1, 1, 150, -1, 12); | 59 | add_to_inventory(1, 1, 150, -1, 12); |
60 | add_to_inventory (1, 3, 0, 0, 8976); | 60 | add_to_inventory(1, 3, 0, 0, 8976); |
61 | add_to_inventory (1, 2, 0, 0, 8976); | 61 | add_to_inventory(1, 2, 0, 0, 8976); |
62 | add_to_inventory (4, 8, 0, 0, 2); | 62 | add_to_inventory(4, 8, 0, 0, 2); |
63 | add_to_inventory (5, 5, 0, 0, 1); | 63 | add_to_inventory(5, 5, 0, 0, 1); |
64 | add_to_inventory (3, 3, 0, 0, 32768); | 64 | add_to_inventory(3, 3, 0, 0, 32768); |
65 | add_to_inventory (3, 4, 0, 0, 32768); | 65 | add_to_inventory(3, 4, 0, 0, 32768); |
66 | add_to_inventory (3, 8, 0, 0, 524288); | 66 | add_to_inventory(3, 8, 0, 0, 524288); |
67 | add_to_inventory (3, 9, 0, 0, 64); | 67 | add_to_inventory(3, 9, 0, 0, 64); |
68 | add_to_inventory (3, 1, 0, 0, 67108864); | 68 | add_to_inventory(3, 1, 0, 0, 67108864); |
69 | add_to_inventory (12, 3, 0, 0, 16); | 69 | add_to_inventory(12, 3, 0, 0, 16); |
70 | add_to_inventory (8, 7, 17, 0, 16777472); | 70 | add_to_inventory(8, 7, 17, 0, 16777472); |
71 | add_to_inventory (8, 0, 0, 0, 1); | 71 | add_to_inventory(8, 0, 0, 0, 1); |
72 | add_to_inventory (2, 1, 0, 13, 2); | 72 | add_to_inventory(2, 1, 0, 13, 2); |
73 | add_to_inventory (2, 2, 0, 2, 0); | 73 | add_to_inventory(2, 2, 0, 2, 0); |
74 | add_to_inventory (2, 2, 0, 1, 0); | 74 | add_to_inventory(2, 2, 0, 1, 0); |
75 | add_to_inventory (7, 14, 0, 0, 6); | 75 | add_to_inventory(7, 14, 0, 0, 6); |
76 | 76 | ||
77 | return 0; | 77 | return 0; |
78 | } | 78 | } |
diff --git a/arch/mips/kernel/irixioctl.c b/arch/mips/kernel/irixioctl.c index 30f9eb09db3..2bde200d5ad 100644 --- a/arch/mips/kernel/irixioctl.c +++ b/arch/mips/kernel/irixioctl.c | |||
@@ -238,7 +238,7 @@ asmlinkage int irix_ioctl(int fd, unsigned long cmd, unsigned long arg) | |||
238 | current->comm, current->pid, cmd); | 238 | current->comm, current->pid, cmd); |
239 | do_exit(255); | 239 | do_exit(255); |
240 | #else | 240 | #else |
241 | error = sys_ioctl (fd, cmd, arg); | 241 | error = sys_ioctl(fd, cmd, arg); |
242 | #endif | 242 | #endif |
243 | } | 243 | } |
244 | 244 | ||
diff --git a/arch/mips/kernel/irq-msc01.c b/arch/mips/kernel/irq-msc01.c index 1ecdd50bfc6..4edc7e451d9 100644 --- a/arch/mips/kernel/irq-msc01.c +++ b/arch/mips/kernel/irq-msc01.c | |||
@@ -99,7 +99,7 @@ void ll_msc_irq(void) | |||
99 | } | 99 | } |
100 | 100 | ||
101 | void | 101 | void |
102 | msc_bind_eic_interrupt (unsigned int irq, unsigned int set) | 102 | msc_bind_eic_interrupt(unsigned int irq, unsigned int set) |
103 | { | 103 | { |
104 | MSCIC_WRITE(MSC01_IC_RAMW, | 104 | MSCIC_WRITE(MSC01_IC_RAMW, |
105 | (irq<<MSC01_IC_RAMW_ADDR_SHF) | (set<<MSC01_IC_RAMW_DATA_SHF)); | 105 | (irq<<MSC01_IC_RAMW_ADDR_SHF) | (set<<MSC01_IC_RAMW_DATA_SHF)); |
@@ -130,7 +130,7 @@ void __init init_msc_irqs(unsigned long icubase, unsigned int irqbase, msc_irqma | |||
130 | { | 130 | { |
131 | extern void (*board_bind_eic_interrupt)(unsigned int irq, unsigned int regset); | 131 | extern void (*board_bind_eic_interrupt)(unsigned int irq, unsigned int regset); |
132 | 132 | ||
133 | _icctrl_msc = (unsigned long) ioremap (icubase, 0x40000); | 133 | _icctrl_msc = (unsigned long) ioremap(icubase, 0x40000); |
134 | 134 | ||
135 | /* Reset interrupt controller - initialises all registers to 0 */ | 135 | /* Reset interrupt controller - initialises all registers to 0 */ |
136 | MSCIC_WRITE(MSC01_IC_RST, MSC01_IC_RST_RST_BIT); | 136 | MSCIC_WRITE(MSC01_IC_RST, MSC01_IC_RST_RST_BIT); |
diff --git a/arch/mips/kernel/kspd.c b/arch/mips/kernel/kspd.c index cb9a14a1ca5..1ed17660654 100644 --- a/arch/mips/kernel/kspd.c +++ b/arch/mips/kernel/kspd.c | |||
@@ -118,11 +118,11 @@ struct apsp_table syscall_command_table[] = { | |||
118 | 118 | ||
119 | static int sp_syscall(int num, int arg0, int arg1, int arg2, int arg3) | 119 | static int sp_syscall(int num, int arg0, int arg1, int arg2, int arg3) |
120 | { | 120 | { |
121 | register long int _num __asm__ ("$2") = num; | 121 | register long int _num __asm__("$2") = num; |
122 | register long int _arg0 __asm__ ("$4") = arg0; | 122 | register long int _arg0 __asm__("$4") = arg0; |
123 | register long int _arg1 __asm__ ("$5") = arg1; | 123 | register long int _arg1 __asm__("$5") = arg1; |
124 | register long int _arg2 __asm__ ("$6") = arg2; | 124 | register long int _arg2 __asm__("$6") = arg2; |
125 | register long int _arg3 __asm__ ("$7") = arg3; | 125 | register long int _arg3 __asm__("$7") = arg3; |
126 | 126 | ||
127 | mm_segment_t old_fs; | 127 | mm_segment_t old_fs; |
128 | 128 | ||
diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c index 135d9a5fe33..a6de17081ca 100644 --- a/arch/mips/kernel/linux32.c +++ b/arch/mips/kernel/linux32.c | |||
@@ -300,13 +300,13 @@ asmlinkage int sys32_sched_rr_get_interval(compat_pid_t pid, | |||
300 | { | 300 | { |
301 | struct timespec t; | 301 | struct timespec t; |
302 | int ret; | 302 | int ret; |
303 | mm_segment_t old_fs = get_fs (); | 303 | mm_segment_t old_fs = get_fs(); |
304 | 304 | ||
305 | set_fs (KERNEL_DS); | 305 | set_fs(KERNEL_DS); |
306 | ret = sys_sched_rr_get_interval(pid, (struct timespec __user *)&t); | 306 | ret = sys_sched_rr_get_interval(pid, (struct timespec __user *)&t); |
307 | set_fs (old_fs); | 307 | set_fs(old_fs); |
308 | if (put_user (t.tv_sec, &interval->tv_sec) || | 308 | if (put_user (t.tv_sec, &interval->tv_sec) || |
309 | __put_user (t.tv_nsec, &interval->tv_nsec)) | 309 | __put_user(t.tv_nsec, &interval->tv_nsec)) |
310 | return -EFAULT; | 310 | return -EFAULT; |
311 | return ret; | 311 | return ret; |
312 | } | 312 | } |
@@ -314,7 +314,7 @@ asmlinkage int sys32_sched_rr_get_interval(compat_pid_t pid, | |||
314 | #ifdef CONFIG_SYSVIPC | 314 | #ifdef CONFIG_SYSVIPC |
315 | 315 | ||
316 | asmlinkage long | 316 | asmlinkage long |
317 | sys32_ipc (u32 call, int first, int second, int third, u32 ptr, u32 fifth) | 317 | sys32_ipc(u32 call, int first, int second, int third, u32 ptr, u32 fifth) |
318 | { | 318 | { |
319 | int version, err; | 319 | int version, err; |
320 | 320 | ||
@@ -373,7 +373,7 @@ sys32_ipc (u32 call, int first, int second, int third, u32 ptr, u32 fifth) | |||
373 | #else | 373 | #else |
374 | 374 | ||
375 | asmlinkage long | 375 | asmlinkage long |
376 | sys32_ipc (u32 call, int first, int second, int third, u32 ptr, u32 fifth) | 376 | sys32_ipc(u32 call, int first, int second, int third, u32 ptr, u32 fifth) |
377 | { | 377 | { |
378 | return -ENOSYS; | 378 | return -ENOSYS; |
379 | } | 379 | } |
@@ -505,7 +505,7 @@ asmlinkage int sys32_ustat(dev_t dev, struct ustat32 __user * ubuf32) | |||
505 | 505 | ||
506 | set_fs(KERNEL_DS); | 506 | set_fs(KERNEL_DS); |
507 | err = sys_ustat(dev, (struct ustat __user *)&tmp); | 507 | err = sys_ustat(dev, (struct ustat __user *)&tmp); |
508 | set_fs (old_fs); | 508 | set_fs(old_fs); |
509 | 509 | ||
510 | if (err) | 510 | if (err) |
511 | goto out; | 511 | goto out; |
diff --git a/arch/mips/kernel/mips-mt.c b/arch/mips/kernel/mips-mt.c index 56750b02ab4..3d6b1ec1f32 100644 --- a/arch/mips/kernel/mips-mt.c +++ b/arch/mips/kernel/mips-mt.c | |||
@@ -236,7 +236,7 @@ void mips_mt_set_cpuoptions(void) | |||
236 | if (oconfig7 != nconfig7) { | 236 | if (oconfig7 != nconfig7) { |
237 | __asm__ __volatile("sync"); | 237 | __asm__ __volatile("sync"); |
238 | write_c0_config7(nconfig7); | 238 | write_c0_config7(nconfig7); |
239 | ehb (); | 239 | ehb(); |
240 | printk("Config7: 0x%08x\n", read_c0_config7()); | 240 | printk("Config7: 0x%08x\n", read_c0_config7()); |
241 | } | 241 | } |
242 | 242 | ||
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index f99bb408543..11cb264f59c 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c | |||
@@ -202,13 +202,13 @@ void elf_dump_regs(elf_greg_t *gp, struct pt_regs *regs) | |||
202 | #endif | 202 | #endif |
203 | } | 203 | } |
204 | 204 | ||
205 | int dump_task_regs (struct task_struct *tsk, elf_gregset_t *regs) | 205 | int dump_task_regs(struct task_struct *tsk, elf_gregset_t *regs) |
206 | { | 206 | { |
207 | elf_dump_regs(*regs, task_pt_regs(tsk)); | 207 | elf_dump_regs(*regs, task_pt_regs(tsk)); |
208 | return 1; | 208 | return 1; |
209 | } | 209 | } |
210 | 210 | ||
211 | int dump_task_fpu (struct task_struct *t, elf_fpregset_t *fpr) | 211 | int dump_task_fpu(struct task_struct *t, elf_fpregset_t *fpr) |
212 | { | 212 | { |
213 | memcpy(fpr, &t->thread.fpu, sizeof(current->thread.fpu)); | 213 | memcpy(fpr, &t->thread.fpu, sizeof(current->thread.fpu)); |
214 | 214 | ||
diff --git a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c index bbd57b20b43..58aa6fec114 100644 --- a/arch/mips/kernel/ptrace.c +++ b/arch/mips/kernel/ptrace.c | |||
@@ -54,7 +54,7 @@ void ptrace_disable(struct task_struct *child) | |||
54 | * for 32-bit kernels and for 32-bit processes on a 64-bit kernel. | 54 | * for 32-bit kernels and for 32-bit processes on a 64-bit kernel. |
55 | * Registers are sign extended to fill the available space. | 55 | * Registers are sign extended to fill the available space. |
56 | */ | 56 | */ |
57 | int ptrace_getregs (struct task_struct *child, __s64 __user *data) | 57 | int ptrace_getregs(struct task_struct *child, __s64 __user *data) |
58 | { | 58 | { |
59 | struct pt_regs *regs; | 59 | struct pt_regs *regs; |
60 | int i; | 60 | int i; |
@@ -65,13 +65,13 @@ int ptrace_getregs (struct task_struct *child, __s64 __user *data) | |||
65 | regs = task_pt_regs(child); | 65 | regs = task_pt_regs(child); |
66 | 66 | ||
67 | for (i = 0; i < 32; i++) | 67 | for (i = 0; i < 32; i++) |
68 | __put_user (regs->regs[i], data + i); | 68 | __put_user(regs->regs[i], data + i); |
69 | __put_user (regs->lo, data + EF_LO - EF_R0); | 69 | __put_user(regs->lo, data + EF_LO - EF_R0); |
70 | __put_user (regs->hi, data + EF_HI - EF_R0); | 70 | __put_user(regs->hi, data + EF_HI - EF_R0); |
71 | __put_user (regs->cp0_epc, data + EF_CP0_EPC - EF_R0); | 71 | __put_user(regs->cp0_epc, data + EF_CP0_EPC - EF_R0); |
72 | __put_user (regs->cp0_badvaddr, data + EF_CP0_BADVADDR - EF_R0); | 72 | __put_user(regs->cp0_badvaddr, data + EF_CP0_BADVADDR - EF_R0); |
73 | __put_user (regs->cp0_status, data + EF_CP0_STATUS - EF_R0); | 73 | __put_user(regs->cp0_status, data + EF_CP0_STATUS - EF_R0); |
74 | __put_user (regs->cp0_cause, data + EF_CP0_CAUSE - EF_R0); | 74 | __put_user(regs->cp0_cause, data + EF_CP0_CAUSE - EF_R0); |
75 | 75 | ||
76 | return 0; | 76 | return 0; |
77 | } | 77 | } |
@@ -81,7 +81,7 @@ int ptrace_getregs (struct task_struct *child, __s64 __user *data) | |||
81 | * the 64-bit format. On a 32-bit kernel only the lower order half | 81 | * the 64-bit format. On a 32-bit kernel only the lower order half |
82 | * (according to endianness) will be used. | 82 | * (according to endianness) will be used. |
83 | */ | 83 | */ |
84 | int ptrace_setregs (struct task_struct *child, __s64 __user *data) | 84 | int ptrace_setregs(struct task_struct *child, __s64 __user *data) |
85 | { | 85 | { |
86 | struct pt_regs *regs; | 86 | struct pt_regs *regs; |
87 | int i; | 87 | int i; |
@@ -92,17 +92,17 @@ int ptrace_setregs (struct task_struct *child, __s64 __user *data) | |||
92 | regs = task_pt_regs(child); | 92 | regs = task_pt_regs(child); |
93 | 93 | ||
94 | for (i = 0; i < 32; i++) | 94 | for (i = 0; i < 32; i++) |
95 | __get_user (regs->regs[i], data + i); | 95 | __get_user(regs->regs[i], data + i); |
96 | __get_user (regs->lo, data + EF_LO - EF_R0); | 96 | __get_user(regs->lo, data + EF_LO - EF_R0); |
97 | __get_user (regs->hi, data + EF_HI - EF_R0); | 97 | __get_user(regs->hi, data + EF_HI - EF_R0); |
98 | __get_user (regs->cp0_epc, data + EF_CP0_EPC - EF_R0); | 98 | __get_user(regs->cp0_epc, data + EF_CP0_EPC - EF_R0); |
99 | 99 | ||
100 | /* badvaddr, status, and cause may not be written. */ | 100 | /* badvaddr, status, and cause may not be written. */ |
101 | 101 | ||
102 | return 0; | 102 | return 0; |
103 | } | 103 | } |
104 | 104 | ||
105 | int ptrace_getfpregs (struct task_struct *child, __u32 __user *data) | 105 | int ptrace_getfpregs(struct task_struct *child, __u32 __user *data) |
106 | { | 106 | { |
107 | int i; | 107 | int i; |
108 | unsigned int tmp; | 108 | unsigned int tmp; |
@@ -113,13 +113,13 @@ int ptrace_getfpregs (struct task_struct *child, __u32 __user *data) | |||
113 | if (tsk_used_math(child)) { | 113 | if (tsk_used_math(child)) { |
114 | fpureg_t *fregs = get_fpu_regs(child); | 114 | fpureg_t *fregs = get_fpu_regs(child); |
115 | for (i = 0; i < 32; i++) | 115 | for (i = 0; i < 32; i++) |
116 | __put_user (fregs[i], i + (__u64 __user *) data); | 116 | __put_user(fregs[i], i + (__u64 __user *) data); |
117 | } else { | 117 | } else { |
118 | for (i = 0; i < 32; i++) | 118 | for (i = 0; i < 32; i++) |
119 | __put_user ((__u64) -1, i + (__u64 __user *) data); | 119 | __put_user((__u64) -1, i + (__u64 __user *) data); |
120 | } | 120 | } |
121 | 121 | ||
122 | __put_user (child->thread.fpu.fcr31, data + 64); | 122 | __put_user(child->thread.fpu.fcr31, data + 64); |
123 | 123 | ||
124 | preempt_disable(); | 124 | preempt_disable(); |
125 | if (cpu_has_fpu) { | 125 | if (cpu_has_fpu) { |
@@ -142,12 +142,12 @@ int ptrace_getfpregs (struct task_struct *child, __u32 __user *data) | |||
142 | tmp = 0; | 142 | tmp = 0; |
143 | } | 143 | } |
144 | preempt_enable(); | 144 | preempt_enable(); |
145 | __put_user (tmp, data + 65); | 145 | __put_user(tmp, data + 65); |
146 | 146 | ||
147 | return 0; | 147 | return 0; |
148 | } | 148 | } |
149 | 149 | ||
150 | int ptrace_setfpregs (struct task_struct *child, __u32 __user *data) | 150 | int ptrace_setfpregs(struct task_struct *child, __u32 __user *data) |
151 | { | 151 | { |
152 | fpureg_t *fregs; | 152 | fpureg_t *fregs; |
153 | int i; | 153 | int i; |
@@ -158,9 +158,9 @@ int ptrace_setfpregs (struct task_struct *child, __u32 __user *data) | |||
158 | fregs = get_fpu_regs(child); | 158 | fregs = get_fpu_regs(child); |
159 | 159 | ||
160 | for (i = 0; i < 32; i++) | 160 | for (i = 0; i < 32; i++) |
161 | __get_user (fregs[i], i + (__u64 __user *) data); | 161 | __get_user(fregs[i], i + (__u64 __user *) data); |
162 | 162 | ||
163 | __get_user (child->thread.fpu.fcr31, data + 64); | 163 | __get_user(child->thread.fpu.fcr31, data + 64); |
164 | 164 | ||
165 | /* FIR may not be written. */ | 165 | /* FIR may not be written. */ |
166 | 166 | ||
@@ -390,19 +390,19 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
390 | } | 390 | } |
391 | 391 | ||
392 | case PTRACE_GETREGS: | 392 | case PTRACE_GETREGS: |
393 | ret = ptrace_getregs (child, (__u64 __user *) data); | 393 | ret = ptrace_getregs(child, (__u64 __user *) data); |
394 | break; | 394 | break; |
395 | 395 | ||
396 | case PTRACE_SETREGS: | 396 | case PTRACE_SETREGS: |
397 | ret = ptrace_setregs (child, (__u64 __user *) data); | 397 | ret = ptrace_setregs(child, (__u64 __user *) data); |
398 | break; | 398 | break; |
399 | 399 | ||
400 | case PTRACE_GETFPREGS: | 400 | case PTRACE_GETFPREGS: |
401 | ret = ptrace_getfpregs (child, (__u32 __user *) data); | 401 | ret = ptrace_getfpregs(child, (__u32 __user *) data); |
402 | break; | 402 | break; |
403 | 403 | ||
404 | case PTRACE_SETFPREGS: | 404 | case PTRACE_SETFPREGS: |
405 | ret = ptrace_setfpregs (child, (__u32 __user *) data); | 405 | ret = ptrace_setfpregs(child, (__u32 __user *) data); |
406 | break; | 406 | break; |
407 | 407 | ||
408 | case PTRACE_SYSCALL: /* continue and stop at next (return from) syscall */ | 408 | case PTRACE_SYSCALL: /* continue and stop at next (return from) syscall */ |
diff --git a/arch/mips/kernel/ptrace32.c b/arch/mips/kernel/ptrace32.c index d9a39c16945..f2bffed94fa 100644 --- a/arch/mips/kernel/ptrace32.c +++ b/arch/mips/kernel/ptrace32.c | |||
@@ -36,11 +36,11 @@ | |||
36 | #include <asm/uaccess.h> | 36 | #include <asm/uaccess.h> |
37 | #include <asm/bootinfo.h> | 37 | #include <asm/bootinfo.h> |
38 | 38 | ||
39 | int ptrace_getregs (struct task_struct *child, __s64 __user *data); | 39 | int ptrace_getregs(struct task_struct *child, __s64 __user *data); |
40 | int ptrace_setregs (struct task_struct *child, __s64 __user *data); | 40 | int ptrace_setregs(struct task_struct *child, __s64 __user *data); |
41 | 41 | ||
42 | int ptrace_getfpregs (struct task_struct *child, __u32 __user *data); | 42 | int ptrace_getfpregs(struct task_struct *child, __u32 __user *data); |
43 | int ptrace_setfpregs (struct task_struct *child, __u32 __user *data); | 43 | int ptrace_setfpregs(struct task_struct *child, __u32 __user *data); |
44 | 44 | ||
45 | /* | 45 | /* |
46 | * Tracing a 32-bit process with a 64-bit strace and vice versa will not | 46 | * Tracing a 32-bit process with a 64-bit strace and vice versa will not |
@@ -346,19 +346,19 @@ asmlinkage int sys32_ptrace(int request, int pid, int addr, int data) | |||
346 | } | 346 | } |
347 | 347 | ||
348 | case PTRACE_GETREGS: | 348 | case PTRACE_GETREGS: |
349 | ret = ptrace_getregs (child, (__u64 __user *) (__u64) data); | 349 | ret = ptrace_getregs(child, (__u64 __user *) (__u64) data); |
350 | break; | 350 | break; |
351 | 351 | ||
352 | case PTRACE_SETREGS: | 352 | case PTRACE_SETREGS: |
353 | ret = ptrace_setregs (child, (__u64 __user *) (__u64) data); | 353 | ret = ptrace_setregs(child, (__u64 __user *) (__u64) data); |
354 | break; | 354 | break; |
355 | 355 | ||
356 | case PTRACE_GETFPREGS: | 356 | case PTRACE_GETFPREGS: |
357 | ret = ptrace_getfpregs (child, (__u32 __user *) (__u64) data); | 357 | ret = ptrace_getfpregs(child, (__u32 __user *) (__u64) data); |
358 | break; | 358 | break; |
359 | 359 | ||
360 | case PTRACE_SETFPREGS: | 360 | case PTRACE_SETFPREGS: |
361 | ret = ptrace_setfpregs (child, (__u32 __user *) (__u64) data); | 361 | ret = ptrace_setfpregs(child, (__u32 __user *) (__u64) data); |
362 | break; | 362 | break; |
363 | 363 | ||
364 | case PTRACE_SYSCALL: /* continue and stop at next (return from) syscall */ | 364 | case PTRACE_SYSCALL: /* continue and stop at next (return from) syscall */ |
diff --git a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c index 64b612a0a62..572c610db1b 100644 --- a/arch/mips/kernel/signal32.c +++ b/arch/mips/kernel/signal32.c | |||
@@ -261,11 +261,11 @@ static inline int put_sigset(const sigset_t *kbuf, compat_sigset_t __user *ubuf) | |||
261 | default: | 261 | default: |
262 | __put_sigset_unknown_nsig(); | 262 | __put_sigset_unknown_nsig(); |
263 | case 2: | 263 | case 2: |
264 | err |= __put_user (kbuf->sig[1] >> 32, &ubuf->sig[3]); | 264 | err |= __put_user(kbuf->sig[1] >> 32, &ubuf->sig[3]); |
265 | err |= __put_user (kbuf->sig[1] & 0xffffffff, &ubuf->sig[2]); | 265 | err |= __put_user(kbuf->sig[1] & 0xffffffff, &ubuf->sig[2]); |
266 | case 1: | 266 | case 1: |
267 | err |= __put_user (kbuf->sig[0] >> 32, &ubuf->sig[1]); | 267 | err |= __put_user(kbuf->sig[0] >> 32, &ubuf->sig[1]); |
268 | err |= __put_user (kbuf->sig[0] & 0xffffffff, &ubuf->sig[0]); | 268 | err |= __put_user(kbuf->sig[0] & 0xffffffff, &ubuf->sig[0]); |
269 | } | 269 | } |
270 | 270 | ||
271 | return err; | 271 | return err; |
@@ -283,12 +283,12 @@ static inline int get_sigset(sigset_t *kbuf, const compat_sigset_t __user *ubuf) | |||
283 | default: | 283 | default: |
284 | __get_sigset_unknown_nsig(); | 284 | __get_sigset_unknown_nsig(); |
285 | case 2: | 285 | case 2: |
286 | err |= __get_user (sig[3], &ubuf->sig[3]); | 286 | err |= __get_user(sig[3], &ubuf->sig[3]); |
287 | err |= __get_user (sig[2], &ubuf->sig[2]); | 287 | err |= __get_user(sig[2], &ubuf->sig[2]); |
288 | kbuf->sig[1] = sig[2] | (sig[3] << 32); | 288 | kbuf->sig[1] = sig[2] | (sig[3] << 32); |
289 | case 1: | 289 | case 1: |
290 | err |= __get_user (sig[1], &ubuf->sig[1]); | 290 | err |= __get_user(sig[1], &ubuf->sig[1]); |
291 | err |= __get_user (sig[0], &ubuf->sig[0]); | 291 | err |= __get_user(sig[0], &ubuf->sig[0]); |
292 | kbuf->sig[0] = sig[0] | (sig[1] << 32); | 292 | kbuf->sig[0] = sig[0] | (sig[1] << 32); |
293 | } | 293 | } |
294 | 294 | ||
@@ -412,10 +412,10 @@ asmlinkage int sys32_sigaltstack(nabi_no_regargs struct pt_regs regs) | |||
412 | return -EFAULT; | 412 | return -EFAULT; |
413 | } | 413 | } |
414 | 414 | ||
415 | set_fs (KERNEL_DS); | 415 | set_fs(KERNEL_DS); |
416 | ret = do_sigaltstack(uss ? (stack_t __user *)&kss : NULL, | 416 | ret = do_sigaltstack(uss ? (stack_t __user *)&kss : NULL, |
417 | uoss ? (stack_t __user *)&koss : NULL, usp); | 417 | uoss ? (stack_t __user *)&koss : NULL, usp); |
418 | set_fs (old_fs); | 418 | set_fs(old_fs); |
419 | 419 | ||
420 | if (!ret && uoss) { | 420 | if (!ret && uoss) { |
421 | if (!access_ok(VERIFY_WRITE, uoss, sizeof(*uoss))) | 421 | if (!access_ok(VERIFY_WRITE, uoss, sizeof(*uoss))) |
@@ -559,9 +559,9 @@ asmlinkage void sys32_rt_sigreturn(nabi_no_regargs struct pt_regs regs) | |||
559 | /* It is more difficult to avoid calling this function than to | 559 | /* It is more difficult to avoid calling this function than to |
560 | call it and ignore errors. */ | 560 | call it and ignore errors. */ |
561 | old_fs = get_fs(); | 561 | old_fs = get_fs(); |
562 | set_fs (KERNEL_DS); | 562 | set_fs(KERNEL_DS); |
563 | do_sigaltstack((stack_t __user *)&st, NULL, regs.regs[29]); | 563 | do_sigaltstack((stack_t __user *)&st, NULL, regs.regs[29]); |
564 | set_fs (old_fs); | 564 | set_fs(old_fs); |
565 | 565 | ||
566 | /* | 566 | /* |
567 | * Don't let your children do this ... | 567 | * Don't let your children do this ... |
@@ -746,11 +746,11 @@ asmlinkage int sys32_rt_sigprocmask(int how, compat_sigset_t __user *set, | |||
746 | if (set && get_sigset(&new_set, set)) | 746 | if (set && get_sigset(&new_set, set)) |
747 | return -EFAULT; | 747 | return -EFAULT; |
748 | 748 | ||
749 | set_fs (KERNEL_DS); | 749 | set_fs(KERNEL_DS); |
750 | ret = sys_rt_sigprocmask(how, set ? (sigset_t __user *)&new_set : NULL, | 750 | ret = sys_rt_sigprocmask(how, set ? (sigset_t __user *)&new_set : NULL, |
751 | oset ? (sigset_t __user *)&old_set : NULL, | 751 | oset ? (sigset_t __user *)&old_set : NULL, |
752 | sigsetsize); | 752 | sigsetsize); |
753 | set_fs (old_fs); | 753 | set_fs(old_fs); |
754 | 754 | ||
755 | if (!ret && oset && put_sigset(&old_set, oset)) | 755 | if (!ret && oset && put_sigset(&old_set, oset)) |
756 | return -EFAULT; | 756 | return -EFAULT; |
@@ -765,9 +765,9 @@ asmlinkage int sys32_rt_sigpending(compat_sigset_t __user *uset, | |||
765 | sigset_t set; | 765 | sigset_t set; |
766 | mm_segment_t old_fs = get_fs(); | 766 | mm_segment_t old_fs = get_fs(); |
767 | 767 | ||
768 | set_fs (KERNEL_DS); | 768 | set_fs(KERNEL_DS); |
769 | ret = sys_rt_sigpending((sigset_t __user *)&set, sigsetsize); | 769 | ret = sys_rt_sigpending((sigset_t __user *)&set, sigsetsize); |
770 | set_fs (old_fs); | 770 | set_fs(old_fs); |
771 | 771 | ||
772 | if (!ret && put_sigset(&set, uset)) | 772 | if (!ret && put_sigset(&set, uset)) |
773 | return -EFAULT; | 773 | return -EFAULT; |
@@ -781,12 +781,12 @@ asmlinkage int sys32_rt_sigqueueinfo(int pid, int sig, compat_siginfo_t __user * | |||
781 | int ret; | 781 | int ret; |
782 | mm_segment_t old_fs = get_fs(); | 782 | mm_segment_t old_fs = get_fs(); |
783 | 783 | ||
784 | if (copy_from_user (&info, uinfo, 3*sizeof(int)) || | 784 | if (copy_from_user(&info, uinfo, 3*sizeof(int)) || |
785 | copy_from_user (info._sifields._pad, uinfo->_sifields._pad, SI_PAD_SIZE)) | 785 | copy_from_user(info._sifields._pad, uinfo->_sifields._pad, SI_PAD_SIZE)) |
786 | return -EFAULT; | 786 | return -EFAULT; |
787 | set_fs (KERNEL_DS); | 787 | set_fs(KERNEL_DS); |
788 | ret = sys_rt_sigqueueinfo(pid, sig, (siginfo_t __user *)&info); | 788 | ret = sys_rt_sigqueueinfo(pid, sig, (siginfo_t __user *)&info); |
789 | set_fs (old_fs); | 789 | set_fs(old_fs); |
790 | return ret; | 790 | return ret; |
791 | } | 791 | } |
792 | 792 | ||
@@ -801,10 +801,10 @@ sys32_waitid(int which, compat_pid_t pid, | |||
801 | mm_segment_t old_fs = get_fs(); | 801 | mm_segment_t old_fs = get_fs(); |
802 | 802 | ||
803 | info.si_signo = 0; | 803 | info.si_signo = 0; |
804 | set_fs (KERNEL_DS); | 804 | set_fs(KERNEL_DS); |
805 | ret = sys_waitid(which, pid, (siginfo_t __user *) &info, options, | 805 | ret = sys_waitid(which, pid, (siginfo_t __user *) &info, options, |
806 | uru ? (struct rusage __user *) &ru : NULL); | 806 | uru ? (struct rusage __user *) &ru : NULL); |
807 | set_fs (old_fs); | 807 | set_fs(old_fs); |
808 | 808 | ||
809 | if (ret < 0 || info.si_signo == 0) | 809 | if (ret < 0 || info.si_signo == 0) |
810 | return ret; | 810 | return ret; |
diff --git a/arch/mips/kernel/signal_n32.c b/arch/mips/kernel/signal_n32.c index eb7e05926eb..bb277e82d42 100644 --- a/arch/mips/kernel/signal_n32.c +++ b/arch/mips/kernel/signal_n32.c | |||
@@ -88,7 +88,7 @@ struct rt_sigframe_n32 { | |||
88 | 88 | ||
89 | #endif /* !ICACHE_REFILLS_WORKAROUND_WAR */ | 89 | #endif /* !ICACHE_REFILLS_WORKAROUND_WAR */ |
90 | 90 | ||
91 | extern void sigset_from_compat (sigset_t *set, compat_sigset_t *compat); | 91 | extern void sigset_from_compat(sigset_t *set, compat_sigset_t *compat); |
92 | 92 | ||
93 | asmlinkage int sysn32_rt_sigsuspend(nabi_no_regargs struct pt_regs regs) | 93 | asmlinkage int sysn32_rt_sigsuspend(nabi_no_regargs struct pt_regs regs) |
94 | { | 94 | { |
@@ -105,7 +105,7 @@ asmlinkage int sysn32_rt_sigsuspend(nabi_no_regargs struct pt_regs regs) | |||
105 | unewset = (compat_sigset_t __user *) regs.regs[4]; | 105 | unewset = (compat_sigset_t __user *) regs.regs[4]; |
106 | if (copy_from_user(&uset, unewset, sizeof(uset))) | 106 | if (copy_from_user(&uset, unewset, sizeof(uset))) |
107 | return -EFAULT; | 107 | return -EFAULT; |
108 | sigset_from_compat (&newset, &uset); | 108 | sigset_from_compat(&newset, &uset); |
109 | sigdelsetmask(&newset, ~_BLOCKABLE); | 109 | sigdelsetmask(&newset, ~_BLOCKABLE); |
110 | 110 | ||
111 | spin_lock_irq(¤t->sighand->siglock); | 111 | spin_lock_irq(¤t->sighand->siglock); |
diff --git a/arch/mips/kernel/smp-mt.c b/arch/mips/kernel/smp-mt.c index 05dcce41632..94e210cc6cb 100644 --- a/arch/mips/kernel/smp-mt.c +++ b/arch/mips/kernel/smp-mt.c | |||
@@ -353,7 +353,7 @@ void core_send_ipi(int cpu, unsigned int action) | |||
353 | unsigned long flags; | 353 | unsigned long flags; |
354 | int vpflags; | 354 | int vpflags; |
355 | 355 | ||
356 | local_irq_save (flags); | 356 | local_irq_save(flags); |
357 | 357 | ||
358 | vpflags = dvpe(); /* cant access the other CPU's registers whilst MVPE enabled */ | 358 | vpflags = dvpe(); /* cant access the other CPU's registers whilst MVPE enabled */ |
359 | 359 | ||
diff --git a/arch/mips/kernel/smtc.c b/arch/mips/kernel/smtc.c index 4d1ac9692dc..770182887c5 100644 --- a/arch/mips/kernel/smtc.c +++ b/arch/mips/kernel/smtc.c | |||
@@ -372,7 +372,7 @@ void mipsmt_prepare_cpus(void) | |||
372 | cpu++; | 372 | cpu++; |
373 | 373 | ||
374 | /* Report on boot-time options */ | 374 | /* Report on boot-time options */ |
375 | mips_mt_set_cpuoptions (); | 375 | mips_mt_set_cpuoptions(); |
376 | if (vpelimit > 0) | 376 | if (vpelimit > 0) |
377 | printk("Limit of %d VPEs set\n", vpelimit); | 377 | printk("Limit of %d VPEs set\n", vpelimit); |
378 | if (tclimit > 0) | 378 | if (tclimit > 0) |
@@ -572,7 +572,7 @@ void smtc_init_secondary(void) | |||
572 | if (((read_c0_tcbind() & TCBIND_CURTC) != 0) && | 572 | if (((read_c0_tcbind() & TCBIND_CURTC) != 0) && |
573 | ((read_c0_tcbind() & TCBIND_CURVPE) | 573 | ((read_c0_tcbind() & TCBIND_CURVPE) |
574 | != cpu_data[smp_processor_id() - 1].vpe_id)){ | 574 | != cpu_data[smp_processor_id() - 1].vpe_id)){ |
575 | write_c0_compare (read_c0_count() + mips_hpt_frequency/HZ); | 575 | write_c0_compare(read_c0_count() + mips_hpt_frequency/HZ); |
576 | } | 576 | } |
577 | 577 | ||
578 | local_irq_enable(); | 578 | local_irq_enable(); |
diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c index 7c800ec3ff5..ef2c6360d05 100644 --- a/arch/mips/kernel/syscall.c +++ b/arch/mips/kernel/syscall.c | |||
@@ -314,8 +314,8 @@ asmlinkage int _sys_sysmips(int cmd, long arg1, int arg2, int arg3) | |||
314 | * | 314 | * |
315 | * This is really horribly ugly. | 315 | * This is really horribly ugly. |
316 | */ | 316 | */ |
317 | asmlinkage int sys_ipc (unsigned int call, int first, int second, | 317 | asmlinkage int sys_ipc(unsigned int call, int first, int second, |
318 | unsigned long third, void __user *ptr, long fifth) | 318 | unsigned long third, void __user *ptr, long fifth) |
319 | { | 319 | { |
320 | int version, ret; | 320 | int version, ret; |
321 | 321 | ||
@@ -324,26 +324,26 @@ asmlinkage int sys_ipc (unsigned int call, int first, int second, | |||
324 | 324 | ||
325 | switch (call) { | 325 | switch (call) { |
326 | case SEMOP: | 326 | case SEMOP: |
327 | return sys_semtimedop (first, (struct sembuf __user *)ptr, | 327 | return sys_semtimedop(first, (struct sembuf __user *)ptr, |
328 | second, NULL); | 328 | second, NULL); |
329 | case SEMTIMEDOP: | 329 | case SEMTIMEDOP: |
330 | return sys_semtimedop (first, (struct sembuf __user *)ptr, | 330 | return sys_semtimedop(first, (struct sembuf __user *)ptr, |
331 | second, | 331 | second, |
332 | (const struct timespec __user *)fifth); | 332 | (const struct timespec __user *)fifth); |
333 | case SEMGET: | 333 | case SEMGET: |
334 | return sys_semget (first, second, third); | 334 | return sys_semget(first, second, third); |
335 | case SEMCTL: { | 335 | case SEMCTL: { |
336 | union semun fourth; | 336 | union semun fourth; |
337 | if (!ptr) | 337 | if (!ptr) |
338 | return -EINVAL; | 338 | return -EINVAL; |
339 | if (get_user(fourth.__pad, (void __user *__user *) ptr)) | 339 | if (get_user(fourth.__pad, (void __user *__user *) ptr)) |
340 | return -EFAULT; | 340 | return -EFAULT; |
341 | return sys_semctl (first, second, third, fourth); | 341 | return sys_semctl(first, second, third, fourth); |
342 | } | 342 | } |
343 | 343 | ||
344 | case MSGSND: | 344 | case MSGSND: |
345 | return sys_msgsnd (first, (struct msgbuf __user *) ptr, | 345 | return sys_msgsnd(first, (struct msgbuf __user *) ptr, |
346 | second, third); | 346 | second, third); |
347 | case MSGRCV: | 347 | case MSGRCV: |
348 | switch (version) { | 348 | switch (version) { |
349 | case 0: { | 349 | case 0: { |
@@ -353,45 +353,45 @@ asmlinkage int sys_ipc (unsigned int call, int first, int second, | |||
353 | 353 | ||
354 | if (copy_from_user(&tmp, | 354 | if (copy_from_user(&tmp, |
355 | (struct ipc_kludge __user *) ptr, | 355 | (struct ipc_kludge __user *) ptr, |
356 | sizeof (tmp))) | 356 | sizeof(tmp))) |
357 | return -EFAULT; | 357 | return -EFAULT; |
358 | return sys_msgrcv (first, tmp.msgp, second, | 358 | return sys_msgrcv(first, tmp.msgp, second, |
359 | tmp.msgtyp, third); | 359 | tmp.msgtyp, third); |
360 | } | 360 | } |
361 | default: | 361 | default: |
362 | return sys_msgrcv (first, | 362 | return sys_msgrcv(first, |
363 | (struct msgbuf __user *) ptr, | 363 | (struct msgbuf __user *) ptr, |
364 | second, fifth, third); | 364 | second, fifth, third); |
365 | } | 365 | } |
366 | case MSGGET: | 366 | case MSGGET: |
367 | return sys_msgget ((key_t) first, second); | 367 | return sys_msgget((key_t) first, second); |
368 | case MSGCTL: | 368 | case MSGCTL: |
369 | return sys_msgctl (first, second, | 369 | return sys_msgctl(first, second, |
370 | (struct msqid_ds __user *) ptr); | 370 | (struct msqid_ds __user *) ptr); |
371 | 371 | ||
372 | case SHMAT: | 372 | case SHMAT: |
373 | switch (version) { | 373 | switch (version) { |
374 | default: { | 374 | default: { |
375 | unsigned long raddr; | 375 | unsigned long raddr; |
376 | ret = do_shmat (first, (char __user *) ptr, second, | 376 | ret = do_shmat(first, (char __user *) ptr, second, |
377 | &raddr); | 377 | &raddr); |
378 | if (ret) | 378 | if (ret) |
379 | return ret; | 379 | return ret; |
380 | return put_user (raddr, (unsigned long __user *) third); | 380 | return put_user(raddr, (unsigned long __user *) third); |
381 | } | 381 | } |
382 | case 1: /* iBCS2 emulator entry point */ | 382 | case 1: /* iBCS2 emulator entry point */ |
383 | if (!segment_eq(get_fs(), get_ds())) | 383 | if (!segment_eq(get_fs(), get_ds())) |
384 | return -EINVAL; | 384 | return -EINVAL; |
385 | return do_shmat (first, (char __user *) ptr, second, | 385 | return do_shmat(first, (char __user *) ptr, second, |
386 | (unsigned long *) third); | 386 | (unsigned long *) third); |
387 | } | 387 | } |
388 | case SHMDT: | 388 | case SHMDT: |
389 | return sys_shmdt ((char __user *)ptr); | 389 | return sys_shmdt((char __user *)ptr); |
390 | case SHMGET: | 390 | case SHMGET: |
391 | return sys_shmget (first, second, third); | 391 | return sys_shmget(first, second, third); |
392 | case SHMCTL: | 392 | case SHMCTL: |
393 | return sys_shmctl (first, second, | 393 | return sys_shmctl(first, second, |
394 | (struct shmid_ds __user *) ptr); | 394 | (struct shmid_ds __user *) ptr); |
395 | default: | 395 | default: |
396 | return -ENOSYS; | 396 | return -ENOSYS; |
397 | } | 397 | } |
diff --git a/arch/mips/kernel/sysirix.c b/arch/mips/kernel/sysirix.c index 93a148486f8..b50239574c9 100644 --- a/arch/mips/kernel/sysirix.c +++ b/arch/mips/kernel/sysirix.c | |||
@@ -486,10 +486,10 @@ asmlinkage int irix_syssgi(struct pt_regs *regs) | |||
486 | 486 | ||
487 | switch (arg1) { | 487 | switch (arg1) { |
488 | case SGI_INV_SIZEOF: | 488 | case SGI_INV_SIZEOF: |
489 | retval = sizeof (inventory_t); | 489 | retval = sizeof(inventory_t); |
490 | break; | 490 | break; |
491 | case SGI_INV_READ: | 491 | case SGI_INV_READ: |
492 | retval = dump_inventory_to_user (buffer, count); | 492 | retval = dump_inventory_to_user(buffer, count); |
493 | break; | 493 | break; |
494 | default: | 494 | default: |
495 | retval = -EINVAL; | 495 | retval = -EINVAL; |
@@ -1042,9 +1042,9 @@ asmlinkage unsigned long irix_mmap32(unsigned long addr, size_t len, int prot, | |||
1042 | long max_size = offset + len; | 1042 | long max_size = offset + len; |
1043 | 1043 | ||
1044 | if (max_size > file->f_path.dentry->d_inode->i_size) { | 1044 | if (max_size > file->f_path.dentry->d_inode->i_size) { |
1045 | old_pos = sys_lseek (fd, max_size - 1, 0); | 1045 | old_pos = sys_lseek(fd, max_size - 1, 0); |
1046 | sys_write (fd, (void __user *) "", 1); | 1046 | sys_write(fd, (void __user *) "", 1); |
1047 | sys_lseek (fd, old_pos, 0); | 1047 | sys_lseek(fd, old_pos, 0); |
1048 | } | 1048 | } |
1049 | } | 1049 | } |
1050 | } | 1050 | } |
@@ -1176,7 +1176,7 @@ static int irix_xstat32_xlate(struct kstat *stat, void __user *ubuf) | |||
1176 | ub.st_ctime1 = stat->atime.tv_nsec; | 1176 | ub.st_ctime1 = stat->atime.tv_nsec; |
1177 | ub.st_blksize = stat->blksize; | 1177 | ub.st_blksize = stat->blksize; |
1178 | ub.st_blocks = stat->blocks; | 1178 | ub.st_blocks = stat->blocks; |
1179 | strcpy (ub.st_fstype, "efs"); | 1179 | strcpy(ub.st_fstype, "efs"); |
1180 | 1180 | ||
1181 | return copy_to_user(ubuf, &ub, sizeof(ub)) ? -EFAULT : 0; | 1181 | return copy_to_user(ubuf, &ub, sizeof(ub)) ? -EFAULT : 0; |
1182 | } | 1182 | } |
@@ -1208,7 +1208,7 @@ static int irix_xstat64_xlate(struct kstat *stat, void __user *ubuf) | |||
1208 | ks.st_nlink = (u32) stat->nlink; | 1208 | ks.st_nlink = (u32) stat->nlink; |
1209 | ks.st_uid = (s32) stat->uid; | 1209 | ks.st_uid = (s32) stat->uid; |
1210 | ks.st_gid = (s32) stat->gid; | 1210 | ks.st_gid = (s32) stat->gid; |
1211 | ks.st_rdev = sysv_encode_dev (stat->rdev); | 1211 | ks.st_rdev = sysv_encode_dev(stat->rdev); |
1212 | ks.st_pad2[0] = ks.st_pad2[1] = 0; | 1212 | ks.st_pad2[0] = ks.st_pad2[1] = 0; |
1213 | ks.st_size = (long long) stat->size; | 1213 | ks.st_size = (long long) stat->size; |
1214 | ks.st_pad3 = 0; | 1214 | ks.st_pad3 = 0; |
@@ -1527,9 +1527,9 @@ asmlinkage int irix_mmap64(struct pt_regs *regs) | |||
1527 | long max_size = off2 + len; | 1527 | long max_size = off2 + len; |
1528 | 1528 | ||
1529 | if (max_size > file->f_path.dentry->d_inode->i_size) { | 1529 | if (max_size > file->f_path.dentry->d_inode->i_size) { |
1530 | old_pos = sys_lseek (fd, max_size - 1, 0); | 1530 | old_pos = sys_lseek(fd, max_size - 1, 0); |
1531 | sys_write (fd, (void __user *) "", 1); | 1531 | sys_write(fd, (void __user *) "", 1); |
1532 | sys_lseek (fd, old_pos, 0); | 1532 | sys_lseek(fd, old_pos, 0); |
1533 | } | 1533 | } |
1534 | } | 1534 | } |
1535 | } | 1535 | } |
diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c index 369a5f9ad26..5892491b40e 100644 --- a/arch/mips/kernel/time.c +++ b/arch/mips/kernel/time.c | |||
@@ -149,7 +149,7 @@ EXPORT_SYMBOL_GPL(cp0_perfcount_irq); | |||
149 | * Possibly handle a performance counter interrupt. | 149 | * Possibly handle a performance counter interrupt. |
150 | * Return true if the timer interrupt should not be checked | 150 | * Return true if the timer interrupt should not be checked |
151 | */ | 151 | */ |
152 | static inline int handle_perf_irq (int r2) | 152 | static inline int handle_perf_irq(int r2) |
153 | { | 153 | { |
154 | /* | 154 | /* |
155 | * The performance counter overflow interrupt may be shared with the | 155 | * The performance counter overflow interrupt may be shared with the |
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index ac762d8d802..b3e408b54c2 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c | |||
@@ -627,7 +627,7 @@ asmlinkage void do_fpe(struct pt_regs *regs, unsigned long fcr31) | |||
627 | lose_fpu(1); | 627 | lose_fpu(1); |
628 | 628 | ||
629 | /* Run the emulator */ | 629 | /* Run the emulator */ |
630 | sig = fpu_emulator_cop1Handler (regs, ¤t->thread.fpu, 1); | 630 | sig = fpu_emulator_cop1Handler(regs, ¤t->thread.fpu, 1); |
631 | 631 | ||
632 | /* | 632 | /* |
633 | * We can't allow the emulated instruction to leave any of | 633 | * We can't allow the emulated instruction to leave any of |
@@ -1165,11 +1165,11 @@ static void *set_vi_srs_handler(int n, vi_handler_t addr, int srs) | |||
1165 | 1165 | ||
1166 | if (cpu_has_veic) { | 1166 | if (cpu_has_veic) { |
1167 | if (board_bind_eic_interrupt) | 1167 | if (board_bind_eic_interrupt) |
1168 | board_bind_eic_interrupt (n, srs); | 1168 | board_bind_eic_interrupt(n, srs); |
1169 | } else if (cpu_has_vint) { | 1169 | } else if (cpu_has_vint) { |
1170 | /* SRSMap is only defined if shadow sets are implemented */ | 1170 | /* SRSMap is only defined if shadow sets are implemented */ |
1171 | if (mips_srs_max() > 1) | 1171 | if (mips_srs_max() > 1) |
1172 | change_c0_srsmap (0xf << n*4, srs << n*4); | 1172 | change_c0_srsmap(0xf << n*4, srs << n*4); |
1173 | } | 1173 | } |
1174 | 1174 | ||
1175 | if (srs == 0) { | 1175 | if (srs == 0) { |
@@ -1198,10 +1198,10 @@ static void *set_vi_srs_handler(int n, vi_handler_t addr, int srs) | |||
1198 | * Sigh... panicing won't help as the console | 1198 | * Sigh... panicing won't help as the console |
1199 | * is probably not configured :( | 1199 | * is probably not configured :( |
1200 | */ | 1200 | */ |
1201 | panic ("VECTORSPACING too small"); | 1201 | panic("VECTORSPACING too small"); |
1202 | } | 1202 | } |
1203 | 1203 | ||
1204 | memcpy (b, &except_vec_vi, handler_len); | 1204 | memcpy(b, &except_vec_vi, handler_len); |
1205 | #ifdef CONFIG_MIPS_MT_SMTC | 1205 | #ifdef CONFIG_MIPS_MT_SMTC |
1206 | BUG_ON(n > 7); /* Vector index %d exceeds SMTC maximum. */ | 1206 | BUG_ON(n > 7); /* Vector index %d exceeds SMTC maximum. */ |
1207 | 1207 | ||
@@ -1370,9 +1370,9 @@ void __init per_cpu_trap_init(void) | |||
1370 | #endif /* CONFIG_MIPS_MT_SMTC */ | 1370 | #endif /* CONFIG_MIPS_MT_SMTC */ |
1371 | 1371 | ||
1372 | if (cpu_has_veic || cpu_has_vint) { | 1372 | if (cpu_has_veic || cpu_has_vint) { |
1373 | write_c0_ebase (ebase); | 1373 | write_c0_ebase(ebase); |
1374 | /* Setting vector spacing enables EI/VI mode */ | 1374 | /* Setting vector spacing enables EI/VI mode */ |
1375 | change_c0_intctl (0x3e0, VECTORSPACING); | 1375 | change_c0_intctl(0x3e0, VECTORSPACING); |
1376 | } | 1376 | } |
1377 | if (cpu_has_divec) { | 1377 | if (cpu_has_divec) { |
1378 | if (cpu_has_mipsmt) { | 1378 | if (cpu_has_mipsmt) { |
@@ -1390,8 +1390,8 @@ void __init per_cpu_trap_init(void) | |||
1390 | * o read IntCtl.IPPCI to determine the performance counter interrupt | 1390 | * o read IntCtl.IPPCI to determine the performance counter interrupt |
1391 | */ | 1391 | */ |
1392 | if (cpu_has_mips_r2) { | 1392 | if (cpu_has_mips_r2) { |
1393 | cp0_compare_irq = (read_c0_intctl () >> 29) & 7; | 1393 | cp0_compare_irq = (read_c0_intctl() >> 29) & 7; |
1394 | cp0_perfcount_irq = (read_c0_intctl () >> 26) & 7; | 1394 | cp0_perfcount_irq = (read_c0_intctl() >> 26) & 7; |
1395 | if (cp0_perfcount_irq == cp0_compare_irq) | 1395 | if (cp0_perfcount_irq == cp0_compare_irq) |
1396 | cp0_perfcount_irq = -1; | 1396 | cp0_perfcount_irq = -1; |
1397 | } else { | 1397 | } else { |
@@ -1429,7 +1429,7 @@ void __init per_cpu_trap_init(void) | |||
1429 | } | 1429 | } |
1430 | 1430 | ||
1431 | /* Install CPU exception handler */ | 1431 | /* Install CPU exception handler */ |
1432 | void __init set_handler (unsigned long offset, void *addr, unsigned long size) | 1432 | void __init set_handler(unsigned long offset, void *addr, unsigned long size) |
1433 | { | 1433 | { |
1434 | memcpy((void *)(ebase + offset), addr, size); | 1434 | memcpy((void *)(ebase + offset), addr, size); |
1435 | flush_icache_range(ebase + offset, ebase + offset + size); | 1435 | flush_icache_range(ebase + offset, ebase + offset + size); |
@@ -1439,7 +1439,7 @@ static char panic_null_cerr[] __initdata = | |||
1439 | "Trying to set NULL cache error exception handler"; | 1439 | "Trying to set NULL cache error exception handler"; |
1440 | 1440 | ||
1441 | /* Install uncached CPU exception handler */ | 1441 | /* Install uncached CPU exception handler */ |
1442 | void __init set_uncached_handler (unsigned long offset, void *addr, unsigned long size) | 1442 | void __init set_uncached_handler(unsigned long offset, void *addr, unsigned long size) |
1443 | { | 1443 | { |
1444 | #ifdef CONFIG_32BIT | 1444 | #ifdef CONFIG_32BIT |
1445 | unsigned long uncached_ebase = KSEG1ADDR(ebase); | 1445 | unsigned long uncached_ebase = KSEG1ADDR(ebase); |
@@ -1470,7 +1470,7 @@ void __init trap_init(void) | |||
1470 | unsigned long i; | 1470 | unsigned long i; |
1471 | 1471 | ||
1472 | if (cpu_has_veic || cpu_has_vint) | 1472 | if (cpu_has_veic || cpu_has_vint) |
1473 | ebase = (unsigned long) alloc_bootmem_low_pages (0x200 + VECTORSPACING*64); | 1473 | ebase = (unsigned long) alloc_bootmem_low_pages(0x200 + VECTORSPACING*64); |
1474 | else | 1474 | else |
1475 | ebase = CAC_BASE; | 1475 | ebase = CAC_BASE; |
1476 | 1476 | ||
@@ -1496,7 +1496,7 @@ void __init trap_init(void) | |||
1496 | * destination. | 1496 | * destination. |
1497 | */ | 1497 | */ |
1498 | if (cpu_has_ejtag && board_ejtag_handler_setup) | 1498 | if (cpu_has_ejtag && board_ejtag_handler_setup) |
1499 | board_ejtag_handler_setup (); | 1499 | board_ejtag_handler_setup(); |
1500 | 1500 | ||
1501 | /* | 1501 | /* |
1502 | * Only some CPUs have the watch exceptions. | 1502 | * Only some CPUs have the watch exceptions. |
diff --git a/arch/mips/kernel/unaligned.c b/arch/mips/kernel/unaligned.c index d34b1fb3665..c327b21bca8 100644 --- a/arch/mips/kernel/unaligned.c +++ b/arch/mips/kernel/unaligned.c | |||
@@ -481,7 +481,7 @@ fault: | |||
481 | if (fixup_exception(regs)) | 481 | if (fixup_exception(regs)) |
482 | return; | 482 | return; |
483 | 483 | ||
484 | die_if_kernel ("Unhandled kernel unaligned access", regs); | 484 | die_if_kernel("Unhandled kernel unaligned access", regs); |
485 | send_sig(SIGSEGV, current, 1); | 485 | send_sig(SIGSEGV, current, 1); |
486 | 486 | ||
487 | return; | 487 | return; |