diff options
author | Glauber Costa <gcosta@redhat.com> | 2008-03-27 14:05:56 -0300 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-17 17:41:32 +0200 |
commit | fe874b3edff43f9a74d9903eb3710e5e0511faf1 (patch) | |
tree | 44198c73666a60e25233c888b438e27585aab264 /include/asm-x86/smp_64.h | |
parent | fe176de0ffdc2dd300fbcece84434a32b482b5b1 (diff) | |
download | blackbird-op-linux-fe874b3edff43f9a74d9903eb3710e5e0511faf1.tar.gz blackbird-op-linux-fe874b3edff43f9a74d9903eb3710e5e0511faf1.zip |
x86: surround hard_smp_processor_id in APIC_DEFINITION
APIC_DEFINITION is not defined in x86_64, so in practice, we keep
our old code here. But as a nice side effect, the code is now
equal to smp_32.h.
Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/asm-x86/smp_64.h')
-rw-r--r-- | include/asm-x86/smp_64.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/asm-x86/smp_64.h b/include/asm-x86/smp_64.h index c53a011bb91c..25206333476b 100644 --- a/include/asm-x86/smp_64.h +++ b/include/asm-x86/smp_64.h @@ -52,12 +52,16 @@ static inline int logical_smp_processor_id(void) return GET_APIC_LOGICAL_ID(*(u32 *)(APIC_BASE + APIC_LDR)); } -#include <mach_apicdef.h> +# ifdef APIC_DEFINITION +extern int hard_smp_processor_id(void); +# else +# include <mach_apicdef.h> static inline int hard_smp_processor_id(void) { /* we don't want to mark this access volatile - bad code generation */ return GET_APIC_ID(*(u32 *)(APIC_BASE + APIC_ID)); } +# endif /* APIC_DEFINITION */ #endif |