aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/smp_32.h
diff options
context:
space:
mode:
authorGlauber Costa <gcosta@redhat.com>2008-03-27 13:05:58 -0400
committerIngo Molnar <mingo@elte.hu>2008-04-17 11:41:32 -0400
commit1b00084386878f25c2c591ad19cb625880d4089d (patch)
tree86dd602eb31a10d64a1b7e07fa6ea2f272d6c25b /include/asm-x86/smp_32.h
parent2ba95bcbe68d692f549fb10809f15681a25ff6fb (diff)
x86: merge hard/logical_smp_processor_id
The code is now the same between i386 and x86_64. We already know what happens when it reaches this point: They go away from the arch-specific headers, and suddenly appears in the common header. Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/asm-x86/smp_32.h')
-rw-r--r--include/asm-x86/smp_32.h27
1 files changed, 0 insertions, 27 deletions
diff --git a/include/asm-x86/smp_32.h b/include/asm-x86/smp_32.h
index cb3ada2fedbf..53432dbd5426 100644
--- a/include/asm-x86/smp_32.h
+++ b/include/asm-x86/smp_32.h
@@ -42,32 +42,5 @@ static inline int num_booting_cpus(void)
42#define safe_smp_processor_id() 0 42#define safe_smp_processor_id() 0
43#endif /* !CONFIG_SMP */ 43#endif /* !CONFIG_SMP */
44 44
45#ifdef CONFIG_X86_LOCAL_APIC
46
47static inline int logical_smp_processor_id(void)
48{
49 /* we don't want to mark this access volatile - bad code generation */
50 return GET_APIC_LOGICAL_ID(*(u32 *)(APIC_BASE + APIC_LDR));
51}
52
53# ifdef APIC_DEFINITION
54extern int hard_smp_processor_id(void);
55# else
56# include <mach_apicdef.h>
57static inline int hard_smp_processor_id(void)
58{
59 /* we don't want to mark this access volatile - bad code generation */
60 return GET_APIC_ID(*(u32 *)(APIC_BASE + APIC_ID));
61}
62# endif /* APIC_DEFINITION */
63
64#else /* CONFIG_X86_LOCAL_APIC */
65
66# ifndef CONFIG_SMP
67# define hard_smp_processor_id() 0
68# endif
69
70#endif /* CONFIG_X86_LOCAL_APIC */
71
72#endif /* !ASSEMBLY */ 45#endif /* !ASSEMBLY */
73#endif 46#endif