]>
Commit | Line | Data |
---|---|---|
b2441318 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
6bfd6d72 | 2 | |
97fb7a0a | 3 | #define IDX_INVALID -1 |
6bfd6d72 | 4 | |
944770ab | 5 | struct cpudl_item { |
97fb7a0a IM |
6 | u64 dl; |
7 | int cpu; | |
8 | int idx; | |
6bfd6d72 JL |
9 | }; |
10 | ||
11 | struct cpudl { | |
97fb7a0a IM |
12 | raw_spinlock_t lock; |
13 | int size; | |
14 | cpumask_var_t free_cpus; | |
15 | struct cpudl_item *elements; | |
6bfd6d72 JL |
16 | }; |
17 | ||
6bfd6d72 | 18 | #ifdef CONFIG_SMP |
97fb7a0a | 19 | int cpudl_find(struct cpudl *cp, struct task_struct *p, struct cpumask *later_mask); |
d8206bb3 TC |
20 | void cpudl_set(struct cpudl *cp, int cpu, u64 dl); |
21 | void cpudl_clear(struct cpudl *cp, int cpu); | |
97fb7a0a | 22 | int cpudl_init(struct cpudl *cp); |
16b26943 XP |
23 | void cpudl_set_freecpu(struct cpudl *cp, int cpu); |
24 | void cpudl_clear_freecpu(struct cpudl *cp, int cpu); | |
6bfd6d72 | 25 | void cpudl_cleanup(struct cpudl *cp); |
6bfd6d72 | 26 | #endif /* CONFIG_SMP */ |