lkml.org 
[lkml]   [2008]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 2/2] x2apic: use x2apic id reported by cpuid during topology discovery
use x2apic id reported by cpuid during topology discovery, instead of the
apic id configured in the APIC. For most of the systems, x2apic id
reported by cpuid leaf 0xb will be same as the physical apic id reported
by the APIC_ID register of the APIC. We follow the suggested guidelines
and use the apic id reported by the cpuid.

No change to non-generic UV platforms, will use the apic id reported in the
APIC_ID register as the cpuid reported apic id's may not be unique.

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
---


Index: tip/arch/x86/kernel/genx2apic_cluster.c
===================================================================
--- tip.orig/arch/x86/kernel/genx2apic_cluster.c 2008-08-14 15:20:43.000000000 -0700
+++ tip/arch/x86/kernel/genx2apic_cluster.c 2008-08-14 15:21:48.000000000 -0700
@@ -120,14 +120,9 @@
return x;
}

-static unsigned int x2apic_read_id(void)
-{
- return apic_read(APIC_ID);
-}
-
static unsigned int phys_pkg_id(int index_msb)
{
- return x2apic_read_id() >> index_msb;
+ return current_cpu_data.initial_apicid >> index_msb;
}

static void x2apic_send_IPI_self(int vector)
Index: tip/arch/x86/kernel/genx2apic_phys.c
===================================================================
--- tip.orig/arch/x86/kernel/genx2apic_phys.c 2008-08-14 15:20:43.000000000 -0700
+++ tip/arch/x86/kernel/genx2apic_phys.c 2008-08-14 15:21:48.000000000 -0700
@@ -118,14 +118,9 @@
return x;
}

-static unsigned int x2apic_read_id(void)
-{
- return apic_read(APIC_ID);
-}
-
static unsigned int phys_pkg_id(int index_msb)
{
- return x2apic_read_id() >> index_msb;
+ return current_cpu_data.initial_apicid >> index_msb;
}

void x2apic_send_IPI_self(int vector)
--



\
 
 \ /
  Last update: 2008-08-18 20:21    [W:0.050 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site