__init int sprd_debug_init(void)
{
    if (!sprd_debug_level.en.kernel_fault)
        return -1;

    sprd_debug_set_build_info();

    return 0;
}
Example #2
0
__init int sprd_debug_init(void)
{
	dma_addr_t addr;

	if (!sprd_debug_level.en.kernel_fault)
		return -1;

	sprd_debug_set_build_info();
#ifndef CONFIG_64BIT
	sprd_debug_last_regs_access = (struct sprd_debug_regs_access*)dma_alloc_coherent(
				NULL, sizeof(struct sprd_debug_regs_access)*NR_CPUS, &addr, GFP_KERNEL);
#else
	sprd_debug_last_regs_access = (struct sprd_debug_regs_access*)swiotlb_alloc_coherent(
				NULL, sizeof(struct sprd_debug_regs_access)*NR_CPUS, &addr, GFP_KERNEL);
#endif
	printk("*** %s, size:%u, sprd_debug_last_regs_access:%p *** \n",
		__func__, sizeof(struct sprd_debug_regs_access)*NR_CPUS, sprd_debug_last_regs_access);

	return 0;
}