aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/kernel/process_64.c2
-rw-r--r--arch/sparc/kernel/sys_sparc_32.c2
-rw-r--r--arch/sparc/kernel/sys_sparc_64.c2
-rw-r--r--arch/sparc/kernel/traps_32.c4
-rw-r--r--arch/sparc/kernel/traps_64.c39
-rw-r--r--arch/sparc/mm/fault_32.c2
-rw-r--r--arch/sparc/mm/fault_64.c2
7 files changed, 25 insertions, 28 deletions
diff --git a/arch/sparc/kernel/process_64.c b/arch/sparc/kernel/process_64.c
index c4bccd97f3cf..4282116e28e7 100644
--- a/arch/sparc/kernel/process_64.c
+++ b/arch/sparc/kernel/process_64.c
@@ -519,7 +519,7 @@ void synchronize_user_stack(void)
519 519
520static void stack_unaligned(unsigned long sp) 520static void stack_unaligned(unsigned long sp)
521{ 521{
522 force_sig_fault(SIGBUS, BUS_ADRALN, (void __user *) sp, 0, current); 522 force_sig_fault(SIGBUS, BUS_ADRALN, (void __user *) sp, 0);
523} 523}
524 524
525static const char uwfault32[] = KERN_INFO \ 525static const char uwfault32[] = KERN_INFO \
diff --git a/arch/sparc/kernel/sys_sparc_32.c b/arch/sparc/kernel/sys_sparc_32.c
index 452e4d080855..be77538bc038 100644
--- a/arch/sparc/kernel/sys_sparc_32.c
+++ b/arch/sparc/kernel/sys_sparc_32.c
@@ -151,7 +151,7 @@ sparc_breakpoint (struct pt_regs *regs)
151#ifdef DEBUG_SPARC_BREAKPOINT 151#ifdef DEBUG_SPARC_BREAKPOINT
152 printk ("TRAP: Entering kernel PC=%x, nPC=%x\n", regs->pc, regs->npc); 152 printk ("TRAP: Entering kernel PC=%x, nPC=%x\n", regs->pc, regs->npc);
153#endif 153#endif
154 force_sig_fault(SIGTRAP, TRAP_BRKPT, (void __user *)regs->pc, 0, current); 154 force_sig_fault(SIGTRAP, TRAP_BRKPT, (void __user *)regs->pc, 0);
155 155
156#ifdef DEBUG_SPARC_BREAKPOINT 156#ifdef DEBUG_SPARC_BREAKPOINT
157 printk ("TRAP: Returning to space: PC=%x nPC=%x\n", regs->pc, regs->npc); 157 printk ("TRAP: Returning to space: PC=%x nPC=%x\n", regs->pc, regs->npc);
diff --git a/arch/sparc/kernel/sys_sparc_64.c b/arch/sparc/kernel/sys_sparc_64.c
index 9825ca6a6020..ccc88926bc00 100644
--- a/arch/sparc/kernel/sys_sparc_64.c
+++ b/arch/sparc/kernel/sys_sparc_64.c
@@ -511,7 +511,7 @@ asmlinkage void sparc_breakpoint(struct pt_regs *regs)
511#ifdef DEBUG_SPARC_BREAKPOINT 511#ifdef DEBUG_SPARC_BREAKPOINT
512 printk ("TRAP: Entering kernel PC=%lx, nPC=%lx\n", regs->tpc, regs->tnpc); 512 printk ("TRAP: Entering kernel PC=%lx, nPC=%lx\n", regs->tpc, regs->tnpc);
513#endif 513#endif
514 force_sig_fault(SIGTRAP, TRAP_BRKPT, (void __user *)regs->tpc, 0, current); 514 force_sig_fault(SIGTRAP, TRAP_BRKPT, (void __user *)regs->tpc, 0);
515#ifdef DEBUG_SPARC_BREAKPOINT 515#ifdef DEBUG_SPARC_BREAKPOINT
516 printk ("TRAP: Returning to space: PC=%lx nPC=%lx\n", regs->tpc, regs->tnpc); 516 printk ("TRAP: Returning to space: PC=%lx nPC=%lx\n", regs->tpc, regs->tnpc);
517#endif 517#endif
diff --git a/arch/sparc/kernel/traps_32.c b/arch/sparc/kernel/traps_32.c
index bcdfc6168dd5..4ceecad556a9 100644
--- a/arch/sparc/kernel/traps_32.c
+++ b/arch/sparc/kernel/traps_32.c
@@ -103,7 +103,7 @@ void do_hw_interrupt(struct pt_regs *regs, unsigned long type)
103 die_if_kernel("Kernel bad trap", regs); 103 die_if_kernel("Kernel bad trap", regs);
104 104
105 force_sig_fault(SIGILL, ILL_ILLTRP, 105 force_sig_fault(SIGILL, ILL_ILLTRP,
106 (void __user *)regs->pc, type - 0x80, current); 106 (void __user *)regs->pc, type - 0x80);
107} 107}
108 108
109void do_illegal_instruction(struct pt_regs *regs, unsigned long pc, unsigned long npc, 109void do_illegal_instruction(struct pt_regs *regs, unsigned long pc, unsigned long npc,
@@ -327,7 +327,7 @@ void handle_reg_access(struct pt_regs *regs, unsigned long pc, unsigned long npc
327 printk("Register Access Exception at PC %08lx NPC %08lx PSR %08lx\n", 327 printk("Register Access Exception at PC %08lx NPC %08lx PSR %08lx\n",
328 pc, npc, psr); 328 pc, npc, psr);
329#endif 329#endif
330 force_sig_fault(SIGBUS, BUS_OBJERR, (void __user *)pc, 0, current); 330 force_sig_fault(SIGBUS, BUS_OBJERR, (void __user *)pc, 0);
331} 331}
332 332
333void handle_cp_disabled(struct pt_regs *regs, unsigned long pc, unsigned long npc, 333void handle_cp_disabled(struct pt_regs *regs, unsigned long pc, unsigned long npc,
diff --git a/arch/sparc/kernel/traps_64.c b/arch/sparc/kernel/traps_64.c
index 12bfc7e215ca..614d92c18506 100644
--- a/arch/sparc/kernel/traps_64.c
+++ b/arch/sparc/kernel/traps_64.c
@@ -107,7 +107,7 @@ void bad_trap(struct pt_regs *regs, long lvl)
107 regs->tnpc &= 0xffffffff; 107 regs->tnpc &= 0xffffffff;
108 } 108 }
109 force_sig_fault(SIGILL, ILL_ILLTRP, 109 force_sig_fault(SIGILL, ILL_ILLTRP,
110 (void __user *)regs->tpc, lvl, current); 110 (void __user *)regs->tpc, lvl);
111} 111}
112 112
113void bad_trap_tl1(struct pt_regs *regs, long lvl) 113void bad_trap_tl1(struct pt_regs *regs, long lvl)
@@ -201,7 +201,7 @@ void spitfire_insn_access_exception(struct pt_regs *regs, unsigned long sfsr, un
201 regs->tnpc &= 0xffffffff; 201 regs->tnpc &= 0xffffffff;
202 } 202 }
203 force_sig_fault(SIGSEGV, SEGV_MAPERR, 203 force_sig_fault(SIGSEGV, SEGV_MAPERR,
204 (void __user *)regs->tpc, 0, current); 204 (void __user *)regs->tpc, 0);
205out: 205out:
206 exception_exit(prev_state); 206 exception_exit(prev_state);
207} 207}
@@ -236,7 +236,7 @@ void sun4v_insn_access_exception(struct pt_regs *regs, unsigned long addr, unsig
236 regs->tpc &= 0xffffffff; 236 regs->tpc &= 0xffffffff;
237 regs->tnpc &= 0xffffffff; 237 regs->tnpc &= 0xffffffff;
238 } 238 }
239 force_sig_fault(SIGSEGV, SEGV_MAPERR, (void __user *) addr, 0, current); 239 force_sig_fault(SIGSEGV, SEGV_MAPERR, (void __user *) addr, 0);
240} 240}
241 241
242void sun4v_insn_access_exception_tl1(struct pt_regs *regs, unsigned long addr, unsigned long type_ctx) 242void sun4v_insn_access_exception_tl1(struct pt_regs *regs, unsigned long addr, unsigned long type_ctx)
@@ -321,7 +321,7 @@ void spitfire_data_access_exception(struct pt_regs *regs, unsigned long sfsr, un
321 if (is_no_fault_exception(regs)) 321 if (is_no_fault_exception(regs))
322 return; 322 return;
323 323
324 force_sig_fault(SIGSEGV, SEGV_MAPERR, (void __user *)sfar, 0, current); 324 force_sig_fault(SIGSEGV, SEGV_MAPERR, (void __user *)sfar, 0);
325out: 325out:
326 exception_exit(prev_state); 326 exception_exit(prev_state);
327} 327}
@@ -385,16 +385,13 @@ void sun4v_data_access_exception(struct pt_regs *regs, unsigned long addr, unsig
385 */ 385 */
386 switch (type) { 386 switch (type) {
387 case HV_FAULT_TYPE_INV_ASI: 387 case HV_FAULT_TYPE_INV_ASI:
388 force_sig_fault(SIGILL, ILL_ILLADR, (void __user *)addr, 0, 388 force_sig_fault(SIGILL, ILL_ILLADR, (void __user *)addr, 0);
389 current);
390 break; 389 break;
391 case HV_FAULT_TYPE_MCD_DIS: 390 case HV_FAULT_TYPE_MCD_DIS:
392 force_sig_fault(SIGSEGV, SEGV_ACCADI, (void __user *)addr, 0, 391 force_sig_fault(SIGSEGV, SEGV_ACCADI, (void __user *)addr, 0);
393 current);
394 break; 392 break;
395 default: 393 default:
396 force_sig_fault(SIGSEGV, SEGV_MAPERR, (void __user *)addr, 0, 394 force_sig_fault(SIGSEGV, SEGV_MAPERR, (void __user *)addr, 0);
397 current);
398 break; 395 break;
399 } 396 }
400} 397}
@@ -571,7 +568,7 @@ static void spitfire_ue_log(unsigned long afsr, unsigned long afar, unsigned lon
571 regs->tpc &= 0xffffffff; 568 regs->tpc &= 0xffffffff;
572 regs->tnpc &= 0xffffffff; 569 regs->tnpc &= 0xffffffff;
573 } 570 }
574 force_sig_fault(SIGBUS, BUS_OBJERR, (void *)0, 0, current); 571 force_sig_fault(SIGBUS, BUS_OBJERR, (void *)0, 0);
575} 572}
576 573
577void spitfire_access_error(struct pt_regs *regs, unsigned long status_encoded, unsigned long afar) 574void spitfire_access_error(struct pt_regs *regs, unsigned long status_encoded, unsigned long afar)
@@ -2073,7 +2070,7 @@ void do_mcd_err(struct pt_regs *regs, struct sun4v_error_entry ent)
2073 * code 2070 * code
2074 */ 2071 */
2075 force_sig_fault(SIGSEGV, SEGV_ADIDERR, (void __user *)ent.err_raddr, 2072 force_sig_fault(SIGSEGV, SEGV_ADIDERR, (void __user *)ent.err_raddr,
2076 0, current); 2073 0);
2077} 2074}
2078 2075
2079/* We run with %pil set to PIL_NORMAL_MAX and PSTATE_IE enabled in %pstate. 2076/* We run with %pil set to PIL_NORMAL_MAX and PSTATE_IE enabled in %pstate.
@@ -2187,7 +2184,7 @@ bool sun4v_nonresum_error_user_handled(struct pt_regs *regs,
2187 } 2184 }
2188 if (attrs & SUN4V_ERR_ATTRS_PIO) { 2185 if (attrs & SUN4V_ERR_ATTRS_PIO) {
2189 force_sig_fault(SIGBUS, BUS_ADRERR, 2186 force_sig_fault(SIGBUS, BUS_ADRERR,
2190 (void __user *)sun4v_get_vaddr(regs), 0, current); 2187 (void __user *)sun4v_get_vaddr(regs), 0);
2191 return true; 2188 return true;
2192 } 2189 }
2193 2190
@@ -2344,7 +2341,7 @@ static void do_fpe_common(struct pt_regs *regs)
2344 code = FPE_FLTRES; 2341 code = FPE_FLTRES;
2345 } 2342 }
2346 force_sig_fault(SIGFPE, code, 2343 force_sig_fault(SIGFPE, code,
2347 (void __user *)regs->tpc, 0, current); 2344 (void __user *)regs->tpc, 0);
2348 } 2345 }
2349} 2346}
2350 2347
@@ -2399,7 +2396,7 @@ void do_tof(struct pt_regs *regs)
2399 regs->tnpc &= 0xffffffff; 2396 regs->tnpc &= 0xffffffff;
2400 } 2397 }
2401 force_sig_fault(SIGEMT, EMT_TAGOVF, 2398 force_sig_fault(SIGEMT, EMT_TAGOVF,
2402 (void __user *)regs->tpc, 0, current); 2399 (void __user *)regs->tpc, 0);
2403out: 2400out:
2404 exception_exit(prev_state); 2401 exception_exit(prev_state);
2405} 2402}
@@ -2419,7 +2416,7 @@ void do_div0(struct pt_regs *regs)
2419 regs->tnpc &= 0xffffffff; 2416 regs->tnpc &= 0xffffffff;
2420 } 2417 }
2421 force_sig_fault(SIGFPE, FPE_INTDIV, 2418 force_sig_fault(SIGFPE, FPE_INTDIV,
2422 (void __user *)regs->tpc, 0, current); 2419 (void __user *)regs->tpc, 0);
2423out: 2420out:
2424 exception_exit(prev_state); 2421 exception_exit(prev_state);
2425} 2422}
@@ -2615,7 +2612,7 @@ void do_illegal_instruction(struct pt_regs *regs)
2615 } 2612 }
2616 } 2613 }
2617 } 2614 }
2618 force_sig_fault(SIGILL, ILL_ILLOPC, (void __user *)pc, 0, current); 2615 force_sig_fault(SIGILL, ILL_ILLOPC, (void __user *)pc, 0);
2619out: 2616out:
2620 exception_exit(prev_state); 2617 exception_exit(prev_state);
2621} 2618}
@@ -2635,7 +2632,7 @@ void mem_address_unaligned(struct pt_regs *regs, unsigned long sfar, unsigned lo
2635 if (is_no_fault_exception(regs)) 2632 if (is_no_fault_exception(regs))
2636 return; 2633 return;
2637 2634
2638 force_sig_fault(SIGBUS, BUS_ADRALN, (void __user *)sfar, 0, current); 2635 force_sig_fault(SIGBUS, BUS_ADRALN, (void __user *)sfar, 0);
2639out: 2636out:
2640 exception_exit(prev_state); 2637 exception_exit(prev_state);
2641} 2638}
@@ -2653,7 +2650,7 @@ void sun4v_do_mna(struct pt_regs *regs, unsigned long addr, unsigned long type_c
2653 if (is_no_fault_exception(regs)) 2650 if (is_no_fault_exception(regs))
2654 return; 2651 return;
2655 2652
2656 force_sig_fault(SIGBUS, BUS_ADRALN, (void __user *) addr, 0, current); 2653 force_sig_fault(SIGBUS, BUS_ADRALN, (void __user *) addr, 0);
2657} 2654}
2658 2655
2659/* sun4v_mem_corrupt_detect_precise() - Handle precise exception on an ADI 2656/* sun4v_mem_corrupt_detect_precise() - Handle precise exception on an ADI
@@ -2700,7 +2697,7 @@ void sun4v_mem_corrupt_detect_precise(struct pt_regs *regs, unsigned long addr,
2700 regs->tpc &= 0xffffffff; 2697 regs->tpc &= 0xffffffff;
2701 regs->tnpc &= 0xffffffff; 2698 regs->tnpc &= 0xffffffff;
2702 } 2699 }
2703 force_sig_fault(SIGSEGV, SEGV_ADIPERR, (void __user *)addr, 0, current); 2700 force_sig_fault(SIGSEGV, SEGV_ADIPERR, (void __user *)addr, 0);
2704} 2701}
2705 2702
2706void do_privop(struct pt_regs *regs) 2703void do_privop(struct pt_regs *regs)
@@ -2716,7 +2713,7 @@ void do_privop(struct pt_regs *regs)
2716 regs->tnpc &= 0xffffffff; 2713 regs->tnpc &= 0xffffffff;
2717 } 2714 }
2718 force_sig_fault(SIGILL, ILL_PRVOPC, 2715 force_sig_fault(SIGILL, ILL_PRVOPC,
2719 (void __user *)regs->tpc, 0, current); 2716 (void __user *)regs->tpc, 0);
2720out: 2717out:
2721 exception_exit(prev_state); 2718 exception_exit(prev_state);
2722} 2719}
diff --git a/arch/sparc/mm/fault_32.c b/arch/sparc/mm/fault_32.c
index 2731faf415ba..8d69de111470 100644
--- a/arch/sparc/mm/fault_32.c
+++ b/arch/sparc/mm/fault_32.c
@@ -131,7 +131,7 @@ static void __do_fault_siginfo(int code, int sig, struct pt_regs *regs,
131 show_signal_msg(regs, sig, code, 131 show_signal_msg(regs, sig, code,
132 addr, current); 132 addr, current);
133 133
134 force_sig_fault(sig, code, (void __user *) addr, 0, current); 134 force_sig_fault(sig, code, (void __user *) addr, 0);
135} 135}
136 136
137static unsigned long compute_si_addr(struct pt_regs *regs, int text_fault) 137static unsigned long compute_si_addr(struct pt_regs *regs, int text_fault)
diff --git a/arch/sparc/mm/fault_64.c b/arch/sparc/mm/fault_64.c
index 8f8a604c1300..83fda4d9c3b2 100644
--- a/arch/sparc/mm/fault_64.c
+++ b/arch/sparc/mm/fault_64.c
@@ -187,7 +187,7 @@ static void do_fault_siginfo(int code, int sig, struct pt_regs *regs,
187 if (unlikely(show_unhandled_signals)) 187 if (unlikely(show_unhandled_signals))
188 show_signal_msg(regs, sig, code, addr, current); 188 show_signal_msg(regs, sig, code, addr, current);
189 189
190 force_sig_fault(sig, code, (void __user *) addr, 0, current); 190 force_sig_fault(sig, code, (void __user *) addr, 0);
191} 191}
192 192
193static unsigned int get_fault_insn(struct pt_regs *regs, unsigned int insn) 193static unsigned int get_fault_insn(struct pt_regs *regs, unsigned int insn)