aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-i386/smp.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-i386/smp.h')
-rw-r--r--include/asm-i386/smp.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/include/asm-i386/smp.h b/include/asm-i386/smp.h
index 142d10e34ade..f87826039a51 100644
--- a/include/asm-i386/smp.h
+++ b/include/asm-i386/smp.h
@@ -80,17 +80,11 @@ static inline int hard_smp_processor_id(void)
80 return GET_APIC_ID(*(unsigned long *)(APIC_BASE+APIC_ID)); 80 return GET_APIC_ID(*(unsigned long *)(APIC_BASE+APIC_ID));
81} 81}
82#endif 82#endif
83
84static __inline int logical_smp_processor_id(void)
85{
86 /* we don't want to mark this access volatile - bad code generation */
87 return GET_APIC_LOGICAL_ID(*(unsigned long *)(APIC_BASE+APIC_LDR));
88}
89
90#endif 83#endif
91 84
92extern int __cpu_disable(void); 85extern int __cpu_disable(void);
93extern void __cpu_die(unsigned int cpu); 86extern void __cpu_die(unsigned int cpu);
87
94#endif /* !__ASSEMBLY__ */ 88#endif /* !__ASSEMBLY__ */
95 89
96#else /* CONFIG_SMP */ 90#else /* CONFIG_SMP */
@@ -100,4 +94,15 @@ extern void __cpu_die(unsigned int cpu);
100#define NO_PROC_ID 0xFF /* No processor magic marker */ 94#define NO_PROC_ID 0xFF /* No processor magic marker */
101 95
102#endif 96#endif
97
98#ifndef __ASSEMBLY__
99#ifdef CONFIG_X86_LOCAL_APIC
100static __inline int logical_smp_processor_id(void)
101{
102 /* we don't want to mark this access volatile - bad code generation */
103 return GET_APIC_LOGICAL_ID(*(unsigned long *)(APIC_BASE+APIC_LDR));
104}
105#endif
106#endif
107
103#endif 108#endif