aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/unaligned.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2005-03-01 14:22:29 -0500
committerRalf Baechle <ralf@linux-mips.org>2005-10-29 14:30:50 -0400
commitfe00f943e0ef98b4057abcc2940d631a975b43cd (patch)
treec036ab8269ac86485130a083330229a01d319557 /arch/mips/kernel/unaligned.c
parent14f18b7f7e58de9a34c4b5fd38d5f73f22fba7ac (diff)
Sparseify MIPS.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/unaligned.c')
-rw-r--r--arch/mips/kernel/unaligned.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/mips/kernel/unaligned.c b/arch/mips/kernel/unaligned.c
index 36c5212e0928..5b5a3736cbbc 100644
--- a/arch/mips/kernel/unaligned.c
+++ b/arch/mips/kernel/unaligned.c
@@ -94,7 +94,7 @@ unsigned long unaligned_instructions;
94#endif 94#endif
95 95
96static inline int emulate_load_store_insn(struct pt_regs *regs, 96static inline int emulate_load_store_insn(struct pt_regs *regs,
97 void *addr, unsigned long pc, 97 void __user *addr, unsigned int __user *pc,
98 unsigned long **regptr, unsigned long *newvalue) 98 unsigned long **regptr, unsigned long *newvalue)
99{ 99{
100 union mips_instruction insn; 100 union mips_instruction insn;
@@ -107,7 +107,7 @@ static inline int emulate_load_store_insn(struct pt_regs *regs,
107 /* 107 /*
108 * This load never faults. 108 * This load never faults.
109 */ 109 */
110 __get_user(insn.word, (unsigned int *)pc); 110 __get_user(insn.word, pc);
111 111
112 switch (insn.i_format.opcode) { 112 switch (insn.i_format.opcode) {
113 /* 113 /*
@@ -494,8 +494,8 @@ asmlinkage void do_ade(struct pt_regs *regs)
494{ 494{
495 unsigned long *regptr, newval; 495 unsigned long *regptr, newval;
496 extern int do_dsemulret(struct pt_regs *); 496 extern int do_dsemulret(struct pt_regs *);
497 unsigned int __user *pc;
497 mm_segment_t seg; 498 mm_segment_t seg;
498 unsigned long pc;
499 499
500 /* 500 /*
501 * Address errors may be deliberately induced by the FPU emulator to 501 * Address errors may be deliberately induced by the FPU emulator to
@@ -515,7 +515,7 @@ asmlinkage void do_ade(struct pt_regs *regs)
515 if ((regs->cp0_badvaddr == regs->cp0_epc) || (regs->cp0_epc & 0x1)) 515 if ((regs->cp0_badvaddr == regs->cp0_epc) || (regs->cp0_epc & 0x1))
516 goto sigbus; 516 goto sigbus;
517 517
518 pc = exception_epc(regs); 518 pc = (unsigned int __user *) exception_epc(regs);
519 if ((current->thread.mflags & MF_FIXADE) == 0) 519 if ((current->thread.mflags & MF_FIXADE) == 0)
520 goto sigbus; 520 goto sigbus;
521 521
@@ -526,7 +526,7 @@ asmlinkage void do_ade(struct pt_regs *regs)
526 seg = get_fs(); 526 seg = get_fs();
527 if (!user_mode(regs)) 527 if (!user_mode(regs))
528 set_fs(KERNEL_DS); 528 set_fs(KERNEL_DS);
529 if (!emulate_load_store_insn(regs, (void *)regs->cp0_badvaddr, pc, 529 if (!emulate_load_store_insn(regs, (void __user *)regs->cp0_badvaddr, pc,
530 &regptr, &newval)) { 530 &regptr, &newval)) {
531 compute_return_epc(regs); 531 compute_return_epc(regs);
532 /* 532 /*