This source file includes following definitions.
- show_ipi_stats
- riscv_hartid_to_cpuid
- cpuid_to_hartid_map
1
2
3
4
5
6 #ifndef _ASM_RISCV_SMP_H
7 #define _ASM_RISCV_SMP_H
8
9 #include <linux/cpumask.h>
10 #include <linux/irqreturn.h>
11 #include <linux/thread_info.h>
12
13 #define INVALID_HARTID ULONG_MAX
14
15 struct seq_file;
16 extern unsigned long boot_cpu_hartid;
17
18 #ifdef CONFIG_SMP
19
20
21
22 extern unsigned long __cpuid_to_hartid_map[NR_CPUS];
23 #define cpuid_to_hartid_map(cpu) __cpuid_to_hartid_map[cpu]
24
25
26 void show_ipi_stats(struct seq_file *p, int prec);
27
28
29 void __init setup_smp(void);
30
31
32 void arch_send_call_function_ipi_mask(struct cpumask *mask);
33
34
35 void arch_send_call_function_single_ipi(int cpu);
36
37 int riscv_hartid_to_cpuid(int hartid);
38 void riscv_cpuid_to_hartid_mask(const struct cpumask *in, struct cpumask *out);
39
40
41
42
43
44 #define raw_smp_processor_id() (current_thread_info()->cpu)
45
46 #else
47
48 static inline void show_ipi_stats(struct seq_file *p, int prec)
49 {
50 }
51
52 static inline int riscv_hartid_to_cpuid(int hartid)
53 {
54 if (hartid == boot_cpu_hartid)
55 return 0;
56
57 return -1;
58 }
59 static inline unsigned long cpuid_to_hartid_map(int cpu)
60 {
61 return boot_cpu_hartid;
62 }
63
64 #endif
65 #endif