cpudeadline.h 637 B

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