2 * ----------------------------------------------------------------------------
3 * "THE BEER-WARE LICENSE" (Revision 42):
4 * <phk@FreeBSD.org> wrote this file. As long as you retain this notice you
5 * can do whatever you want with this stuff. If we meet some day, and you think
6 * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
7 * ----------------------------------------------------------------------------
9 * $FreeBSD: src/sys/i386/include/smp.h,v 1.50.2.5 2001/02/13 22:32:45 tegge Exp $
12 #ifndef _MACHINE_SMP_H_
13 #define _MACHINE_SMP_H_
19 /* global data in apic_vector.s */
20 extern volatile cpumask_t stopped_cpus
;
21 extern int optcpus
; /* from main() */
22 extern int vkernel_b_arg
; /* arg from main() */
23 extern int vkernel_B_arg
; /* arg from main() */
26 void mp_announce (void);
27 int stop_cpus (cpumask_t
);
29 int restart_cpus (cpumask_t
);
30 void cpu_send_ipiq (int);
31 int cpu_send_ipiq_passive (int);
33 /* global data in init_smp.c */
34 extern cpumask_t smp_active_mask
;
36 /* Detect CPU topology bits */
37 void detect_cpu_topology(void);
39 /* Interface functions for IDs calculation */
40 int get_chip_ID(int cpuid
);
41 int get_chip_ID_from_APICID(int apicid
);
42 int get_core_number_within_chip(int cpuid
);
43 int get_logical_CPU_number_within_core(int cpuid
);
45 /* Assume that APICID = CPUID for virtual processors */
46 #define get_cpuid_from_apicid(apicid) apicid
47 #define get_apicid_from_cpuid(cpuid) cpuid
52 #endif /* _MACHINE_SMP_H_ */