From: Wei Jiangang <weijg.fnst@cn.fujitsu.com>
To: <linux-kernel@vger.kernel.org>
Cc: <x86@kernel.org>, <tglx@linutronix.de>, <mingo@redhat.com>,
<hpa@zytor.com>, <bp@suse.de>,
Wei Jiangang <weijg.fnst@cn.fujitsu.com>
Subject: [PATCH 1/2] x86/smpboot: Check APIC ID before setting up default routing
Date: Wed, 17 Aug 2016 14:42:51 +0800 [thread overview]
Message-ID: <1471416172-9463-1-git-send-email-weijg.fnst@cn.fujitsu.com> (raw)
Check the boot APIC ID firstly,
and then setup the default routing of APIC looks better.
And move default_setup_apic_routing() close to apic_bsp_setup(),
which staying in step with the codes in APIC_init_uniprocessor().
Signed-off-by: Wei Jiangang <weijg.fnst@cn.fujitsu.com>
---
arch/x86/kernel/smpboot.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 2a6e84a30a54..8216b997c1c9 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1316,14 +1316,13 @@ void __init native_smp_prepare_cpus(unsigned int max_cpus)
break;
}
- default_setup_apic_routing();
-
if (read_apic_id() != boot_cpu_physical_apicid) {
panic("Boot APIC ID in local APIC unexpected (%d vs %d)",
read_apic_id(), boot_cpu_physical_apicid);
/* Or can we switch back to PIC here? */
}
+ default_setup_apic_routing();
cpu0_logical_apicid = apic_bsp_setup(false);
pr_info("CPU%d: ", 0);
--
1.9.3
next reply other threads:[~2016-08-17 6:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-17 6:42 Wei Jiangang [this message]
2016-08-17 6:42 ` [PATCH 2/2] x86/apic: Update comment about disabling processor focus Wei Jiangang
2016-08-18 9:47 ` [PATCH 1/2] x86/smpboot: Check APIC ID before setting up default routing Ingo Molnar
2016-08-18 10:15 ` Wei, Jiangang
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=1471416172-9463-1-git-send-email-weijg.fnst@cn.fujitsu.com \
--to=weijg.fnst@cn.fujitsu.com \
--cc=bp@suse.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--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®