From: Suresh Siddha <suresh.b.siddha@intel.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Yinghai Lu <yhlu.kernel@gmail.com>,
"Siddha, Suresh B" <suresh.b.siddha@intel.com>,
"hpa@zytor.com" <hpa@zytor.com>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"arjan@linux.intel.com" <arjan@linux.intel.com>,
"andi@firstfloor.org" <andi@firstfloor.org>,
"ebiederm@xmission.com" <ebiederm@xmission.com>,
"jbarnes@virtuousgeek.org" <jbarnes@virtuousgeek.org>,
"steiner@sgi.com" <steiner@sgi.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"jeremy@goop.org" <jeremy@goop.org>
Subject: Re: [patch 00/26] x64, x2apic/intr-remap: Interrupt-remapping and x2apic support
Date: Fri, 11 Jul 2008 14:24:19 -0700 [thread overview]
Message-ID: <20080711212418.GV1678@linux-os.sc.intel.com> (raw)
In-Reply-To: <20080711204521.GA15689@elte.hu>
On Fri, Jul 11, 2008 at 01:45:21PM -0700, Ingo Molnar wrote:
>
> * Yinghai Lu <yhlu.kernel@gmail.com> wrote:
>
> > Setting APIC routing to physical flat
> > Kernel panic - not syncing: Boot APIC ID in local APIC unexpected (0 vs 4)
> > Pid: 1, comm: swapper Not tainted 2.6.26-rc9-tip-01763-g74f94b1-dirty #320
> >
> > Call Trace:
> > [<ffffffff80a21505>] ? set_cpu_sibling_map+0x38c/0x3bd
> > [<ffffffff80245215>] ? read_xapic_id+0x25/0x3e
> > [<ffffffff80e5a2c3>] ? verify_local_APIC+0x139/0x1b9
> > [<ffffffff80245215>] ? read_xapic_id+0x25/0x3e
> > [<ffffffff80e589af>] ? native_smp_prepare_cpus+0x224/0x2e9
> > [<ffffffff80e4881a>] ? kernel_init+0x64/0x341
> > [<ffffffff8022a439>] ? child_rip+0xa/0x11
> > [<ffffffff80e487b6>] ? kernel_init+0x0/0x341
> > [<ffffffff8022a42f>] ? child_rip+0x0/0x11
> >
> >
> > guess read_apic_id changing cuase some problem...
Yinghai, Can you please try the appended patch to see if it fixes your problem?
I guess you need to try the tip/x86/x2apic tree now please :(
BTW, I don't know why we even do verify_local_APIC() in 64bit. Especially
when we don't care for the return value, it should be a no-op.
---
genapic's read_apic_id() returns the actual apic id extracted from
the APIC_ID register. And in some cases like UV, read_apic_id()
returns completely different values from APIC ID register.
Use the native apic register read, rather than genapic read_apic_id()
in verify_local_APIC()
And also, lapic_suspend() should also use native apic register read.
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
---
diff --git a/arch/x86/kernel/apic_64.c b/arch/x86/kernel/apic_64.c
index 9a319d7..dd05010 100644
--- a/arch/x86/kernel/apic_64.c
+++ b/arch/x86/kernel/apic_64.c
@@ -698,10 +698,10 @@ int __init verify_local_APIC(void)
/*
* The ID register is read/write in a real APIC.
*/
- reg0 = read_apic_id();
+ reg0 = apic_read(APIC_ID);
apic_printk(APIC_DEBUG, "Getting ID: %x\n", reg0);
apic_write(APIC_ID, reg0 ^ APIC_ID_MASK);
- reg1 = read_apic_id();
+ reg1 = apic_read(APIC_ID);
apic_printk(APIC_DEBUG, "Getting ID: %x\n", reg1);
apic_write(APIC_ID, reg0);
if (reg1 != (reg0 ^ APIC_ID_MASK))
@@ -1336,7 +1336,7 @@ static int lapic_suspend(struct sys_device *dev, pm_message_t state)
maxlvt = lapic_get_maxlvt();
- apic_pm_state.apic_id = read_apic_id();
+ apic_pm_state.apic_id = apic_read(APIC_ID);
apic_pm_state.apic_taskpri = apic_read(APIC_TASKPRI);
apic_pm_state.apic_ldr = apic_read(APIC_LDR);
apic_pm_state.apic_dfr = apic_read(APIC_DFR);
next prev parent reply other threads:[~2008-07-11 21:24 UTC|newest]
Thread overview: 87+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-10 18:16 [patch 00/26] x64, x2apic/intr-remap: Interrupt-remapping and x2apic support Suresh Siddha
2008-07-10 18:16 ` [patch 01/26] x64, x2apic/intr-remap: Intel vt-d, IOMMU code reorganization Suresh Siddha
2008-07-10 18:16 ` [patch 02/26] x64, x2apic/intr-remap: fix the need for sequential array allocation of iommus Suresh Siddha
2008-07-10 18:16 ` [patch 03/26] x64, x2apic/intr-remap: code re-structuring, to be used by both DMA and Interrupt remapping Suresh Siddha
2008-07-10 18:16 ` [patch 04/26] x64, x2apic/intr-remap: use CONFIG_DMAR for DMA-remapping specific code Suresh Siddha
2008-07-10 18:16 ` [patch 05/26] x64, x2apic/intr-remap: Fix the need for RMRR in the DMA-remapping detection Suresh Siddha
2008-07-10 18:16 ` [patch 06/26] x64, x2apic/intr-remap: parse ioapic scope under vt-d structures Suresh Siddha
2008-07-10 18:16 ` [patch 07/26] x64, x2apic/intr-remap: move IOMMU_WAIT_OP() macro to intel-iommu.h Suresh Siddha
2008-07-10 18:16 ` [patch 08/26] x64, x2apic/intr-remap: Queued invalidation infrastructure (part of VT-d) Suresh Siddha
2008-07-10 18:16 ` [patch 09/26] x64, x2apic/intr-remap: Interrupt remapping infrastructure Suresh Siddha
2008-07-10 18:16 ` [patch 10/26] x64, x2apic/intr-remap: routines managing Interrupt remapping table entries Suresh Siddha
2008-07-10 18:16 ` [patch 11/26] x64, x2apic/intr-remap: generic irq migration support from process context Suresh Siddha
2008-07-10 23:08 ` Eric W. Biederman
2008-07-11 5:41 ` Suresh Siddha
2008-07-11 9:19 ` Eric W. Biederman
2008-07-10 18:16 ` [patch 12/26] x64, x2apic/intr-remap: 8259 specific mask/unmask routines Suresh Siddha
2008-07-10 18:16 ` [patch 13/26] x64, x2apic/intr-remap: ioapic routines which deal with initial io-apic RTE setup Suresh Siddha
2008-07-10 18:16 ` [patch 14/26] x64, x2apic/intr-remap: introduce read_apic_id() to genapic routines Suresh Siddha
2008-07-10 18:16 ` [patch 15/26] x64, x2apic/intr-remap: basic apic ops support Suresh Siddha
2008-07-10 18:16 ` [patch 16/26] x64, x2apic/intr-remap: cpuid bits for x2apic feature Suresh Siddha
2008-07-10 18:16 ` [patch 17/26] x64, x2apic/intr-remap: disable DMA-remapping if Interrupt-remapping is detected (temporary quirk) Suresh Siddha
2008-07-10 18:16 ` [patch 18/26] x64, x2apic/intr-remap: x2apic ops for x2apic mode support Suresh Siddha
2008-07-10 18:16 ` [patch 19/26] x64, x2apic/intr-remap: introcude self IPI to genapic routines Suresh Siddha
2008-07-10 23:34 ` Eric W. Biederman
2008-07-11 2:29 ` Mike Travis
2008-07-11 3:50 ` Eric W. Biederman
2008-07-11 13:55 ` Mike Travis
2008-07-10 18:16 ` [patch 20/26] x64, x2apic/intr-remap: x2apic cluster mode support Suresh Siddha
2008-07-10 18:16 ` [patch 21/26] x64, x2apic/intr-remap: setup init_apic_ldr for UV Suresh Siddha
2008-07-11 0:14 ` Andrew Morton
2008-07-11 1:56 ` Suresh Siddha
2008-07-10 18:16 ` [patch 22/26] x64, x2apic/intr-remap: IO-APIC support for interrupt-remapping Suresh Siddha
2008-07-10 18:16 ` [patch 23/26] x64, x2apic/intr-remap: MSI and MSI-X support for interrupt remapping infrastructure Suresh Siddha
2008-07-11 1:22 ` Eric W. Biederman
2008-07-11 6:07 ` Suresh Siddha
2008-07-11 8:59 ` Eric W. Biederman
2008-07-11 23:07 ` Suresh Siddha
2008-07-11 23:50 ` Eric W. Biederman
2008-07-10 18:16 ` [patch 24/26] x64, x2apic/intr-remap: add x2apic support, including enabling interrupt-remapping Suresh Siddha
2008-07-10 18:16 ` [patch 25/26] x64, x2apic/intr-remap: support for x2apic physical mode support Suresh Siddha
2008-07-10 18:17 ` [patch 26/26] x64, x2apic/intr-remap: introduce CONFIG_INTR_REMAP Suresh Siddha
2008-07-10 23:29 ` Eric W. Biederman
2008-07-10 23:37 ` Yong Wang
2008-07-11 1:50 ` Suresh Siddha
2008-07-11 1:53 ` Eric W. Biederman
2008-07-10 19:53 ` [patch 00/26] x64, x2apic/intr-remap: Interrupt-remapping and x2apic support Ingo Molnar
2008-07-10 20:22 ` Suresh Siddha
2008-07-10 21:56 ` Suresh Siddha
2008-07-11 10:28 ` Ingo Molnar
2008-07-11 20:09 ` Ingo Molnar
2008-07-11 20:31 ` Suresh Siddha
2008-07-11 20:42 ` Yinghai Lu
2008-07-11 20:45 ` Ingo Molnar
2008-07-11 21:24 ` Suresh Siddha [this message]
2008-07-11 22:02 ` Yinghai Lu
2008-07-12 3:16 ` Yinghai Lu
2008-07-12 3:52 ` Eric W. Biederman
2008-07-12 6:17 ` Yinghai Lu
2008-07-12 7:02 ` Eric W. Biederman
2008-07-12 7:49 ` Yinghai Lu
2008-07-12 8:11 ` Eric W. Biederman
2008-07-12 8:37 ` Yinghai Lu
2008-07-12 9:46 ` Eric W. Biederman
2008-07-13 1:02 ` Suresh Siddha
2008-07-13 1:01 ` Suresh Siddha
2008-07-13 1:32 ` Suresh Siddha
2008-07-13 1:00 ` Suresh Siddha
2008-07-13 0:55 ` Suresh Siddha
2008-07-12 5:37 ` Ingo Molnar
2008-07-12 6:06 ` Yinghai Lu
2008-07-12 6:45 ` Ingo Molnar
2008-07-11 20:49 ` Ingo Molnar
2008-07-16 14:37 ` Yong Wang
2008-07-16 14:53 ` Ingo Molnar
2008-07-22 20:49 ` Andrew Morton
2008-07-22 21:00 ` Mike Travis
2008-07-22 21:14 ` Andrew Morton
2008-07-24 5:03 ` Ingo Molnar
2008-07-10 20:05 ` Eric W. Biederman
2008-07-10 20:18 ` Ingo Molnar
2008-07-10 21:07 ` Eric W. Biederman
2008-07-10 21:15 ` Suresh Siddha
2008-07-10 22:52 ` Eric W. Biederman
2008-07-11 2:35 ` Suresh Siddha
2008-07-11 3:15 ` Eric W. Biederman
2008-07-10 22:09 ` Arjan van de Ven
2008-07-10 22:54 ` Eric W. Biederman
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=20080711212418.GV1678@linux-os.sc.intel.com \
--to=suresh.b.siddha@intel.com \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=arjan@linux.intel.com \
--cc=ebiederm@xmission.com \
--cc=hpa@zytor.com \
--cc=jbarnes@virtuousgeek.org \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=steiner@sgi.com \
--cc=tglx@linutronix.de \
--cc=yhlu.kernel@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox