diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-07-26 10:29:23 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-26 10:29:23 -0400 |
commit | 6dec3a10a7a6093af10cef7ac56021150afd6451 (patch) | |
tree | f4d8511f023e3e0c203baf889d4a0f3925882381 /include/asm-x86/smp.h | |
parent | 29308333fbe2cc61258c1c470f9403960428beb2 (diff) | |
parent | 10a010f6953b5a14ba2f0be40a4fce1bea220875 (diff) |
Merge branch 'x86/x2apic' into x86/core
Conflicts:
include/asm-x86/i8259.h
include/asm-x86/msidef.h
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/asm-x86/smp.h')
-rw-r--r-- | include/asm-x86/smp.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/include/asm-x86/smp.h b/include/asm-x86/smp.h index cd3c5f03fcaf..88b075c6fe8f 100644 --- a/include/asm-x86/smp.h +++ b/include/asm-x86/smp.h | |||
@@ -165,30 +165,33 @@ extern int safe_smp_processor_id(void); | |||
165 | 165 | ||
166 | #ifdef CONFIG_X86_LOCAL_APIC | 166 | #ifdef CONFIG_X86_LOCAL_APIC |
167 | 167 | ||
168 | #ifndef CONFIG_X86_64 | ||
168 | static inline int logical_smp_processor_id(void) | 169 | static inline int logical_smp_processor_id(void) |
169 | { | 170 | { |
170 | /* we don't want to mark this access volatile - bad code generation */ | 171 | /* we don't want to mark this access volatile - bad code generation */ |
171 | return GET_APIC_LOGICAL_ID(*(u32 *)(APIC_BASE + APIC_LDR)); | 172 | return GET_APIC_LOGICAL_ID(*(u32 *)(APIC_BASE + APIC_LDR)); |
172 | } | 173 | } |
173 | 174 | ||
174 | #ifndef CONFIG_X86_64 | 175 | #include <mach_apicdef.h> |
175 | static inline unsigned int read_apic_id(void) | 176 | static inline unsigned int read_apic_id(void) |
176 | { | 177 | { |
177 | return *(u32 *)(APIC_BASE + APIC_ID); | 178 | unsigned int reg; |
179 | |||
180 | reg = *(u32 *)(APIC_BASE + APIC_ID); | ||
181 | |||
182 | return GET_APIC_ID(reg); | ||
178 | } | 183 | } |
179 | #else | ||
180 | extern unsigned int read_apic_id(void); | ||
181 | #endif | 184 | #endif |
182 | 185 | ||
183 | 186 | ||
184 | # ifdef APIC_DEFINITION | 187 | # if defined(APIC_DEFINITION) || defined(CONFIG_X86_64) |
185 | extern int hard_smp_processor_id(void); | 188 | extern int hard_smp_processor_id(void); |
186 | # else | 189 | # else |
187 | # include <mach_apicdef.h> | 190 | #include <mach_apicdef.h> |
188 | static inline int hard_smp_processor_id(void) | 191 | static inline int hard_smp_processor_id(void) |
189 | { | 192 | { |
190 | /* we don't want to mark this access volatile - bad code generation */ | 193 | /* we don't want to mark this access volatile - bad code generation */ |
191 | return GET_APIC_ID(read_apic_id()); | 194 | return read_apic_id(); |
192 | } | 195 | } |
193 | # endif /* APIC_DEFINITION */ | 196 | # endif /* APIC_DEFINITION */ |
194 | 197 | ||