From: Yinghai Lu <yhlu.kernel@gmail.com>
To: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>, Jack Steiner <steiner@sgi.com>,
Suresh Siddha <suresh.b.siddha@intel.com>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] x86: add apic probe for genapic 64bit - fix
Date: Fri, 25 Jul 2008 19:39:03 -0700 [thread overview]
Message-ID: <200807251939.04199.yhlu.kernel@gmail.com> (raw)
In-Reply-To: <200807212208.22116.yhlu.kernel@gmail.com>
intr_remapping_enabled get assigned later, so need to check that
in setup_apic_routing
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
---
arch/x86/kernel/genapic_64.c | 6 ++++++
arch/x86/kernel/genx2apic_cluster.c | 2 +-
arch/x86/kernel/genx2apic_phys.c | 2 +-
3 files changed, 8 insertions(+), 2 deletions(-)
Index: linux-2.6/arch/x86/kernel/genapic_64.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/genapic_64.c
+++ linux-2.6/arch/x86/kernel/genapic_64.c
@@ -16,6 +16,7 @@
#include <linux/ctype.h>
#include <linux/init.h>
#include <linux/hardirq.h>
+#include <linux/dmar.h>
#include <asm/smp.h>
#include <asm/ipi.h>
@@ -42,6 +43,11 @@ static struct genapic *apic_probe[] __in
*/
void __init setup_apic_routing(void)
{
+ if (genapic == &apic_x2apic_phys || genapic == &apic_x2apic_cluster) {
+ if (!intr_remapping_enabled)
+ genapic = &apic_flat;
+ }
+
if (genapic == &apic_flat) {
if (max_physical_apicid >= 8)
genapic = &apic_physflat;
Index: linux-2.6/arch/x86/kernel/genx2apic_cluster.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/genx2apic_cluster.c
+++ linux-2.6/arch/x86/kernel/genx2apic_cluster.c
@@ -14,7 +14,7 @@ DEFINE_PER_CPU(u32, x86_cpu_to_logical_a
static int __init x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
{
- if (cpu_has_x2apic && intr_remapping_enabled)
+ if (cpu_has_x2apic)
return 1;
return 0;
Index: linux-2.6/arch/x86/kernel/genx2apic_phys.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/genx2apic_phys.c
+++ linux-2.6/arch/x86/kernel/genx2apic_phys.c
@@ -21,7 +21,7 @@ early_param("x2apic_phys", set_x2apic_ph
static int __init x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
{
- if (cpu_has_x2apic && intr_remapping_enabled && x2apic_phys)
+ if (cpu_has_x2apic && x2apic_phys)
return 1;
return 0;
next prev parent reply other threads:[~2008-07-26 2:39 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-22 1:36 [PATCH] x86: add apic probe for genapic 64bit Yinghai Lu
2008-07-22 5:08 ` [PATCH] x86: add apic probe for genapic 64bit v2 Yinghai Lu
2008-07-22 7:07 ` Ingo Molnar
2008-07-22 7:13 ` Ingo Molnar
2008-07-22 8:09 ` Yinghai Lu
2008-07-22 8:24 ` Ingo Molnar
2008-07-22 8:26 ` Yinghai Lu
2008-07-22 16:31 ` Mike Travis
2008-07-22 17:57 ` Suresh Siddha
2008-07-22 18:05 ` Yinghai Lu
2008-07-22 18:10 ` Suresh Siddha
2008-07-22 18:40 ` Yinghai Lu
2008-07-22 19:17 ` Suresh Siddha
2008-07-22 20:20 ` [PATCH] x86: move declaring x2apic_extra_bits Yinghai Lu
2008-07-24 11:00 ` Ingo Molnar
2008-07-26 2:39 ` Yinghai Lu [this message]
2008-07-26 14:32 ` [PATCH] x86: add apic probe for genapic 64bit - fix Ingo Molnar
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=200807251939.04199.yhlu.kernel@gmail.com \
--to=yhlu.kernel@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=steiner@sgi.com \
--cc=suresh.b.siddha@intel.com \
--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