aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGlauber Costa <gcosta@redhat.com>2008-03-27 13:05:57 -0400
committerIngo Molnar <mingo@elte.hu>2008-04-17 11:41:32 -0400
commit2ba95bcbe68d692f549fb10809f15681a25ff6fb (patch)
treee9d10de6620fff0bd3a2dd8477cc8c1afb840d45 /include
parentfe874b3edff43f9a74d9903eb3710e5e0511faf1 (diff)
x86: provide bogus hard_smp_processor_id
We provide a bogus macro for x86_64 in case CONFIG_X86_LOCAL_APIC is not set. It will always be set for x86_64, so the effect is just to make the code equal to i386. Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
-rw-r--r--include/asm-x86/smp_64.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/asm-x86/smp_64.h b/include/asm-x86/smp_64.h
index 25206333476b..c46585e09ea1 100644
--- a/include/asm-x86/smp_64.h
+++ b/include/asm-x86/smp_64.h
@@ -46,6 +46,8 @@ static inline int num_booting_cpus(void)
46 46
47#define safe_smp_processor_id() smp_processor_id() 47#define safe_smp_processor_id() smp_processor_id()
48 48
49#ifdef CONFIG_X86_LOCAL_APIC
50
49static inline int logical_smp_processor_id(void) 51static inline int logical_smp_processor_id(void)
50{ 52{
51 /* we don't want to mark this access volatile - bad code generation */ 53 /* we don't want to mark this access volatile - bad code generation */
@@ -63,5 +65,13 @@ static inline int hard_smp_processor_id(void)
63} 65}
64# endif /* APIC_DEFINITION */ 66# endif /* APIC_DEFINITION */
65 67
68#else /* CONFIG_X86_LOCAL_APIC */
69
70# ifndef CONFIG_SMP
71# define hard_smp_processor_id() 0
72# endif
73
74#endif /* CONFIG_X86_LOCAL_APIC */
75
66#endif 76#endif
67 77