Пример #1
0
static int __init ptrace_break_init(void)
{
	register_undef_hook(&arm_break_hook);
	register_undef_hook(&thumb_break_hook);
	register_undef_hook(&thumb2_break_hook);
	return 0;
}
Пример #2
0
/**
 *	kgdb_arch_init - Perform any architecture specific initalization.
 *
 *	This function will handle the initalization of any architecture
 *	specific callbacks.
 */
int kgdb_arch_init(void)
{
	int ret = register_die_notifier(&kgdb_notifier);

	if (ret != 0)
		return ret;

	register_undef_hook(&kgdb_brkpt_hook);
	register_undef_hook(&kgdb_compiled_brkpt_hook);

	return 0;
}
Пример #3
0
static int __init rkusb_init_internal( void )
{
               struct rkusb_dev *dev;
               struct log_buffer *p ;
	dev = kzalloc(sizeof(*dev), GFP_KERNEL);
	if (!dev)
		return -ENOMEM;
                dev->buf_length = 48*1024; /* for tmp buffer */
                dev->req_buf_length = 4*1024;
                dev->buf = kmalloc(dev->buf_length,GFP_KERNEL); 
                if( !dev->buf ) {
                        kfree( dev );
                        return -ENOMEM;
                }
                dev->req_in_buf = kmalloc(dev->req_buf_length,GFP_KERNEL); 
                if( !dev->req_in_buf ) {
                        kfree( dev );
                        kfree( dev->buf );
                        return -ENOMEM;
                }
                
             dev->luns = LOG_NUM;
             p = dev->log;
             strcpy( p->name , "kernel log" );
             p->property = LOG_PROT_READ;
             p->getlog = kernel_getlog;
             p->getlog_start_length = kernel_getlog_start_length;
             #if (LOG_NUM>1)
             p++;
             strcpy( p->name , "android main log" );
             p->property = LOG_PROT_READ;
             p->getlog = android_main_getlog;
             p->getlog_start_length = android_main_getlog_start_length;
             #endif
             #if (LOG_NUM>2)
             p++;
             strcpy( p->name , "shell log" );
             p->property = LOG_PROT_READ|LOG_PROT_WRITE; /* read and write */
             p->getlog = rkusb_shell_getlog;
             p->getlog_start_length = rkusb_shell_getlog_start_length;
             p->setlog = rkusb_shell_log_write;
             #endif

             //spin_lock_init(&dev->lock);
             dev->cr.Signature= RKUSB_RESULT_SIG;
             dev->cs.Signature = RKUSB_BULK_CS_SIG;
             INIT_WORK(&dev->theadwork,__rkusb_thread_work);
             register_undef_hook(&rkusb_arm_break_hook);
             _rkusb_dev=dev;

#ifdef RK28_PRINT       /* 20100324,HSL@RK,open while debug. */
             rk28_system_crash = RKDBG_CUSTOMER0;
#endif             

             /*XXXX:20100324,HSL@RK,open debug here for 产线测试!!*/
             /* 正常情况下,应该关闭!*/
//             rk28_system_crash = RKDBG_CUSTOMER1;
             
             return 0;
}
/*
 * Register handler and create status file in /proc/cpu
 * Invoked as late_initcall, since not needed before init spawned.
 */
static int __init swp_emulation_init(void)
{
#ifdef CONFIG_PROC_FS
	if (!proc_create("cpu/swp_emulation", S_IRUGO, NULL, &proc_status_fops))
		return -ENOMEM;
#endif /* CONFIG_PROC_FS */

	printk(KERN_NOTICE "Registering SWP/SWPB emulation handler\n");
	register_undef_hook(&swp_hook);

	return 0;
}
Пример #5
0
/*
 * Register handler and create status file in /proc/cpu
 * Invoked as late_initcall, since not needed before init spawned.
 */
static int __init swp_emulation_init(void)
{
	if (cpu_architecture() < CPU_ARCH_ARMv7)
		return 0;

#ifdef CONFIG_PROC_FS
	if (!proc_create("cpu/swp_emulation", S_IRUGO, NULL, &proc_status_fops))
		return -ENOMEM;
#endif /* CONFIG_PROC_FS */

	pr_notice("Registering SWP/SWPB emulation handler\n");
	register_undef_hook(&swp_hook);

	return 0;
}
/*
 * Register handler and create status file in /proc/cpu
 * Invoked as late_initcall, since not needed before init spawned.
 */
static int __init swp_emulation_init(void)
{
#ifdef CONFIG_PROC_FS
	struct proc_dir_entry *res;

	res = create_proc_entry("cpu/swp_emulation", S_IRUGO, NULL);

	if (!res)
		return -ENOMEM;

	res->read_proc = proc_read_status;
#endif /* CONFIG_PROC_FS */

	printk(KERN_NOTICE "Registering SWP/SWPB emulation handler\n");
	register_undef_hook(&swp_hook);

	return 0;
}