All of lore.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Suresh Siddha <suresh.b.siddha@intel.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
	weidong.han@intel.com, youquan.song@intel.com,
	jbarnes@virtuousgeek.org, david.woodhouse@intel.com,
	suresh.b.siddha@intel.com, Jan.Grossmann@kielnet.net,
	tglx@linutronix.de, mingo@elte.hu
Subject: [tip:x86/urgent] x86: Fix double enable_IR_x2apic() call on SMP kernel on !SMP boards
Date: Fri, 2 Apr 2010 19:14:31 GMT	[thread overview]
Message-ID: <tip-472a474c6630efd195d3738339fd1bdc8aa3b1aa@git.kernel.org> (raw)
In-Reply-To: <1270083887.7835.78.camel@sbs-t61.sc.intel.com>

Commit-ID:  472a474c6630efd195d3738339fd1bdc8aa3b1aa
Gitweb:     http://git.kernel.org/tip/472a474c6630efd195d3738339fd1bdc8aa3b1aa
Author:     Suresh Siddha <suresh.b.siddha@intel.com>
AuthorDate: Wed, 31 Mar 2010 18:04:47 -0700
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Fri, 2 Apr 2010 20:48:47 +0200

x86: Fix double enable_IR_x2apic() call on SMP kernel on !SMP boards

Jan Grossmann reported kernel boot panic while booting SMP
kernel on his system with a single core cpu. SMP kernels call
enable_IR_x2apic() from native_smp_prepare_cpus() and on
platforms where the kernel doesn't find SMP configuration we
ended up again calling enable_IR_x2apic() from the
APIC_init_uniprocessor() call in the smp_sanity_check(). Thus
leading to kernel panic.

Don't call enable_IR_x2apic() and default_setup_apic_routing()
from APIC_init_uniprocessor() in CONFIG_SMP case.

NOTE: this kind of non-idempotent and assymetric initialization
sequence is rather fragile and unclean, we'll clean that up
in v2.6.35. This is the minimal fix for v2.6.34.

Reported-by: Jan.Grossmann@kielnet.net
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: <jbarnes@virtuousgeek.org>
Cc: <david.woodhouse@intel.com>
Cc: <weidong.han@intel.com>
Cc: <youquan.song@intel.com>
Cc: <Jan.Grossmann@kielnet.net>
Cc: <stable@kernel.org> # [v2.6.32.x, v2.6.33.x]
LKML-Reference: <1270083887.7835.78.camel@sbs-t61.sc.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 arch/x86/kernel/apic/apic.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 00187f1..e5a4a1e 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -1640,8 +1640,10 @@ int __init APIC_init_uniprocessor(void)
 	}
 #endif
 
+#ifndef CONFIG_SMP
 	enable_IR_x2apic();
 	default_setup_apic_routing();
+#endif
 
 	verify_local_APIC();
 	connect_bsp_APIC();

      parent reply	other threads:[~2010-04-02 19:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4BAD1676.9090704@kielnet.net>
     [not found] ` <1270057394.2866.9.camel@sbs-t61.sc.intel.com>
     [not found]   ` <4BB395B0.6090007@kielnet.net>
2010-04-01  1:04     ` BUG: null pointer deref in dmar_ir_support Suresh Siddha
2010-04-01 18:20       ` Jan.Grossmann
2010-04-01 20:04         ` Suresh Siddha
2010-04-02 17:21           ` Suresh Siddha
2010-04-02 18:20       ` Ingo Molnar
2010-04-02 18:28         ` Suresh Siddha
2010-04-02 18:45           ` Ingo Molnar
2010-04-02 19:14       ` tip-bot for Suresh Siddha [this message]

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=tip-472a474c6630efd195d3738339fd1bdc8aa3b1aa@git.kernel.org \
    --to=suresh.b.siddha@intel.com \
    --cc=Jan.Grossmann@kielnet.net \
    --cc=david.woodhouse@intel.com \
    --cc=hpa@zytor.com \
    --cc=jbarnes@virtuousgeek.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=weidong.han@intel.com \
    --cc=youquan.song@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.