Messages in this thread | | | Date | Tue, 8 Jun 2004 22:52:09 -0400 (EDT) | From | Zwane Mwaikambo <> | Subject | Re: [PATCH 2.6.6-rc2 RFT] Add's class support to cpuid.c |
| |
On Tue, 8 Jun 2004, Hanna Linder wrote:
> +static void cpuid_class_simple_device_remove(void) > +{ > + int i = 0; > + for_each_online_cpu(i) > + class_simple_device_remove(MKDEV(CPUID_MAJOR, i)); > + return; > +}
My understanding is that the above removes the class for each online cpu.
> +static int __devinit cpuid_class_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) > +{ > + unsigned int cpu = (unsigned long)hcpu; > + > + switch(action) { > + case CPU_ONLINE: > + cpuid_class_simple_device_add(cpu); > + break; > + case CPU_DEAD: > + cpuid_class_simple_device_remove(); > + break;
So the above will remove the class for all online processors when one processor goes down? By the way, you can use i386 SMP to test cpu hotplug code paths.
Zwane
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |