/root/src/xen/xen/include/asm/smp.h
Line | Count | Source (jump to first uncovered line) |
1 | | #ifndef __ASM_SMP_H |
2 | | #define __ASM_SMP_H |
3 | | |
4 | | /* |
5 | | * We need the APIC definitions automatically as part of 'smp.h' |
6 | | */ |
7 | | #ifndef __ASSEMBLY__ |
8 | | #include <xen/kernel.h> |
9 | | #include <xen/cpumask.h> |
10 | | #include <asm/current.h> |
11 | | #endif |
12 | | |
13 | | #ifndef __ASSEMBLY__ |
14 | | #include <xen/bitops.h> |
15 | | #include <asm/mpspec.h> |
16 | | #endif |
17 | | |
18 | 100 | #define BAD_APICID (-1U) |
19 | 12 | #define INVALID_CUID (~0U) /* AMD Compute Unit ID */ |
20 | | #ifndef __ASSEMBLY__ |
21 | | |
22 | | /* |
23 | | * Private routines/data |
24 | | */ |
25 | | DECLARE_PER_CPU(cpumask_var_t, cpu_sibling_mask); |
26 | | DECLARE_PER_CPU(cpumask_var_t, cpu_core_mask); |
27 | | DECLARE_PER_CPU(cpumask_var_t, scratch_cpumask); |
28 | | |
29 | | void smp_send_nmi_allbutself(void); |
30 | | |
31 | | void send_IPI_mask(const cpumask_t *, int vector); |
32 | | void send_IPI_self(int vector); |
33 | | |
34 | | extern void (*mtrr_hook) (void); |
35 | | |
36 | | extern void zap_low_mappings(void); |
37 | | |
38 | | extern u32 x86_cpu_to_apicid[]; |
39 | | |
40 | 0 | #define cpu_physical_id(cpu) x86_cpu_to_apicid[cpu] |
41 | | |
42 | 11.0M | #define cpu_is_offline(cpu) unlikely(!cpu_online(cpu)) |
43 | | extern void cpu_exit_clear(unsigned int cpu); |
44 | | extern void cpu_uninit(unsigned int cpu); |
45 | | int cpu_add(uint32_t apic_id, uint32_t acpi_id, uint32_t pxm); |
46 | | |
47 | | /* |
48 | | * This function is needed by all SMP systems. It must _always_ be valid |
49 | | * from the initial startup. We map APIC_BASE very early in page_setup(), |
50 | | * so this is correct in the x86 case. |
51 | | */ |
52 | 78.6M | #define raw_smp_processor_id() (get_processor_id()) |
53 | | |
54 | | void __stop_this_cpu(void); |
55 | | |
56 | | long cpu_up_helper(void *data); |
57 | | long cpu_down_helper(void *data); |
58 | | |
59 | | long core_parking_helper(void *data); |
60 | | uint32_t get_cur_idle_nums(void); |
61 | | |
62 | | /* |
63 | | * The value may be greater than the actual socket number in the system and |
64 | | * is required not to change from the initial startup. |
65 | | */ |
66 | | extern unsigned int nr_sockets; |
67 | | |
68 | | void set_nr_sockets(void); |
69 | | |
70 | | /* Representing HT and core siblings in each socket. */ |
71 | | extern cpumask_t **socket_cpumask; |
72 | | |
73 | | #endif /* !__ASSEMBLY__ */ |
74 | | |
75 | | #endif |