Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 
0003 #define IDX_INVALID     -1
0004 
0005 struct cpudl_item {
0006     u64         dl;
0007     int         cpu;
0008     int         idx;
0009 };
0010 
0011 struct cpudl {
0012     raw_spinlock_t      lock;
0013     int         size;
0014     cpumask_var_t       free_cpus;
0015     struct cpudl_item   *elements;
0016 };
0017 
0018 #ifdef CONFIG_SMP
0019 int  cpudl_find(struct cpudl *cp, struct task_struct *p, struct cpumask *later_mask);
0020 void cpudl_set(struct cpudl *cp, int cpu, u64 dl);
0021 void cpudl_clear(struct cpudl *cp, int cpu);
0022 int  cpudl_init(struct cpudl *cp);
0023 void cpudl_set_freecpu(struct cpudl *cp, int cpu);
0024 void cpudl_clear_freecpu(struct cpudl *cp, int cpu);
0025 void cpudl_cleanup(struct cpudl *cp);
0026 #endif /* CONFIG_SMP */