[PATCH] Reorganise and then fixup the pseries cpu hotplug code
Michael Ellerman
michael at ellerman.id.au
Mon Nov 20 11:44:16 EST 2006
On Fri, 2006-11-17 at 12:11 -0600, Linas Vepstas wrote:
> On Fri, Nov 17, 2006 at 03:44:00PM +1100, Michael Ellerman wrote:
> > On Fri, 2006-11-17 at 15:31 +1100, Stephen Rothwell wrote:
> > > One small nit ...
> > >
> > > On Fri, 17 Nov 2006 14:36:35 +1100 Michael Ellerman <michael at ellerman.id.au> wrote:
> > > >
> > > > +static int __init pseries_cpu_hotplug_init(void)
> > > > +{
> > > > + rtas_stop_self_args.token = rtas_token("stop-self");
> > > > + qcss_tok = rtas_token("query-cpu-stopped-state");
> > > > +
> > > > + if (rtas_stop_self_args.token == RTAS_UNKNOWN_SERVICE ||
> > > > + qcss_tok == RTAS_UNKNOWN_SERVICE)
> > > > + return 1;
> > >
> > > initcall fucntions should return 0 or -<error>; -ENODEV is ignored,
> > > other nonzero values cause a log message if initcall debugging is enabled.
> >
> > OK. I wanted to return an error, so there's something in the log to show
> > that cpu hotplug was disabled - but I didn't check what to return. I'll
> > fix it up on Monday to return -ENOENT.
>
> I presume the default config from RedHat/SuSE is to have
> CONFIG_HOTPLUG_CPU turned on. In this case, all sorts of
> pseries boxes will spew a warning. I suppose this is a
> form of subliminal advertising: "Hey Schmo, upgrade your
> box to something that supports CPU hotplug!".
Yeah the distros would have it on for everything. I'm not sure what
machines support it, but I think it'd best to have some indication in
the log that we disabled it.
I'll change it to printk, and always return success. As an aside, I
don't really see the point of having return codes from init routines if
nothing is done with them by default ... but whatever.
cheers
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20061120/19a2d866/attachment.pgp>
More information about the Linuxppc-dev
mailing list