linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Alex Chiang <achiang@hp.com>
Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
	linux-acpi@vger.kernel.org, Paul Mackerras <paulus@samba.org>
Subject: Re: [PATCH 07/14] [POWERPC] Populate cpu_enabled_map
Date: Tue, 15 Jul 2008 15:51:35 +1000	[thread overview]
Message-ID: <1216101095.7740.74.camel@pasglop> (raw)
In-Reply-To: <20080715023420.2528.44404.stgit@blender.achiang>

On Mon, 2008-07-14 at 20:34 -0600, Alex Chiang wrote:
> Populate the cpu_enabled_map correctly.
> 
> Note that this patch does not actually make any decisions based
> on the contents of the map.
> 
> However, as the map is presented via sysfs in:
> 
> 	/sys/devices/system/cpu/
> 
> It should be populated correctly.

Care to educate me on the difference between online_map and
enabled_map ?

Cheers,
Ben.

> Signed-off-by: Alex Chiang <achiang@hp.com>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
> 
>  arch/powerpc/kernel/setup-common.c           |    1 +
>  arch/powerpc/platforms/powermac/smp.c        |    1 +
>  arch/powerpc/platforms/pseries/hotplug-cpu.c |    2 ++
>  3 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
> index db540ea..a4c894a 100644
> --- a/arch/powerpc/kernel/setup-common.c
> +++ b/arch/powerpc/kernel/setup-common.c
> @@ -413,6 +413,7 @@ void __init smp_setup_cpu_maps(void)
>  			DBG("    thread %d -> cpu %d (hard id %d)\n",
>  			    j, cpu, intserv[j]);
>  			cpu_set(cpu, cpu_present_map);
> +			cpu_set(cpu, cpu_enabled_map);
>  			set_hard_smp_processor_id(cpu, intserv[j]);
>  			cpu_set(cpu, cpu_possible_map);
>  			cpu++;
> diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c
> index cb2d894..a74dada 100644
> --- a/arch/powerpc/platforms/powermac/smp.c
> +++ b/arch/powerpc/platforms/powermac/smp.c
> @@ -317,6 +317,7 @@ static int __init smp_psurge_probe(void)
>  		ncpus = NR_CPUS;
>  	for (i = 1; i < ncpus ; ++i) {
>  		cpu_set(i, cpu_present_map);
> +		cpu_set(i, cpu_enabled_map);
>  		set_hard_smp_processor_id(i, i);
>  	}
>  
> diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c
> index 1f03248..e738b07 100644
> --- a/arch/powerpc/platforms/pseries/hotplug-cpu.c
> +++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c
> @@ -186,6 +186,7 @@ static int pseries_add_processor(struct device_node *np)
>  	for_each_cpu_mask(cpu, tmp) {
>  		BUG_ON(cpu_isset(cpu, cpu_present_map));
>  		cpu_set(cpu, cpu_present_map);
> +		cpu_set(cpu, cpu_enabled_map);
>  		set_hard_smp_processor_id(cpu, *intserv++);
>  	}
>  	err = 0;
> @@ -218,6 +219,7 @@ static void pseries_remove_processor(struct device_node *np)
>  				continue;
>  			BUG_ON(cpu_online(cpu));
>  			cpu_clear(cpu, cpu_present_map);
> +			cpu_clear(cpu, cpu_enabled_map);
>  			set_hard_smp_processor_id(cpu, -1);
>  			break;
>  		}

  reply	other threads:[~2008-07-15  5:51 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-15  2:33 [PATCH 00/14] Introduce cpu_enabled_map and friends Alex Chiang
2008-07-15  2:33 ` Alex Chiang
2008-07-15  2:33 ` [PATCH 01/14] " Alex Chiang
2008-07-15  3:15   ` Matthew Wilcox
2008-07-15 10:03     ` Andi Kleen
2008-07-15 10:03       ` Andi Kleen
2008-07-15 10:21       ` Russell King
2008-07-15 17:57         ` Alex Chiang
2008-07-15 17:57           ` Alex Chiang
2008-07-15 18:16           ` Matthew Wilcox
2008-07-15 18:16             ` Matthew Wilcox
2008-07-15 18:48             ` Russell King
2008-07-15 19:15               ` Alex Chiang
2008-07-18 21:44                 ` Russell King
2008-07-18 23:08                   ` Alex Chiang
2008-07-18 23:08                     ` Alex Chiang
2008-07-16  1:11               ` Alex Chiang
2008-07-16  1:11                 ` Alex Chiang
2008-07-15  2:33 ` [PATCH 02/14] [M32R] Populate cpu_enabled_map Alex Chiang
2008-07-15  2:33   ` Alex Chiang
2008-07-15  2:33 ` [PATCH 03/14] [ALPHA] " Alex Chiang
2008-07-15  2:33   ` Alex Chiang
2008-07-15  2:34 ` [PATCH 04/14] [ARM] " Alex Chiang
2008-07-15  2:34   ` Alex Chiang
2008-07-15  2:34 ` [PATCH 05/14] [MIPS] " Alex Chiang
2008-07-15  2:34 ` [PATCH 06/14] [PARISC] " Alex Chiang
2008-07-15  2:34 ` [PATCH 07/14] [POWERPC] " Alex Chiang
2008-07-15  5:51   ` Benjamin Herrenschmidt [this message]
2008-07-16  1:04     ` Alex Chiang
2008-07-15  2:34 ` [PATCH 08/14] [S390] " Alex Chiang
2008-07-15  2:34   ` Alex Chiang
2008-07-15  2:34 ` [PATCH 09/14] [SH] " Alex Chiang
2008-07-15  2:34   ` Alex Chiang
2008-07-15  2:34 ` [PATCH 12/14] [IA64] Populate and use cpu_enabled_map Alex Chiang
2008-07-15  2:34 ` [PATCH 13/14] [IA64] Avoid overflowing ia64_cpu_to_sapicid in acpi_map_lsapic() Alex Chiang
2008-07-15  2:34   ` Alex Chiang
2008-07-15  2:34 ` [PATCH 14/14] ACPI: Provide /sys/devices/system/cpu/cpuN/deconfigure Alex Chiang
2008-07-15  2:56 ` [PATCH 11/14] x86: Populate cpu_enabled_map Alex Chiang
2008-07-18 20:00   ` H. Peter Anvin
2008-07-18 20:00     ` H. Peter Anvin
2008-07-18 23:06     ` Alex Chiang
2008-07-15 20:10 ` [PATCH 00/14] Introduce cpu_enabled_map and friends Luck, Tony
2008-07-15 20:10   ` Luck, Tony
2008-07-15 23:54   ` Alex Chiang
2008-07-15 23:54     ` Alex Chiang

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=1216101095.7740.74.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=achiang@hp.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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).