extern void (*mtrr_hook) (void);
extern void zap_low_mappings(void);
void smp_stop_cpu(void);
-extern char cpu_sibling_map[];
+extern cpumask_t cpu_sibling_map[NR_CPUS];
extern char phys_proc_id[NR_CPUS];
#define SMP_TRAMPOLINE_BASE 0x6000
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)
{
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 */
-#define TARGET_CPUS 1
#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
+#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