diff options
author | Glauber Costa <gcosta@redhat.com> | 2008-03-27 13:05:58 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-17 11:41:32 -0400 |
commit | 1b00084386878f25c2c591ad19cb625880d4089d (patch) | |
tree | 86dd602eb31a10d64a1b7e07fa6ea2f272d6c25b /include/asm-x86/smp_64.h | |
parent | 2ba95bcbe68d692f549fb10809f15681a25ff6fb (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_64.h')
-rw-r--r-- | include/asm-x86/smp_64.h | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/include/asm-x86/smp_64.h b/include/asm-x86/smp_64.h index c46585e09ea1..015d36e29ade 100644 --- a/include/asm-x86/smp_64.h +++ b/include/asm-x86/smp_64.h | |||
@@ -46,32 +46,5 @@ 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 | |||
51 | static inline int logical_smp_processor_id(void) | ||
52 | { | ||
53 | /* we don't want to mark this access volatile - bad code generation */ | ||
54 | return GET_APIC_LOGICAL_ID(*(u32 *)(APIC_BASE + APIC_LDR)); | ||
55 | } | ||
56 | |||
57 | # ifdef APIC_DEFINITION | ||
58 | extern int hard_smp_processor_id(void); | ||
59 | # else | ||
60 | # include <mach_apicdef.h> | ||
61 | static inline int hard_smp_processor_id(void) | ||
62 | { | ||
63 | /* we don't want to mark this access volatile - bad code generation */ | ||
64 | return GET_APIC_ID(*(u32 *)(APIC_BASE + APIC_ID)); | ||
65 | } | ||
66 | # endif /* APIC_DEFINITION */ | ||
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 | |||
76 | #endif | 49 | #endif |
77 | 50 | ||