x86: include mach_apic.h in smpboot_64.c and smpboot.c
[linux-2.6/x86.git] / include / asm-x86 / mach-default / mach_apicdef.h
blob7b78275e6d33d270608b1480e127614da7472bd3
1 #ifndef __ASM_MACH_APICDEF_H
2 #define __ASM_MACH_APICDEF_H
4 #include <asm/apic.h>
6 #ifdef CONFIG_X86_64
7 #define APIC_ID_MASK (0xFFu<<24)
8 #define SET_APIC_ID(x) (((x)<<24))
9 #else
10 #define APIC_ID_MASK (0xF<<24)
11 #endif
13 static inline unsigned get_apic_id(unsigned long x)
15 unsigned int ver = GET_APIC_VERSION(apic_read(APIC_LVR));
16 if (APIC_XAPIC(ver))
17 return (((x)>>24)&0xFF);
18 else
19 return (((x)>>24)&0xF);
22 #define GET_APIC_ID(x) get_apic_id(x)
24 #endif