This source file includes following definitions.
- smp_init_cpus
- arc_platform_smp_cpuinfo
1
2
3
4
5
6 #ifndef __ASM_ARC_SMP_H
7 #define __ASM_ARC_SMP_H
8
9 #ifdef CONFIG_SMP
10
11 #include <linux/types.h>
12 #include <linux/init.h>
13 #include <linux/threads.h>
14
15 #define raw_smp_processor_id() (current_thread_info()->cpu)
16
17
18 struct cpumask;
19
20
21
22
23 extern void arch_send_call_function_single_ipi(int cpu);
24 extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
25
26
27
28
29 extern void __init smp_init_cpus(void);
30 extern void first_lines_of_secondary(void);
31 extern const char *arc_platform_smp_cpuinfo(void);
32
33
34
35
36
37
38
39 extern int smp_ipi_irq_setup(int cpu, irq_hw_number_t hwirq);
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54 struct plat_smp_ops {
55 const char *info;
56 void (*init_early_smp)(void);
57 void (*init_per_cpu)(int cpu);
58 void (*cpu_kick)(int cpu, unsigned long pc);
59 void (*ipi_send)(int cpu);
60 void (*ipi_clear)(int irq);
61 };
62
63
64 extern struct plat_smp_ops plat_smp_ops;
65
66 #else
67
68 static inline void smp_init_cpus(void) {}
69 static inline const char *arc_platform_smp_cpuinfo(void)
70 {
71 return "";
72 }
73
74 #endif
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100 #ifndef CONFIG_ARC_HAS_LLSC
101
102 #include <linux/irqflags.h>
103 #ifdef CONFIG_SMP
104
105 #include <asm/spinlock.h>
106
107 extern arch_spinlock_t smp_atomic_ops_lock;
108 extern arch_spinlock_t smp_bitops_lock;
109
110 #define atomic_ops_lock(flags) do { \
111 local_irq_save(flags); \
112 arch_spin_lock(&smp_atomic_ops_lock); \
113 } while (0)
114
115 #define atomic_ops_unlock(flags) do { \
116 arch_spin_unlock(&smp_atomic_ops_lock); \
117 local_irq_restore(flags); \
118 } while (0)
119
120 #define bitops_lock(flags) do { \
121 local_irq_save(flags); \
122 arch_spin_lock(&smp_bitops_lock); \
123 } while (0)
124
125 #define bitops_unlock(flags) do { \
126 arch_spin_unlock(&smp_bitops_lock); \
127 local_irq_restore(flags); \
128 } while (0)
129
130 #else
131
132 #define atomic_ops_lock(flags) local_irq_save(flags)
133 #define atomic_ops_unlock(flags) local_irq_restore(flags)
134
135 #define bitops_lock(flags) local_irq_save(flags)
136 #define bitops_unlock(flags) local_irq_restore(flags)
137
138 #endif
139
140 #endif
141
142 #endif