linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <michael@ellerman.id.au>
To: linuxppc-dev@ozlabs.org
Cc: srinivasa@in.ibm.com, ntl@pobox.com,
	Anton Blanchard <anton@samba.org>,
	paulus@samba.org, ego@in.ibm.com
Subject: Re: [PATCH] Reorganise and then fixup the pseries cpu hotplug code
Date: Fri, 17 Nov 2006 14:59:47 +1100	[thread overview]
Message-ID: <1163735987.16815.42.camel@localhost.localdomain> (raw)
In-Reply-To: <20061117033638.0E24B67BCE@ozlabs.org>

[-- Attachment #1: Type: text/plain, Size: 2130 bytes --]

On Fri, 2006-11-17 at 14:36 +1100, Michael Ellerman wrote:
> The pseries cpu hotplug code is currently spread between ./kernel/rtas.c,
> ./platforms/pseries/smp.c and ./platforms/pseries/setup.c. Some of it is
> not #ifdef CONFIG_HOTPLUG_CPU, but it should be.
> 
> So move all the cpu hotplug code into platforms/pseries/hotplug-cpu.c
> While we're moving, rename studly caps functions to normal caps, they're
> all static so no harm done. Fixup some long lines also, and make things
> static that can be, now we're all in the same file.
> 
> Currently we unconditionally hookup pSeries_mach_cpu_die to ppc_md.cpu_die,
> even if we don't have CONFIG_HOTPLUG_CPU enabled. This is wrong, as it
> signals the sysfs code to create the online attribute for cpu nodes,
> allowing the user to attempt an offline when it's not actually supported.
> 
> There is also a problem on systems that don't have the correct RTAS tokens
> available to do RTAS-based cpu hotplug, we still indicate via sysfs that
> we support cpu hotplug - and then attempt to do so with missing RTAS tokens.
> 
> Both problems are solved by conditionally registering the cpu hotplug
> callbacks, only when CONFIG_HOTPLUG_CPU is enabled, and only after we've
> found the requisite RTAS tokens.
> 
> Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
> ---
> 
> OK, what do people think of this? I think it solves the problems we've
> seen lately. This supersedes Linas patch to wrap the pSeries bits in
> CONFIG_HOTPLUG_CPU.
> 
> I haven't tested this - if someone can that'd be great - otherwise I'll
> have a go on Monday.

I should add .. The callbacks now get setup in an arch_initcall() - this
is not as early, by a long shot, as it used to be - however AFAICT it
should make no difference as there's no way to trigger a cpu hotplug
until later on anyway.

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

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2006-11-17  3:59 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-16 14:39 [RFC] [PATCH] cpu hotplug on power based systems Srinivasa Ds
2006-11-16 15:40 ` Nathan Lynch
2006-11-16 21:02   ` Linas Vepstas
2006-11-17  3:36   ` [PATCH] Reorganise and then fixup the pseries cpu hotplug code Michael Ellerman
2006-11-17  3:59     ` Michael Ellerman [this message]
2006-11-17  4:31     ` Stephen Rothwell
2006-11-17  4:44       ` Michael Ellerman
2006-11-17  5:02         ` Stephen Rothwell
2006-11-17 18:11         ` Linas Vepstas
2006-11-20  0:44           ` Michael Ellerman
2006-11-17 18:04     ` Linas Vepstas
2006-11-20  1:08       ` Michael Ellerman
2006-11-20  4:22         ` jschopp
2006-11-20  5:59           ` Michael Ellerman
2006-11-21 16:43             ` Nathan Lynch
  -- strict thread matches above, loose matches on Subject: below --
2006-11-23  2:11 Michael Ellerman
2006-11-24 11:03 ` Srinivasa Ds
2006-11-27  8:13 ` Srinivasa Ds
2006-11-27 21:10 ` Linas Vepstas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1163735987.16815.42.camel@localhost.localdomain \
    --to=michael@ellerman.id.au \
    --cc=anton@samba.org \
    --cc=ego@in.ibm.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=ntl@pobox.com \
    --cc=paulus@samba.org \
    --cc=srinivasa@in.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).