git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vserver 1.9.3
[linux-2.6.git]
/
include
/
asm-x86_64
/
smp.h
diff --git
a/include/asm-x86_64/smp.h
b/include/asm-x86_64/smp.h
index
2878896
..
03841be
100644
(file)
--- a/
include/asm-x86_64/smp.h
+++ b/
include/asm-x86_64/smp.h
@@
-60,7
+60,6
@@
extern char phys_proc_id[NR_CPUS];
extern cpumask_t cpu_callout_map;
#define cpu_possible_map cpu_callout_map
extern cpumask_t cpu_callout_map;
#define cpu_possible_map cpu_callout_map
-#define cpu_online(cpu) cpu_isset(cpu, cpu_online_map)
static inline int num_booting_cpus(void)
{
static inline int num_booting_cpus(void)
{
@@
-105,19
+104,22
@@
static inline int cpu_present_to_apicid(int mps_cpu)
return BAD_APICID;
}
return BAD_APICID;
}
-#define cpu_online(cpu) cpu_isset(cpu, cpu_online_map)
#endif /* !ASSEMBLY */
#define NO_PROC_ID 0xFF /* No processor magic marker */
#endif
#define INT_DELIVERY_MODE 1 /* logical delivery */
#endif /* !ASSEMBLY */
#define NO_PROC_ID 0xFF /* No processor magic marker */
#endif
#define INT_DELIVERY_MODE 1 /* logical delivery */
-#define TARGET_CPUS 1
#ifndef ASSEMBLY
#ifndef ASSEMBLY
-static inline unsigned int cpu_mask_to_apicid(cpumask_const_t cpumask)
+#ifdef CONFIG_SMP
+#define TARGET_CPUS cpu_online_map
+#else
+#define TARGET_CPUS cpumask_of_cpu(0)
+#endif
+static inline unsigned int cpu_mask_to_apicid(cpumask_t cpumask)
{
{
- return cpus_
coerce_const(cpumask)
;
+ return cpus_
addr(cpumask)[0]
;
}
#endif
}
#endif
@@
-135,5
+137,13
@@
static inline unsigned int cpu_mask_to_apicid(cpumask_const_t cpumask)
})
#endif
})
#endif
+#ifndef __ASSEMBLY__
+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