linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Paul Mackerras <paulus@samba.org>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] Fix per-cpu allocation on oldworld SMP powermacs
Date: Fri, 08 Jun 2007 08:26:02 +1000	[thread overview]
Message-ID: <1181255162.14818.79.camel@localhost.localdomain> (raw)
In-Reply-To: <18023.64811.643218.556485@cargo.ozlabs.ibm.com>

On Thu, 2007-06-07 at 22:42 +1000, Paul Mackerras wrote:
> diff --git a/arch/powerpc/platforms/powermac/setup.c
> b/arch/powerpc/platforms/powermac/setup.c
> index 07b1c4e..c519b2a 100644
> --- a/arch/powerpc/platforms/powermac/setup.c
> +++ b/arch/powerpc/platforms/powermac/setup.c
> @@ -363,8 +363,19 @@ static void __init pmac_setup_arch(void)
>                 smp_ops = &core99_smp_ops;
>         }
>  #ifdef CONFIG_PPC32
> -       else
> +       else {
> +               /*
> +                * We have to set bits in cpu_possible_map here since
> the
> +                * secondary CPU(s) aren't in the device tree, and
> +                * setup_per_cpu_areas only allocates per-cpu data for
> +                * CPUs in the cpu_possible_map.
> +                */
> +               int cpu;
> +
> +               for (cpu = 1; cpu < 4 && cpu < NR_CPUS; ++cpu)
> +                       cpu_set(cpu, cpu_possible_map);
>                 smp_ops = &psurge_smp_ops;
> +       }
>  #endif
>  #endif /* CONFIG_SMP */ 

Why not use the result from probe() instead which returns the number of
possible CPUs ? That would catch more than just the powermac case ... we
might have similar issues when finally porting PReP over...

Ben.

      reply	other threads:[~2007-06-07 22:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-07 12:42 [PATCH] Fix per-cpu allocation on oldworld SMP powermacs Paul Mackerras
2007-06-07 22:26 ` Benjamin Herrenschmidt [this message]

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=1181255162.14818.79.camel@localhost.localdomain \
    --to=benh@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    --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).