Esempio n. 1
0
static int fimc_is_fault_handler(struct device *dev, const char *mmuname,
					enum exynos_sysmmu_inttype itype,
					unsigned long pgtable_base,
					unsigned long fault_addr)
{
	unsigned long *ent;

	if ((itype >= SYSMMU_FAULTS_NUM) || (itype < SYSMMU_PAGEFAULT))
		itype = SYSMMU_FAULT_UNKNOWN;

	pr_err("%s occured at 0x%lx by '%s'(Page table base: 0x%lx)\n",
		sysmmu_fault_name[itype], fault_addr, mmuname, pgtable_base);

	ent = section_entry(__va(pgtable_base), fault_addr);
	pr_err("\tLv1 entry: 0x%lx\n", *ent);

	if (lv1ent_page(ent)) {
		ent = page_entry(ent, fault_addr);
		pr_err("\t Lv2 entry: 0x%lx\n", *ent);
	}

	__fimc_is_fault_handler(dev);

	pr_err("Generating Kernel OOPS... because it is unrecoverable.\n");

	BUG();

	return 0;
}
Esempio n. 2
0
static void show_fault_information(const char *name,
                                   enum exynos_sysmmu_inttype itype,
                                   phys_addr_t pgtable_base, sysmmu_iova_t fault_addr)
{
    sysmmu_pte_t *ent;

    if ((itype >= SYSMMU_FAULTS_NUM) || (itype < SYSMMU_PAGEFAULT))
        itype = SYSMMU_FAULT_UNKNOWN;

    pr_err("%s occurred at %#x by %s(Page table base: %pa)\n",
           sysmmu_fault_name[itype], fault_addr, name, &pgtable_base);

    ent = section_entry(phys_to_virt(pgtable_base), fault_addr);
    pr_err("\tLv1 entry: %#x\n", *ent);

    if (lv1ent_page(ent)) {
        ent = page_entry(ent, fault_addr);
        pr_err("\t Lv2 entry: %#x\n", *ent);
    }
}