(pxm >= 256) )
return -EINVAL;
- if ( !cpu_hotplug_begin() )
- return -EBUSY;
+ cpu_hotplug_begin();
/* Detect if the cpu has been added before */
if ( x86_acpiid_to_apicid[acpi_id] != BAD_APICID )
read_unlock(&cpu_add_remove_lock);
}
-bool cpu_hotplug_begin(void)
+void cpu_hotplug_begin(void)
{
- return write_trylock(&cpu_add_remove_lock);
+ write_lock(&cpu_add_remove_lock);
}
void cpu_hotplug_done(void)
void __init register_cpu_notifier(struct notifier_block *nb)
{
- if ( !write_trylock(&cpu_add_remove_lock) )
- BUG(); /* Should never fail as we are called only during boot. */
+ write_lock(&cpu_add_remove_lock);
notifier_chain_register(&cpu_chain, nb);
write_unlock(&cpu_add_remove_lock);
}
int err;
struct notifier_block *nb = NULL;
- if ( !cpu_hotplug_begin() )
- return -EBUSY;
+ cpu_hotplug_begin();
err = -EINVAL;
if ( (cpu >= nr_cpu_ids) || (cpu == 0) )
int err;
struct notifier_block *nb = NULL;
- if ( !cpu_hotplug_begin() )
- return -EBUSY;
+ cpu_hotplug_begin();
err = -EINVAL;
if ( (cpu >= nr_cpu_ids) || !cpu_present(cpu) )
void put_cpu_maps(void);
/* Safely perform CPU hotplug and update cpu_online_map, etc. */
-bool cpu_hotplug_begin(void);
+void cpu_hotplug_begin(void);
void cpu_hotplug_done(void);
/* Receive notification of CPU hotplug events. */