cpumask_set_cpu(cpu, per_cpu(cpu_core_mask, cpu));
}
+static void remove_cpu_sibling_map(int cpu)
+{
+ free_cpumask_var(per_cpu(cpu_sibling_mask, cpu));
+ free_cpumask_var(per_cpu(cpu_core_mask, cpu));
+}
+
void __init
smp_clear_cpu_maps (void)
{
smp_mb();
}
+static int cpu_smpboot_callback(struct notifier_block *nfb,
+ unsigned long action,
+ void *hcpu)
+{
+ unsigned int cpu = (unsigned long)hcpu;
+
+ switch ( action )
+ {
+ case CPU_DEAD:
+ remove_cpu_sibling_map(cpu);
+ break;
+ default:
+ break;
+ }
+
+ return NOTIFY_DONE;
+}
+
+static struct notifier_block cpu_smpboot_nfb = {
+ .notifier_call = cpu_smpboot_callback,
+};
+
+static int __init cpu_smpboot_notifier_init(void)
+{
+ register_cpu_notifier(&cpu_smpboot_nfb);
+
+ return 0;
+}
+presmp_initcall(cpu_smpboot_notifier_init);
+
/*
* Local variables:
* mode: C