* bad_mode handles the impossible case in the exception vector. This is always
* fatal.
*/
+#ifdef CONFIG_AMLOGIC_USER_FAULT
+asmlinkage void bad_mode(struct pt_regs *regs, int reason, unsigned int esr,
+ unsigned long far)
+#else
asmlinkage void bad_mode(struct pt_regs *regs, int reason, unsigned int esr)
+#endif
{
console_verbose();
handler[reason], smp_processor_id(), esr,
esr_get_class_string(esr));
+#ifdef CONFIG_AMLOGIC_USER_FAULT
+ regs->unused = far;
+ pr_crit("FAR:%lx\n", far);
+ show_all_pfn(current, regs);
+#endif /* CONFIG_AMLOGIC_USER_FAULT */
die("Oops - bad mode", regs, 0);
local_irq_disable();
panic("bad mode");
else
sprintf(s1, "--------");
pr_info("sp : %016llx %s\n", regs->sp, s1);
+
+ pfn1 = get_user_pfn(task->mm, regs->unused);
+ if (pfn1 >= 0)
+ sprintf(s1, "%8lx", pfn1);
+ else
+ sprintf(s1, "--------");
+ pr_info("unused : %016llx %s\n", regs->unused, s1);
}
#endif /* CONFIG_AMLOGIC_USER_FAULT */