Commit | Line | Data |
---|---|---|
b2441318 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
6e0534f2 | 2 | |
e539d8fc | 3 | #define CPUPRI_NR_PRIORITIES (MAX_RT_PRIO + 2) |
6e0534f2 | 4 | |
97fb7a0a IM |
5 | #define CPUPRI_INVALID -1 |
6 | #define CPUPRI_IDLE 0 | |
7 | #define CPUPRI_NORMAL 1 | |
6e0534f2 GH |
8 | /* values 2-101 are RT priorities 0-99 */ |
9 | ||
10 | struct cpupri_vec { | |
97fb7a0a IM |
11 | atomic_t count; |
12 | cpumask_var_t mask; | |
6e0534f2 GH |
13 | }; |
14 | ||
15 | struct cpupri { | |
97fb7a0a IM |
16 | struct cpupri_vec pri_to_cpu[CPUPRI_NR_PRIORITIES]; |
17 | int *cpu_to_pri; | |
6e0534f2 GH |
18 | }; |
19 | ||
20 | #ifdef CONFIG_SMP | |
97fb7a0a | 21 | int cpupri_find(struct cpupri *cp, struct task_struct *p, struct cpumask *lowest_mask); |
6e0534f2 | 22 | void cpupri_set(struct cpupri *cp, int cpu, int pri); |
97fb7a0a | 23 | int cpupri_init(struct cpupri *cp); |
68e74568 | 24 | void cpupri_cleanup(struct cpupri *cp); |
6e0534f2 | 25 | #endif |