in kernel/traps.c [122:143]
asmlinkage void handle_unaligned_c(struct pt_regs *fp, int cause)
{
unsigned long addr = RDCTL(CTL_BADADDR);
cause >>= 2;
fp->ea -= 4;
if (fixup_exception(fp))
return;
if (!user_mode(fp)) {
pr_alert("Unaligned access from kernel mode, this might be a hardware\n");
pr_alert("problem, dump registers and restart the instruction\n");
pr_alert(" BADADDR 0x%08lx\n", addr);
pr_alert(" cause %d\n", cause);
pr_alert(" op-code 0x%08lx\n", *(unsigned long *)(fp->ea));
show_regs(fp);
return;
}
_exception(SIGBUS, fp, BUS_ADRALN, addr);
}