linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: linas@austin.ibm.com (Linas Vepstas)
To: Nathan Lynch <ntl@pobox.com>
Cc: linuxppc-dev@ozlabs.org, paulus@samba.org
Subject: Re: [PATCH]: PowerPC: make sure the rtas stop-self token is defined.
Date: Fri, 10 Nov 2006 19:01:08 -0600	[thread overview]
Message-ID: <20061111010108.GX30625@austin.ibm.com> (raw)
In-Reply-To: <20061110200152.GC23089@localdomain>

On Fri, Nov 10, 2006 at 02:01:52PM -0600, Nathan Lynch wrote:
> Linas Vepstas wrote:
> > 
> > There are a variety of code paths that lead to rtas_stop_self()
> > being called, primarily through cpu_die(). However, rtas_stop_self() 
> > has a BUG_ON(rtas_args->token == RTAS_UNKNOWN_SERVICE); in it, and
> > this rtas token is only set up if CONFIG_HOTPLUG_CPU is defined.
> > 
> > Rather than wrapping all of the callers of rtas_stop_self()
> > with CONFIG_HOTPLUG_CPU, it seems wiser to just unwrap the token
> > definition.
> 
> Is there actually a code path that calls rtas_stop_self with
> CONFIG_HOTPLUG_CPU=n?  That would be a bug, I think.

Yeah, that was my first reaction too, right next to "user error". 
But then I started tracing the code paths, and after they multiplied
a bit, it was clear that the answer wouldn't be clear. 

So then I philosophized a bit: if the code cannot be called
unless CONFIG_HOTPLUG_CPU=y, then I should add #ifdef CONFIG_HOTPLUG_CPU
to make sure that the code doesn't even get compiled in.

Well, there used to be such ifdefs (according to Joel) but someone 
removed the ifdefs. I'm guessing that these got removed during the
powerpc tree migration.

So... Rather than wrapping all of the callers of rtas_stop_self() ...

--linas

  reply	other threads:[~2006-11-11  1:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-10 18:22 [PATCH]: PowerPC: make sure the rtas stop-self token is defined Linas Vepstas
2006-11-10 20:01 ` Nathan Lynch
2006-11-11  1:01   ` Linas Vepstas [this message]
2006-11-13  0:32     ` Michael Ellerman
2006-11-13  6:21       ` jschopp
2006-11-13 18:05         ` Linas Vepstas
2006-11-14  1:17           ` Michael Ellerman
2006-11-15 18:08             ` Linas Vepstas
2006-11-10 23:55 ` Paul Mackerras
2006-11-11  0:52   ` Linas Vepstas
2006-11-13 18:57     ` Nathan Lynch
2006-11-13 19:39       ` 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=20061111010108.GX30625@austin.ibm.com \
    --to=linas@austin.ibm.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=ntl@pobox.com \
    --cc=paulus@samba.org \
    /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).