From: Igor Mammedov <imammedo@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com,
x86@kernel.org, imammedo@redhat.com, bp@suse.de,
paul.gortmaker@windriver.com, JBeulich@suse.com,
prarit@redhat.com, drjones@redhat.com, toshi.kani@hp.com,
riel@redhat.com, gong.chen@linux.intel.com
Subject: [PATCH v2 2/5] x86: cleanup not needed cpu_initialized_mask
Date: Mon, 31 Mar 2014 22:09:22 +0200 [thread overview]
Message-ID: <1396296565-19709-3-git-send-email-imammedo@redhat.com> (raw)
In-Reply-To: <1396296565-19709-1-git-send-email-imammedo@redhat.com>
cpu_initialized_mask is used in cpu_init() for detecting
if AP has been already started. But now test could never
return true since master CPU doesn't give up waiting on
AP startup and native_cpu_up() checks for:
physid_isset(apicid, phys_cpu_present_map) &&
cpu_callin_mask
so that it would not attempt to call do_boot_cpu() on
already started AP.
And since cpu_initialized_mask isn't used for anything
else just remove it altogether.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
arch/x86/include/asm/cpumask.h | 1 -
arch/x86/kernel/cpu/common.c | 11 -----------
arch/x86/kernel/smpboot.c | 2 --
3 files changed, 0 insertions(+), 14 deletions(-)
diff --git a/arch/x86/include/asm/cpumask.h b/arch/x86/include/asm/cpumask.h
index 61c852f..c64c5f5 100644
--- a/arch/x86/include/asm/cpumask.h
+++ b/arch/x86/include/asm/cpumask.h
@@ -5,7 +5,6 @@
extern cpumask_var_t cpu_callin_mask;
extern cpumask_var_t cpu_callout_mask;
-extern cpumask_var_t cpu_initialized_mask;
extern cpumask_var_t cpu_sibling_setup_mask;
extern void setup_cpu_local_masks(void);
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 248161e..7dfac93 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -47,7 +47,6 @@
#include "cpu.h"
/* all of these masks are initialized in setup_cpu_local_masks() */
-cpumask_var_t cpu_initialized_mask;
cpumask_var_t cpu_callout_mask;
cpumask_var_t cpu_callin_mask;
@@ -57,7 +56,6 @@ cpumask_var_t cpu_sibling_setup_mask;
/* correctly size the local cpu masks */
void __init setup_cpu_local_masks(void)
{
- alloc_bootmem_cpumask_var(&cpu_initialized_mask);
alloc_bootmem_cpumask_var(&cpu_callin_mask);
alloc_bootmem_cpumask_var(&cpu_callout_mask);
alloc_bootmem_cpumask_var(&cpu_sibling_setup_mask);
@@ -1262,9 +1260,6 @@ void cpu_init(void)
me = current;
- if (cpumask_test_and_set_cpu(cpu, cpu_initialized_mask))
- panic("CPU#%d already initialized!\n", cpu);
-
pr_debug("Initializing CPU#%d\n", cpu);
clear_in_cr4(X86_CR4_VME|X86_CR4_PVI|X86_CR4_TSD|X86_CR4_DE);
@@ -1350,12 +1345,6 @@ void cpu_init(void)
show_ucode_info_early();
- if (cpumask_test_and_set_cpu(cpu, cpu_initialized_mask)) {
- printk(KERN_WARNING "CPU#%d already initialized!\n", cpu);
- for (;;)
- local_irq_enable();
- }
-
printk(KERN_INFO "Initializing CPU#%d\n", cpu);
if (cpu_has_vme || cpu_has_tsc || cpu_has_de)
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 8bf67bd..803f658 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1237,8 +1237,6 @@ static void __ref remove_cpu_from_maps(int cpu)
set_cpu_online(cpu, false);
cpumask_clear_cpu(cpu, cpu_callout_mask);
cpumask_clear_cpu(cpu, cpu_callin_mask);
- /* was set by cpu_init() */
- cpumask_clear_cpu(cpu, cpu_initialized_mask);
numa_remove_cpu(cpu);
}
--
1.7.1
next prev parent reply other threads:[~2014-03-31 20:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-31 20:09 [PATCH v2 0/5] x86: fix hang when AP bringup is too slow Igor Mammedov
2014-03-31 20:09 ` [PATCH v2 1/5] x86: replace timeouts when booting secondary CPU with infinite wait loop Igor Mammedov
2014-04-02 17:15 ` Andi Kleen
2014-04-02 21:29 ` Igor Mammedov
2014-04-02 23:48 ` Andi Kleen
2014-04-03 6:43 ` Ingo Molnar
2014-04-03 21:03 ` Andi Kleen
2014-03-31 20:09 ` Igor Mammedov [this message]
2014-03-31 20:09 ` [PATCH v2 3/5] x86: log error on secondary CPU wakeup failure at ERR level Igor Mammedov
2014-03-31 20:09 ` [PATCH v2 4/5] x86: fix list corruption on CPU hotplug Igor Mammedov
2014-03-31 20:09 ` [PATCH v2 5/5] x86: fix memory corruption in acpi_unmap_lsapic() Igor Mammedov
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=1396296565-19709-3-git-send-email-imammedo@redhat.com \
--to=imammedo@redhat.com \
--cc=JBeulich@suse.com \
--cc=bp@suse.de \
--cc=drjones@redhat.com \
--cc=gong.chen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=paul.gortmaker@windriver.com \
--cc=prarit@redhat.com \
--cc=riel@redhat.com \
--cc=tglx@linutronix.de \
--cc=toshi.kani@hp.com \
--cc=x86@kernel.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
all inboxes | Powered by JetHome®