aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/smp.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-07-26 10:29:23 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-26 10:29:23 -0400
commit6dec3a10a7a6093af10cef7ac56021150afd6451 (patch)
treef4d8511f023e3e0c203baf889d4a0f3925882381 /include/asm-x86/smp.h
parent29308333fbe2cc61258c1c470f9403960428beb2 (diff)
parent10a010f6953b5a14ba2f0be40a4fce1bea220875 (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.h17
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
168static inline int logical_smp_processor_id(void) 169static 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>
175static inline unsigned int read_apic_id(void) 176static 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
180extern 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)
185extern int hard_smp_processor_id(void); 188extern int hard_smp_processor_id(void);
186# else 189# else
187# include <mach_apicdef.h> 190#include <mach_apicdef.h>
188static inline int hard_smp_processor_id(void) 191static 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