Lines Matching refs:drv
48 static inline void __cpuidle_unset_driver(struct cpuidle_driver *drv) in __cpuidle_unset_driver() argument
52 for_each_cpu(cpu, drv->cpumask) { in __cpuidle_unset_driver()
54 if (drv != __cpuidle_get_cpu_driver(cpu)) in __cpuidle_unset_driver()
68 static inline int __cpuidle_set_driver(struct cpuidle_driver *drv) in __cpuidle_set_driver() argument
72 for_each_cpu(cpu, drv->cpumask) { in __cpuidle_set_driver()
76 if (old_drv && old_drv != drv) in __cpuidle_set_driver()
80 for_each_cpu(cpu, drv->cpumask) in __cpuidle_set_driver()
81 per_cpu(cpuidle_drivers, cpu) = drv; in __cpuidle_set_driver()
108 static inline int __cpuidle_set_driver(struct cpuidle_driver *drv) in __cpuidle_set_driver() argument
113 cpuidle_curr_driver = drv; in __cpuidle_set_driver()
125 static inline void __cpuidle_unset_driver(struct cpuidle_driver *drv) in __cpuidle_unset_driver() argument
127 if (drv == cpuidle_curr_driver) in __cpuidle_unset_driver()
154 static void __cpuidle_driver_init(struct cpuidle_driver *drv) in __cpuidle_driver_init() argument
163 if (!drv->cpumask) in __cpuidle_driver_init()
164 drv->cpumask = (struct cpumask *)cpu_possible_mask; in __cpuidle_driver_init()
166 for (i = 0; i < drv->state_count; i++) { in __cpuidle_driver_init()
167 struct cpuidle_state *s = &drv->states[i]; in __cpuidle_driver_init()
175 drv->bctimer = 1; in __cpuidle_driver_init()
207 static int __cpuidle_register_driver(struct cpuidle_driver *drv) in __cpuidle_register_driver() argument
211 if (!drv || !drv->state_count) in __cpuidle_register_driver()
214 ret = cpuidle_coupled_state_verify(drv); in __cpuidle_register_driver()
221 __cpuidle_driver_init(drv); in __cpuidle_register_driver()
223 ret = __cpuidle_set_driver(drv); in __cpuidle_register_driver()
227 if (drv->bctimer) in __cpuidle_register_driver()
228 on_each_cpu_mask(drv->cpumask, cpuidle_setup_broadcast_timer, in __cpuidle_register_driver()
243 static void __cpuidle_unregister_driver(struct cpuidle_driver *drv) in __cpuidle_unregister_driver() argument
245 if (drv->bctimer) { in __cpuidle_unregister_driver()
246 drv->bctimer = 0; in __cpuidle_unregister_driver()
247 on_each_cpu_mask(drv->cpumask, cpuidle_setup_broadcast_timer, in __cpuidle_unregister_driver()
251 __cpuidle_unset_driver(drv); in __cpuidle_unregister_driver()
264 int cpuidle_register_driver(struct cpuidle_driver *drv) in cpuidle_register_driver() argument
270 ret = __cpuidle_register_driver(drv); in cpuidle_register_driver()
273 if (!ret && !strlen(param_governor) && drv->governor && in cpuidle_register_driver()
274 (cpuidle_get_driver() == drv)) { in cpuidle_register_driver()
276 gov = cpuidle_find_governor(drv->governor); in cpuidle_register_driver()
297 void cpuidle_unregister_driver(struct cpuidle_driver *drv) in cpuidle_unregister_driver() argument
299 bool enabled = (cpuidle_get_driver() == drv); in cpuidle_unregister_driver()
302 __cpuidle_unregister_driver(drv); in cpuidle_unregister_driver()
324 struct cpuidle_driver *drv; in cpuidle_get_driver() local
328 drv = __cpuidle_get_cpu_driver(cpu); in cpuidle_get_driver()
331 return drv; in cpuidle_get_driver()
357 void cpuidle_driver_state_disabled(struct cpuidle_driver *drv, int idx, in cpuidle_driver_state_disabled() argument
366 if (!drv->cpumask) { in cpuidle_driver_state_disabled()
367 drv->states[idx].flags |= CPUIDLE_FLAG_UNUSABLE; in cpuidle_driver_state_disabled()
371 for_each_cpu(cpu, drv->cpumask) { in cpuidle_driver_state_disabled()