aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/genapic_flat_64.c
diff options
context:
space:
mode:
authorSuresh Siddha <suresh.b.siddha@intel.com>2008-07-10 11:16:48 -0700
committerIngo Molnar <mingo@elte.hu>2008-07-12 08:44:57 +0200
commit0c81c746f9bdbfaafe64322d540c8b7b59c27314 (patch)
tree2f6a291a7b699b930e617909f3476dfafb5a38bb /arch/x86/kernel/genapic_flat_64.c
parentx64, x2apic/intr-remap: ioapic routines which deal with initial io-apic RTE setup (diff)
downloadlinux-dev-0c81c746f9bdbfaafe64322d540c8b7b59c27314.tar.xz
linux-dev-0c81c746f9bdbfaafe64322d540c8b7b59c27314.zip
x64, x2apic/intr-remap: introduce read_apic_id() to genapic routines
Move the read_apic_id() to genapic routines. Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Cc: akpm@linux-foundation.org Cc: arjan@linux.intel.com Cc: andi@firstfloor.org Cc: ebiederm@xmission.com Cc: jbarnes@virtuousgeek.org Cc: steiner@sgi.com Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/genapic_flat_64.c')
-rw-r--r--arch/x86/kernel/genapic_flat_64.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/arch/x86/kernel/genapic_flat_64.c b/arch/x86/kernel/genapic_flat_64.c
index 1a9c68845ee8..400ed8df8b4e 100644
--- a/arch/x86/kernel/genapic_flat_64.c
+++ b/arch/x86/kernel/genapic_flat_64.c
@@ -15,9 +15,11 @@
#include <linux/kernel.h>
#include <linux/ctype.h>
#include <linux/init.h>
+#include <linux/hardirq.h>
#include <asm/smp.h>
#include <asm/ipi.h>
#include <asm/genapic.h>
+#include <mach_apicdef.h>
static cpumask_t flat_target_cpus(void)
{
@@ -95,9 +97,17 @@ static void flat_send_IPI_all(int vector)
__send_IPI_shortcut(APIC_DEST_ALLINC, vector, APIC_DEST_LOGICAL);
}
+static unsigned int read_xapic_id(void)
+{
+ unsigned int id;
+
+ id = GET_XAPIC_ID(apic_read(APIC_ID));
+ return id;
+}
+
static int flat_apic_id_registered(void)
{
- return physid_isset(GET_APIC_ID(read_apic_id()), phys_cpu_present_map);
+ return physid_isset(read_xapic_id(), phys_cpu_present_map);
}
static unsigned int flat_cpu_mask_to_apicid(cpumask_t cpumask)
@@ -123,6 +133,7 @@ struct genapic apic_flat = {
.send_IPI_mask = flat_send_IPI_mask,
.cpu_mask_to_apicid = flat_cpu_mask_to_apicid,
.phys_pkg_id = phys_pkg_id,
+ .read_apic_id = read_xapic_id,
};
/*
@@ -187,4 +198,5 @@ struct genapic apic_physflat = {
.send_IPI_mask = physflat_send_IPI_mask,
.cpu_mask_to_apicid = physflat_cpu_mask_to_apicid,
.phys_pkg_id = phys_pkg_id,
+ .read_apic_id = read_xapic_id,
};