^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) #define IDX_INVALID -1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) struct cpudl_item {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) u64 dl;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) int cpu;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) int idx;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) struct cpudl {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) raw_spinlock_t lock;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) int size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) cpumask_var_t free_cpus;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) struct cpudl_item *elements;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) #ifdef CONFIG_SMP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) int cpudl_find(struct cpudl *cp, struct task_struct *p, struct cpumask *later_mask);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) void cpudl_set(struct cpudl *cp, int cpu, u64 dl);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) void cpudl_clear(struct cpudl *cp, int cpu);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) int cpudl_init(struct cpudl *cp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) void cpudl_set_freecpu(struct cpudl *cp, int cpu);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) void cpudl_clear_freecpu(struct cpudl *cp, int cpu);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) void cpudl_cleanup(struct cpudl *cp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) #endif /* CONFIG_SMP */