aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/apic.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-01-28 11:36:56 -0500
committerIngo Molnar <mingo@elte.hu>2009-01-28 17:20:36 -0500
commit1f75ed0c1311a50ed393bcac258de65680d360e5 (patch)
treea01ba549ce874af2167543aa91769bfedd508220 /arch/x86/include/asm/apic.h
parentb2af018ff26f1a2a026f548f7f0e552589905689 (diff)
x86: remove mach_apicdef.h
Move its definitions into apic.h. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/include/asm/apic.h')
-rw-r--r--arch/x86/include/asm/apic.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h
index e8f030440bc7..3a3202074c63 100644
--- a/arch/x86/include/asm/apic.h
+++ b/arch/x86/include/asm/apic.h
@@ -211,4 +211,20 @@ static inline void disable_local_APIC(void) { }
211 211
212#endif /* !CONFIG_X86_LOCAL_APIC */ 212#endif /* !CONFIG_X86_LOCAL_APIC */
213 213
214#ifdef CONFIG_X86_64
215#define SET_APIC_ID(x) (apic->set_apic_id(x))
216#else
217
218static inline unsigned default_get_apic_id(unsigned long x)
219{
220 unsigned int ver = GET_APIC_VERSION(apic_read(APIC_LVR));
221
222 if (APIC_XAPIC(ver))
223 return (x >> 24) & 0xFF;
224 else
225 return (x >> 24) & 0x0F;
226}
227
228#endif
229
214#endif /* _ASM_X86_APIC_H */ 230#endif /* _ASM_X86_APIC_H */