summaryrefslogtreecommitdiffstats
path: root/include
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 /include
parent4dc2f96cacd1e74c688f94348a3bfd0a980817d5 (diff)
downloadop-kernel-dev-0c81c746f9bdbfaafe64322d540c8b7b59c27314.zip
op-kernel-dev-0c81c746f9bdbfaafe64322d540c8b7b59c27314.tar.gz
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 'include')
-rw-r--r--include/asm-x86/genapic_64.h1
-rw-r--r--include/asm-x86/mach-default/mach_apic.h1
-rw-r--r--include/asm-x86/mach-default/mach_apicdef.h3
-rw-r--r--include/asm-x86/smp.h4
4 files changed, 5 insertions, 4 deletions
diff --git a/include/asm-x86/genapic_64.h b/include/asm-x86/genapic_64.h
index 647e4e5..d567abc 100644
--- a/include/asm-x86/genapic_64.h
+++ b/include/asm-x86/genapic_64.h
@@ -27,6 +27,7 @@ struct genapic {
/* */
unsigned int (*cpu_mask_to_apicid)(cpumask_t cpumask);
unsigned int (*phys_pkg_id)(int index_msb);
+ unsigned int (*read_apic_id)(void);
};
extern struct genapic *genapic;
diff --git a/include/asm-x86/mach-default/mach_apic.h b/include/asm-x86/mach-default/mach_apic.h
index 0b2cde5..d172c55 100644
--- a/include/asm-x86/mach-default/mach_apic.h
+++ b/include/asm-x86/mach-default/mach_apic.h
@@ -30,6 +30,7 @@ static inline cpumask_t target_cpus(void)
#define cpu_mask_to_apicid (genapic->cpu_mask_to_apicid)
#define phys_pkg_id (genapic->phys_pkg_id)
#define vector_allocation_domain (genapic->vector_allocation_domain)
+#define read_apic_id (genapic->read_apic_id)
extern void setup_apic_routing(void);
#else
#define INT_DELIVERY_MODE dest_LowestPrio
diff --git a/include/asm-x86/mach-default/mach_apicdef.h b/include/asm-x86/mach-default/mach_apicdef.h
index e4b29ba..453b58a 100644
--- a/include/asm-x86/mach-default/mach_apicdef.h
+++ b/include/asm-x86/mach-default/mach_apicdef.h
@@ -5,8 +5,9 @@
#ifdef CONFIG_X86_64
#define APIC_ID_MASK (0xFFu<<24)
-#define GET_APIC_ID(x) (((x)>>24)&0xFFu)
+#define GET_APIC_ID(x) (x)
#define SET_APIC_ID(x) (((x)<<24))
+#define GET_XAPIC_ID(x) (((x) >> 24) & 0xFFu)
#else
#define APIC_ID_MASK (0xF<<24)
static inline unsigned get_apic_id(unsigned long x)
diff --git a/include/asm-x86/smp.h b/include/asm-x86/smp.h
index 2e221f1..9848715 100644
--- a/include/asm-x86/smp.h
+++ b/include/asm-x86/smp.h
@@ -169,12 +169,10 @@ static inline unsigned int read_apic_id(void)
{
return *(u32 *)(APIC_BASE + APIC_ID);
}
-#else
-extern unsigned int read_apic_id(void);
#endif
-# ifdef APIC_DEFINITION
+# if defined(APIC_DEFINITION) || defined(CONFIG_X86_64)
extern int hard_smp_processor_id(void);
# else
# include <mach_apicdef.h>
OpenPOWER on IntegriCloud