Re: 2.6.25-rc9 -- INFO: possible circular locking dependency detected

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Gautham R Shenoy
Date: Tuesday, April 15, 2008 - 6:52 am

On Mon, Apr 14, 2008 at 09:35:39PM +0200, Heiko Carstens wrote:

Ah, okay. Thanks for the explanation.
So how about having a new API,
something along the lines of:

kernel/cpu.c
------------------------------------------------------
register_hot_cpu_notifier_init(notifier_name, driver_hotcpu_init_function)
{
	mutex_lock(&cpu_add_remove_lock);
	get_online_cpus();
	__register_hot_cpu_notifier(notifier_name);
	driver_hotcpu_init_function();
	put_online_cpus();
	mutex_unlock(&cpu_add_remove_lock);
}

drivers/mydriver.c
--------------------------------------------------------------
driver_hotcpu_init_function()
{
	for_each_online_cpus()
		perform_subsystem_hotcpu_initialization();
}


driver_init()
{
	register_hotcpu_notifier_init(notifier_name,
			driver_hotcpu_init_function);
}



-- 
Thanks and Regards
gautham
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: 2.6.25-rc9 -- INFO: possible circular locking dependen ..., Gautham R Shenoy, (Tue Apr 15, 6:52 am)