From: Suresh Siddha <suresh.b.siddha@intel.com>
To: "H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@elte.hu>,
Thomas Gleixner <tglx@linutronix.de>
Cc: LKML <linux-kernel@vger.kernel.org>,
Suresh Siddha <suresh.b.siddha@intel.com>
Subject: [patch 3/3] x86, x2apic: simplify apic init in SMP and UP builds
Date: Fri, 27 Aug 2010 11:09:50 -0700 [thread overview]
Message-ID: <20100827181049.173087246@sbsiddha-MOBL3.sc.intel.com> (raw)
In-Reply-To: <20100827181049.013051492@sbsiddha-MOBL3.sc.intel.com>
[-- Attachment #1: cleanup_enable_IR_seq.patch --]
[-- Type: text/plain, Size: 2025 bytes --]
Move enable_IR_x2apic() inside the default_setup_apic_routing()
And for smp platforms, move the default_setup_apic_routing() after
smp_sanity_check(). This cleans up the code that tries to avoid multiple
calls to default_setup_apic_routing() when smp_sanity_check() fails (which
goes through the APIC_init_uniprocessor() path)
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
---
arch/x86/kernel/apic/apic.c | 3 ---
arch/x86/kernel/apic/probe_64.c | 3 +++
arch/x86/kernel/smpboot.c | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
Index: tip/arch/x86/kernel/apic/apic.c
===================================================================
--- tip.orig/arch/x86/kernel/apic/apic.c
+++ tip/arch/x86/kernel/apic/apic.c
@@ -1665,10 +1665,7 @@ int __init APIC_init_uniprocessor(void)
}
#endif
-#ifndef CONFIG_SMP
- enable_IR_x2apic();
default_setup_apic_routing();
-#endif
verify_local_APIC();
connect_bsp_APIC();
Index: tip/arch/x86/kernel/apic/probe_64.c
===================================================================
--- tip.orig/arch/x86/kernel/apic/probe_64.c
+++ tip/arch/x86/kernel/apic/probe_64.c
@@ -54,6 +54,9 @@ static int apicid_phys_pkg_id(int initia
*/
void __init default_setup_apic_routing(void)
{
+
+ enable_IR_x2apic();
+
#ifdef CONFIG_X86_X2APIC
if (x2apic_mode
#ifdef CONFIG_X86_UV
Index: tip/arch/x86/kernel/smpboot.c
===================================================================
--- tip.orig/arch/x86/kernel/smpboot.c
+++ tip/arch/x86/kernel/smpboot.c
@@ -1107,8 +1107,6 @@ void __init native_smp_prepare_cpus(unsi
}
set_cpu_sibling_map(0);
- enable_IR_x2apic();
- default_setup_apic_routing();
if (smp_sanity_check(max_cpus) < 0) {
printk(KERN_INFO "SMP disabled\n");
@@ -1116,6 +1114,8 @@ void __init native_smp_prepare_cpus(unsi
goto out;
}
+ default_setup_apic_routing();
+
preempt_disable();
if (read_apic_id() != boot_cpu_physical_apicid) {
panic("Boot APIC ID in local APIC unexpected (%d vs %d)",
next prev parent reply other threads:[~2010-08-27 18:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-27 18:09 [patch 1/3] x86, intr-remap: set redirection hint in the IRTE Suresh Siddha
2010-08-27 18:09 ` [patch 2/3] x86, intr-remap: remove IRTE setup duplicate code Suresh Siddha
2010-09-16 0:52 ` [tip:x86/x2apic] x86, intr-remap: Remove " tip-bot for Suresh Siddha
2010-08-27 18:09 ` Suresh Siddha [this message]
2010-09-16 0:52 ` [tip:x86/x2apic] x86, x2apic: Simplify apic init in SMP and UP builds tip-bot for Suresh Siddha
2010-08-30 1:35 ` [patch 1/3] x86, intr-remap: set redirection hint in the IRTE Weidong Han
2010-08-30 1:47 ` Weidong Han
2010-08-30 17:17 ` Suresh Siddha
2010-08-31 3:29 ` Weidong Han
2010-09-16 0:52 ` [tip:x86/x2apic] x86, intr-remap: Set " tip-bot for Suresh Siddha
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=20100827181049.173087246@sbsiddha-MOBL3.sc.intel.com \
--to=suresh.b.siddha@intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/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®