From: Yinghai Lu <yinghai@kernel.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Cyrill Gorcunov <gorcunov@gmail.com>,
Ravikiran G Thirumalai <kiran@scalex86.org>,
linux-kernel@vger.kernel.org, shai@scalex86.org,
Suresh Siddha <suresh.b.siddha@intel.com>
Subject: Re: [patch] x86: 2.6.31-rc7 crash due to buggy flat_phys_pkg_id
Date: Tue, 25 Aug 2009 12:17:37 -0700 [thread overview]
Message-ID: <4A9438D1.4030608@kernel.org> (raw)
In-Reply-To: <20090825191231.GA22821@elte.hu>
Ingo Molnar wrote:
> * Linus Torvalds <torvalds@linux-foundation.org> wrote:
>
>> On Tue, 25 Aug 2009, Yinghai Lu wrote:
>>> initial apic id and apic id could be different.
>>>
>>> and we should use initial apic id to get correct phys pkg id in
>>> case BIOS set crazy apic id.
>> Yinghai - I think you missed Cyrills' point. Let me repeat it:
>>
>> "cpu_has_apic bit turned off"
>>
>> there's no apic. No "initial apic id". No "phys pkg id". No
>> nothing.
>>
>> Discussions about "correct phys pkg id" are pointless.
>
> that's not the case here though:
>
> [ 8.713916] Total of 32 processors activated (162314.96 BogoMIPS).
>
> so APICs are active. The real difference is i think this aspect of
> commit 2759c3287:
>
> static int flat_phys_pkg_id(int initial_apic_id, int index_msb)
> {
> - return hard_smp_processor_id() >> index_msb;
> + return initial_apic_id >> index_msb;
> }
>
> We need to revert back to .30 behavior here. (In case of which
> environment to trust we almost always trust whatever booted millions
> of Linux boxes in the past already.)
>
> Furthermore, commit 2759c3287 did not declare any side-effects and
> clearly causes a side-effect on vSMP which apparently has an
> overlapping set of initial APIC ids.
>
> Ravikiran, your patch does not do a clear revert of this bit though.
> If you do a plain revert of the line above alone, does that fix the
> problem too?
how about patch phys_pkg_id for vsmp?
diff --git a/arch/x86/kernel/apic/probe_64.c b/arch/x86/kernel/apic/probe_64.c
index f3b1037..65edc18 100644
--- a/arch/x86/kernel/apic/probe_64.c
+++ b/arch/x86/kernel/apic/probe_64.c
@@ -44,6 +44,11 @@ static struct apic *apic_probe[] __initdata = {
NULL,
};
+static int apicid_phys_pkg_id(int initial_apic_id, int index_msb)
+{
+ return hard_smp_processor_id() >> index_msb;
+}
+
/*
* Check the APIC IDs in bios_cpu_apicid and choose the APIC mode.
*/
@@ -69,6 +74,11 @@ void __init default_setup_apic_routing(void)
printk(KERN_INFO "Setting APIC routing to %s\n", apic->name);
}
+ if (is_vsmp_box()) {
+ /* need to update phys_pkg_id */
+ apic->phys_pkg_id = apicid_phys_pkg_id;
+ }
+
/*
* Now that apic routing model is selected, configure the
* fault handling for intr remapping.
next prev parent reply other threads:[~2009-08-25 19:19 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-24 18:26 Ravikiran G Thirumalai
2009-08-24 23:53 ` Yinghai Lu
2009-08-25 0:27 ` Yinghai Lu
2009-08-25 1:38 ` Ravikiran G Thirumalai
2009-08-25 5:03 ` Yinghai Lu
2009-08-25 1:26 ` Ravikiran G Thirumalai
2009-08-25 5:12 ` Yinghai Lu
2009-08-25 17:17 ` Ravikiran G Thirumalai
2009-08-25 18:15 ` Ingo Molnar
2009-08-25 18:31 ` Cyrill Gorcunov
2009-08-25 18:50 ` Yinghai Lu
2009-08-25 18:57 ` Linus Torvalds
2009-08-25 19:12 ` Ingo Molnar
2009-08-25 19:17 ` Yinghai Lu [this message]
2009-08-25 19:24 ` Ingo Molnar
2009-08-25 20:36 ` Ravikiran G Thirumalai
2009-08-25 20:44 ` [PATCH] x86: fix vsmp booting with phys_pkg_id changing Yinghai Lu
2009-08-26 8:08 ` Ingo Molnar
2009-08-26 8:15 ` [tip:x86/urgent] x86: Fix vSMP boot crash tip-bot for Yinghai Lu
2009-08-25 19:53 ` [patch] x86: 2.6.31-rc7 crash due to buggy flat_phys_pkg_id Ravikiran G Thirumalai
2009-08-25 18:59 ` Cyrill Gorcunov
2009-08-25 19:27 ` Ravikiran G Thirumalai
2009-08-25 19:33 ` Ingo Molnar
2009-08-25 19:36 ` Yinghai Lu
2009-08-25 19:20 ` Ravikiran G Thirumalai
2009-08-25 19:26 ` Ingo Molnar
2009-08-25 19:40 ` Cyrill Gorcunov
2009-08-25 18:35 ` Yinghai Lu
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=4A9438D1.4030608@kernel.org \
--to=yinghai@kernel.org \
--cc=gorcunov@gmail.com \
--cc=kiran@scalex86.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=shai@scalex86.org \
--cc=suresh.b.siddha@intel.com \
--cc=torvalds@linux-foundation.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
Powered by JetHome