lkml.org 
[lkml]   [2004]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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/

\
 
 \ /
  Last update: 2005-03-22 14:03    [W:0.077 / U:2.836 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site