Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S265510AbUFICuc (ORCPT ); Tue, 8 Jun 2004 22:50:32 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S265512AbUFICuc (ORCPT ); Tue, 8 Jun 2004 22:50:32 -0400 Received: from dragnfire.mtl.istop.com ([66.11.160.179]:29432 "EHLO dsl.commfireservices.com") by vger.kernel.org with ESMTP id S265510AbUFICua (ORCPT ); Tue, 8 Jun 2004 22:50:30 -0400 Date: Tue, 8 Jun 2004 22:52:09 -0400 (EDT) From: Zwane Mwaikambo To: Hanna Linder Cc: Greg KH , "H. Peter Anvin" , linux-kernel@vger.kernel.org Subject: Re: [PATCH 2.6.6-rc2 RFT] Add's class support to cpuid.c In-Reply-To: <10660000.1086732946@dyn318071bld.beaverton.ibm.com> Message-ID: References: <98460000.1086215543@dyn318071bld.beaverton.ibm.com> <40BE6CA9.9030403@zytor.com> <20040603193256.GD23564@kroah.com> <7430000.1086729016@dyn318071bld.beaverton.ibm.com> <10660000.1086732946@dyn318071bld.beaverton.ibm.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1032 Lines: 35 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/