#ifdef __ARCH_SI_TRAPNO
err |= __put_user(kinfo->si_trapno, &uinfo->ssi_trapno);
#endif
-#ifdef BUS_MCEERR_AO
/*
* Other callers might not initialize the si_lsb field,
* so check explicitly for the right codes here.
*/
if (kinfo->si_signo == SIGBUS &&
- kinfo->si_code == BUS_MCEERR_AO)
+ ((kinfo->si_code == BUS_MCEERR_AR) ||
+ (kinfo->si_code == BUS_MCEERR_AO)))
err |= __put_user((short) kinfo->si_addr_lsb,
&uinfo->ssi_addr_lsb);
-#endif
-#ifdef BUS_MCEERR_AR
- /*
- * Other callers might not initialize the si_lsb field,
- * so check explicitly for the right codes here.
- */
- if (kinfo->si_signo == SIGBUS &&
- kinfo->si_code == BUS_MCEERR_AR)
- err |= __put_user((short) kinfo->si_addr_lsb,
- &uinfo->ssi_addr_lsb);
-#endif
break;
case SIL_CHLD:
err |= __put_user(kinfo->si_pid, &uinfo->ssi_pid);
return send_sig_info(info.si_signo, &info, t);
}
-#if defined(BUS_MCEERR_AO) && defined(BUS_MCEERR_AR)
int force_sig_mceerr(int code, void __user *addr, short lsb, struct task_struct *t)
{
struct siginfo info;
return send_sig_info(info.si_signo, &info, t);
}
EXPORT_SYMBOL(send_sig_mceerr);
-#endif
int force_sig_bnderr(void __user *addr, void __user *lower, void __user *upper)
{
#ifdef __ARCH_SI_TRAPNO
new.si_trapno = from->si_trapno;
#endif
-#ifdef BUS_MCEERR_AR
- if ((from->si_signo == SIGBUS) && (from->si_code == BUS_MCEERR_AR))
- new.si_addr_lsb = from->si_addr_lsb;
-#endif
-#ifdef BUS_MCEERR_AO
- if ((from->si_signo == SIGBUS) && (from->si_code == BUS_MCEERR_AO))
+ if ((from->si_signo == SIGBUS) &&
+ ((from->si_code == BUS_MCEERR_AR) ||
+ (from->si_code == BUS_MCEERR_AO)))
new.si_addr_lsb = from->si_addr_lsb;
-#endif
+
if ((from->si_signo == SIGSEGV) &&
(from->si_code == SEGV_BNDERR)) {
new.si_lower = ptr_to_compat(from->si_lower);
#ifdef __ARCH_SI_TRAPNO
to->si_trapno = from.si_trapno;
#endif
-#ifdef BUS_MCEERR_AR
- if ((from.si_signo == SIGBUS) && (from.si_code == BUS_MCEERR_AR))
+ if ((from.si_signo == SIGBUS) &&
+ ((from.si_code == BUS_MCEERR_AR) ||
+ (from.si_code == BUS_MCEERR_AO)))
to->si_addr_lsb = from.si_addr_lsb;
-#endif
-#ifdef BUS_MCEER_AO
- if ((from.si_signo == SIGBUS) && (from.si_code == BUS_MCEERR_AO))
- to->si_addr_lsb = from.si_addr_lsb;
-#endif
+
if ((from.si_signo == SIGSEGV) && (from.si_code == SEGV_BNDERR)) {
to->si_lower = compat_ptr(from.si_lower);
to->si_upper = compat_ptr(from.si_upper);