linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Chiang <achiang@hp.com>
To: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org
Cc: linux-acpi@vger.kernel.org, Alex Chiang <achiang@hp.com>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	Heiko Carstens <heiko.carstens@de.ibm.com>
Subject: [PATCH 08/14] [S390] Populate cpu_enabled_map
Date: Mon, 14 Jul 2008 20:34:25 -0600	[thread overview]
Message-ID: <20080715023425.2528.9544.stgit@blender.achiang> (raw)
In-Reply-To: <20080715023344.2528.1836.stgit@blender.achiang>

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.

Signed-off-by: Alex Chiang <achiang@hp.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
---

 arch/s390/kernel/smp.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index 5d4fa4b..f7ae20b 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -458,6 +458,7 @@ static int smp_rescan_cpus_sigp(cpumask_t avail)
 		if (!cpu_stopped(logical_cpu))
 			continue;
 		cpu_set(logical_cpu, cpu_present_map);
+		cpu_set(logical_cpu, cpu_enabled_map);
 		smp_cpu_state[logical_cpu] = CPU_STATE_CONFIGURED;
 		logical_cpu = next_cpu(logical_cpu, avail);
 		if (logical_cpu == NR_CPUS)
@@ -490,6 +491,7 @@ static int smp_rescan_cpus_sclp(cpumask_t avail)
 		__cpu_logical_map[logical_cpu] = cpu_id;
 		smp_cpu_polarization[logical_cpu] = POLARIZATION_UNKNWN;
 		cpu_set(logical_cpu, cpu_present_map);
+		cpu_set(logical_cpu, cpu_enabled_map);
 		if (cpu >= info->configured)
 			smp_cpu_state[logical_cpu] = CPU_STATE_STANDBY;
 		else
@@ -844,6 +846,7 @@ void __init smp_prepare_boot_cpu(void)
 
 	current_thread_info()->cpu = 0;
 	cpu_set(0, cpu_present_map);
+	cpu_set(0, cpu_enabled_map);
 	cpu_set(0, cpu_online_map);
 	S390_lowcore.percpu_offset = __per_cpu_offset[0];
 	current_set[0] = current;
@@ -1104,8 +1107,10 @@ int __ref smp_rescan_cpus(void)
 	cpus_andnot(newcpus, cpu_present_map, newcpus);
 	for_each_cpu_mask(cpu, newcpus) {
 		rc = smp_add_present_cpu(cpu);
-		if (rc)
+		if (rc) {
 			cpu_clear(cpu, cpu_present_map);
+			cpu_clear(cpu, cpu_enabled_map);
+		}
 	}
 	rc = 0;
 out:


  parent reply	other threads:[~2008-07-15  2:34 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
2008-07-16  1:04     ` Alex Chiang
2008-07-15  2:34 ` Alex Chiang [this message]
2008-07-15  2:34   ` [PATCH 08/14] [S390] " 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=20080715023425.2528.9544.stgit@blender.achiang \
    --to=achiang@hp.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=schwidefsky@de.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).