@@ -362,7 +362,6 @@ void sun4v_data_access_exception(struct pt_regs *regs, unsigned long addr, unsig
362
362
{
363
363
unsigned short type = (type_ctx >> 16 );
364
364
unsigned short ctx = (type_ctx & 0xffff );
365
- siginfo_t info ;
366
365
367
366
if (notify_die (DIE_TRAP , "data access exception" , regs ,
368
367
0 , 0x8 , SIGTRAP ) == NOTIFY_STOP )
@@ -406,24 +405,18 @@ void sun4v_data_access_exception(struct pt_regs *regs, unsigned long addr, unsig
406
405
* kerbel by HV as data access exception with fault type set to
407
406
* HV_FAULT_TYPE_INV_ASI.
408
407
*/
409
- info .si_errno = 0 ;
410
- info .si_addr = (void __user * ) addr ;
411
- info .si_trapno = 0 ;
412
408
switch (type ) {
413
409
case HV_FAULT_TYPE_INV_ASI :
414
- info .si_signo = SIGILL ;
415
- info .si_code = ILL_ILLADR ;
416
- force_sig_info (SIGILL , & info , current );
410
+ force_sig_fault (SIGILL , ILL_ILLADR , (void __user * )addr , 0 ,
411
+ current );
417
412
break ;
418
413
case HV_FAULT_TYPE_MCD_DIS :
419
- info .si_signo = SIGSEGV ;
420
- info .si_code = SEGV_ACCADI ;
421
- force_sig_info (SIGSEGV , & info , current );
414
+ force_sig_fault (SIGSEGV , SEGV_ACCADI , (void __user * )addr , 0 ,
415
+ current );
422
416
break ;
423
417
default :
424
- info .si_signo = SIGSEGV ;
425
- info .si_code = SEGV_MAPERR ;
426
- force_sig_info (SIGSEGV , & info , current );
418
+ force_sig_fault (SIGSEGV , SEGV_MAPERR , (void __user * )addr , 0 ,
419
+ current );
427
420
break ;
428
421
}
429
422
}
@@ -2073,8 +2066,6 @@ static void sun4v_log_error(struct pt_regs *regs, struct sun4v_error_entry *ent,
2073
2066
*/
2074
2067
void do_mcd_err (struct pt_regs * regs , struct sun4v_error_entry ent )
2075
2068
{
2076
- siginfo_t info ;
2077
-
2078
2069
if (notify_die (DIE_TRAP , "MCD error" , regs , 0 , 0x34 ,
2079
2070
SIGSEGV ) == NOTIFY_STOP )
2080
2071
return ;
@@ -2110,12 +2101,8 @@ void do_mcd_err(struct pt_regs *regs, struct sun4v_error_entry ent)
2110
2101
/* Send SIGSEGV to the userspace process with the right signal
2111
2102
* code
2112
2103
*/
2113
- info .si_signo = SIGSEGV ;
2114
- info .si_errno = 0 ;
2115
- info .si_code = SEGV_ADIDERR ;
2116
- info .si_addr = (void __user * )ent .err_raddr ;
2117
- info .si_trapno = 0 ;
2118
- force_sig_info (SIGSEGV , & info , current );
2104
+ force_sig_fault (SIGSEGV , SEGV_ADIDERR , (void __user * )ent .err_raddr ,
2105
+ 0 , current );
2119
2106
}
2120
2107
2121
2108
/* We run with %pil set to PIL_NORMAL_MAX and PSTATE_IE enabled in %pstate.
@@ -2748,8 +2735,6 @@ void sun4v_do_mna(struct pt_regs *regs, unsigned long addr, unsigned long type_c
2748
2735
void sun4v_mem_corrupt_detect_precise (struct pt_regs * regs , unsigned long addr ,
2749
2736
unsigned long context )
2750
2737
{
2751
- siginfo_t info ;
2752
-
2753
2738
if (notify_die (DIE_TRAP , "memory corruption precise exception" , regs ,
2754
2739
0 , 0x8 , SIGSEGV ) == NOTIFY_STOP )
2755
2740
return ;
@@ -2784,12 +2769,7 @@ void sun4v_mem_corrupt_detect_precise(struct pt_regs *regs, unsigned long addr,
2784
2769
regs -> tpc &= 0xffffffff ;
2785
2770
regs -> tnpc &= 0xffffffff ;
2786
2771
}
2787
- info .si_signo = SIGSEGV ;
2788
- info .si_code = SEGV_ADIPERR ;
2789
- info .si_errno = 0 ;
2790
- info .si_addr = (void __user * ) addr ;
2791
- info .si_trapno = 0 ;
2792
- force_sig_info (SIGSEGV , & info , current );
2772
+ force_sig_fault (SIGSEGV , SEGV_ADIPERR , (void __user * )addr , 0 , current );
2793
2773
}
2794
2774
2795
2775
void do_privop (struct pt_regs * regs )
0 commit comments