Example #1
0
/* Need to know about CPUs going up/down? */
int __ref register_cpu_notifier(struct notifier_block *nb)
{
	int ret;

#ifdef MTK_CPU_HOTPLUG_DEBUG
	static int index = 0;
 #ifdef CONFIG_KALLSYMS
	char namebuf[128] = {0};
	const char *symname;
	
	symname = kallsyms_lookup((unsigned long)nb->notifier_call, NULL, NULL, NULL, namebuf);
	if (symname) 
		printk("[cpu_ntf] <%02d>%08lx (%s)\n", index++, (unsigned long)nb->notifier_call, symname);
	else
		printk("[cpu_ntf] <%02d>%08lx\n", index++, (unsigned long)nb->notifier_call);
 #else //#ifdef CONFIG_KALLSYMS
	printk("[cpu_ntf] <%02d>%08lx\n", index++, (unsigned long)nb->notifier_call);
 #endif //#ifdef CONFIG_KALLSYMS
#endif //#ifdef MTK_CPU_HOTPLUG_DEBUG

	cpu_maps_update_begin();
	ret = raw_notifier_chain_register(&cpu_chain, nb);
	cpu_maps_update_done();
	return ret;
}
Example #2
0
/* Need to know about CPUs going up/down? */
int __ref register_cpu_notifier(struct notifier_block *nb)
{
	int ret;
	cpu_maps_update_begin();
	ret = raw_notifier_chain_register(&cpu_chain, nb);
	cpu_maps_update_done();
	return ret;
}
void ipcs_cp_notifier_register(struct notifier_block *nb)
{
	/* lock serializes against cp_running value changing */
	spin_lock_bh(&cp_state_notifier_lock);
	raw_notifier_chain_register(&cp_state_notifier_list, nb);
	if (cp_running && nb != NULL)
		nb->notifier_call(nb, IPC_CPSTATE_RUNNING, NULL);
	spin_unlock_bh(&cp_state_notifier_lock);
}
/*
 * Grade notification chain
 */
int tegra_register_simon_notifier(struct notifier_block *nb)
{
	int ret;

	mutex_lock(&simon_lock);
	ret = raw_notifier_chain_register(&simon_nh, nb);
	mutex_unlock(&simon_lock);
	return ret;
}
Example #5
0
int process_notifier_register(struct notifier_block *nb)
{
	int result;
	unsigned long flags;

	write_lock_irqsave(&notifier_lock, flags);
	result = raw_notifier_chain_register(&notifier_list, nb);
	write_unlock_irqrestore(&notifier_lock, flags);
	return result;
}
Example #6
0
/**
 * clockevents_register_notifier - register a clock events change listener
 */
int clockevents_register_notifier(struct notifier_block *nb)
{
	int ret;

	spin_lock(&clockevents_lock);
	ret = raw_notifier_chain_register(&clockevents_chain, nb);
	spin_unlock(&clockevents_lock);

	return ret;
}
/**
 * clockevents_register_notifier - register a clock events change listener
 */
int clockevents_register_notifier(struct notifier_block *nb)
{
	unsigned long flags;
	int ret;

	raw_spin_lock_irqsave(&clockevents_lock, flags);
	ret = raw_notifier_chain_register(&clockevents_chain, nb);
	raw_spin_unlock_irqrestore(&clockevents_lock, flags);

	return ret;
}
Example #8
0
int cpu_pm_register_notifier(struct notifier_block *nb)
{
	unsigned long flags;
	int ret;

	write_lock_irqsave(&cpu_pm_notifier_lock, flags);
	ret = raw_notifier_chain_register(&cpu_pm_notifier_chain, nb);
	write_unlock_irqrestore(&cpu_pm_notifier_lock, flags);

	return ret;
}
Example #9
0
/*
 *  register a modem events change listener
 */
int modem_register_notifier(struct notifier_block *nb)
{
	int ret = -ENODEV;
	unsigned long flags;

    if(vmdata){
	    raw_spin_lock_irqsave(&rslock, flags);
	    ret = raw_notifier_chain_register(&vmdata->ntf, nb);
	    raw_spin_unlock_irqrestore(&rslock, flags);
    }
	return ret;
}
Example #10
0
int register_modem_state_notifier(struct notifier_block *nb)
{
	return raw_notifier_chain_register(&modem_state_chain, nb);
}
Example #11
0
void xen_resume_notifier_register(struct notifier_block *nb)
{
	raw_notifier_chain_register(&xen_resume_notifier, nb);
}
Example #12
0
int register_busfreq_notifier(struct notifier_block *nb)
{
	return raw_notifier_chain_register(&busfreq_notifier_chain, nb);
}
Example #13
0
int __ref register_proc_cpuinfo_notifier(struct notifier_block *nb)
{
    return raw_notifier_chain_register(&proc_cpuinfo_chain, nb);
}
Example #14
0
File: cpu.c Project: borkmann/kasan
int __ref __register_cpu_notifier(struct notifier_block *nb)
{
	return raw_notifier_chain_register(&cpu_chain, nb);
}
Example #15
0
int blocking_notifier_chain_register(struct blocking_notifier_head *nh,
                                     struct notifier_block *n)
{
	return raw_notifier_chain_register((struct raw_notifier_head *)nh, n);
}
Example #16
0
int register_fake_shut_down_notifier(struct notifier_block *nb)
{
	return raw_notifier_chain_register(&fsd_notifier_list, nb);
}
Example #17
0
int dsa_switch_register_notifier(struct dsa_switch *ds)
{
	ds->nb.notifier_call = dsa_switch_event;

	return raw_notifier_chain_register(&ds->dst->nh, &ds->nb);
}
Example #18
0
static void register_listen_notifier(struct notifier_block *nb)
{
	mutex_lock(&notify_mutex);
	raw_notifier_chain_register(&listen_notify_list, nb);
	mutex_unlock(&notify_mutex);
}
int __ref register_cp_crash_notifier(struct notifier_block *nb)
{
	return raw_notifier_chain_register(&cp_crash_notifier, nb);
}
Example #20
0
int visdn_register_notifier(struct notifier_block *nb)
{
    return raw_notifier_chain_register(&visdn_notify_chain, nb);
}