diff options
Diffstat (limited to 'arch/x86/include/asm/mach-default/mach_apicdef.h')
-rw-r--r-- | arch/x86/include/asm/mach-default/mach_apicdef.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/x86/include/asm/mach-default/mach_apicdef.h b/arch/x86/include/asm/mach-default/mach_apicdef.h index b4dcc0971c76..e84d437ba2b2 100644 --- a/arch/x86/include/asm/mach-default/mach_apicdef.h +++ b/arch/x86/include/asm/mach-default/mach_apicdef.h | |||
@@ -5,20 +5,20 @@ | |||
5 | 5 | ||
6 | #ifdef CONFIG_X86_64 | 6 | #ifdef CONFIG_X86_64 |
7 | #define APIC_ID_MASK (apic->apic_id_mask) | 7 | #define APIC_ID_MASK (apic->apic_id_mask) |
8 | #define GET_APIC_ID(x) (apic->get_apic_id(x)) | ||
9 | #define SET_APIC_ID(x) (apic->set_apic_id(x)) | 8 | #define SET_APIC_ID(x) (apic->set_apic_id(x)) |
10 | #else | 9 | #else |
11 | #define APIC_ID_MASK (0xF<<24) | 10 | #define APIC_ID_MASK (0xF<<24) |
12 | static inline unsigned get_apic_id(unsigned long x) | 11 | |
12 | static inline unsigned default_get_apic_id(unsigned long x) | ||
13 | { | 13 | { |
14 | unsigned int ver = GET_APIC_VERSION(apic_read(APIC_LVR)); | 14 | unsigned int ver = GET_APIC_VERSION(apic_read(APIC_LVR)); |
15 | |||
15 | if (APIC_XAPIC(ver)) | 16 | if (APIC_XAPIC(ver)) |
16 | return (((x)>>24)&0xFF); | 17 | return (x >> 24) & 0xFF; |
17 | else | 18 | else |
18 | return (((x)>>24)&0xF); | 19 | return (x >> 24) & 0x0F; |
19 | } | 20 | } |
20 | 21 | ||
21 | #define GET_APIC_ID(x) get_apic_id(x) | ||
22 | #endif | 22 | #endif |
23 | 23 | ||
24 | #endif /* _ASM_X86_MACH_DEFAULT_MACH_APICDEF_H */ | 24 | #endif /* _ASM_X86_MACH_DEFAULT_MACH_APICDEF_H */ |