Re: [RFC/PATCH 1/4] dynamic cpu registration - core changes
From: Nathan Lynch
Date: Mon Nov 08 2004 - 22:47:31 EST
On Thu, 2004-11-04 at 17:51 -0800, Ashok Raj wrote:
> On Sun, Oct 24, 2004 at 05:42:17AM -0400, Nathan Lynch wrote:
> > + /* XXX FIXME: cpu->no_control is always zero...
> > + * Maybe should introduce an arch-overridable "hotpluggable" map.
> > + */
> Iam getting obsessed with these __attribute__((weak)) these days...:-)
> simple solution seems like you can have a platform_prefilter() and post_filter() declared
> in the core with weak atteibute, and let the platform that cares about this provide an override
> function. So if you need to hang off additional files for platform this can be handy. so for
> ppc64, based on LPAR or not, you can add these no_control flag before the file is created?
I'm not sure using weak symbols is the way to take care of the
'no_control' field. I think having the arch implement a
__register_cpu(struct cpu*) helper which sets the the 'no_control'
attribute should be sufficient. E.g. IA64 and i386 implementations of
__register_cpu would set no_control=1 if the cpu is the boot processor.
With respect to the general issue of adding sysfs attributes to the cpu
devices, that's simply a matter of coding up a sysdev_driver as I did in
the node and ppc64 code in the other patches.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/