]> err.no Git - linux-2.6/blobdiff - include/asm-i386/smp.h
[PATCH] x86: Some preparationary cleanup for stack trace
[linux-2.6] / include / asm-i386 / smp.h
index 61d3ab9db70cd7c9559907e5c0106962b110ede6..f87826039a5118eeef7e2c033295ef83f09657b0 100644 (file)
@@ -5,7 +5,6 @@
  * We need the APIC definitions automatically as part of 'smp.h'
  */
 #ifndef __ASSEMBLY__
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/threads.h>
 #include <linux/cpumask.h>
@@ -81,17 +80,11 @@ static inline int hard_smp_processor_id(void)
        return GET_APIC_ID(*(unsigned long *)(APIC_BASE+APIC_ID));
 }
 #endif
-
-static __inline int logical_smp_processor_id(void)
-{
-       /* we don't want to mark this access volatile - bad code generation */
-       return GET_APIC_LOGICAL_ID(*(unsigned long *)(APIC_BASE+APIC_LDR));
-}
-
 #endif
 
 extern int __cpu_disable(void);
 extern void __cpu_die(unsigned int cpu);
+
 #endif /* !__ASSEMBLY__ */
 
 #else /* CONFIG_SMP */
@@ -101,4 +94,15 @@ extern void __cpu_die(unsigned int cpu);
 #define NO_PROC_ID             0xFF            /* No processor magic marker */
 
 #endif
+
+#ifndef __ASSEMBLY__
+#ifdef CONFIG_X86_LOCAL_APIC
+static __inline int logical_smp_processor_id(void)
+{
+       /* we don't want to mark this access volatile - bad code generation */
+       return GET_APIC_LOGICAL_ID(*(unsigned long *)(APIC_BASE+APIC_LDR));
+}
+#endif
+#endif
+
 #endif