coupled           150 drivers/cpuidle/coupled.c 	int n = dev->coupled->online_count;
coupled           205 drivers/cpuidle/coupled.c static inline void cpuidle_coupled_set_ready(struct cpuidle_coupled *coupled)
coupled           207 drivers/cpuidle/coupled.c 	atomic_add(MAX_WAITING_CPUS, &coupled->ready_waiting_counts);
coupled           225 drivers/cpuidle/coupled.c inline int cpuidle_coupled_set_not_ready(struct cpuidle_coupled *coupled)
coupled           230 drivers/cpuidle/coupled.c 	all = coupled->online_count | (coupled->online_count << WAITING_BITS);
coupled           231 drivers/cpuidle/coupled.c 	ret = atomic_add_unless(&coupled->ready_waiting_counts,
coupled           243 drivers/cpuidle/coupled.c static inline int cpuidle_coupled_no_cpus_ready(struct cpuidle_coupled *coupled)
coupled           245 drivers/cpuidle/coupled.c 	int r = atomic_read(&coupled->ready_waiting_counts) >> WAITING_BITS;
coupled           255 drivers/cpuidle/coupled.c static inline bool cpuidle_coupled_cpus_ready(struct cpuidle_coupled *coupled)
coupled           257 drivers/cpuidle/coupled.c 	int r = atomic_read(&coupled->ready_waiting_counts) >> WAITING_BITS;
coupled           258 drivers/cpuidle/coupled.c 	return r == coupled->online_count;
coupled           267 drivers/cpuidle/coupled.c static inline bool cpuidle_coupled_cpus_waiting(struct cpuidle_coupled *coupled)
coupled           269 drivers/cpuidle/coupled.c 	int w = atomic_read(&coupled->ready_waiting_counts) & WAITING_MASK;
coupled           270 drivers/cpuidle/coupled.c 	return w == coupled->online_count;
coupled           279 drivers/cpuidle/coupled.c static inline int cpuidle_coupled_no_cpus_waiting(struct cpuidle_coupled *coupled)
coupled           281 drivers/cpuidle/coupled.c 	int w = atomic_read(&coupled->ready_waiting_counts) & WAITING_MASK;
coupled           293 drivers/cpuidle/coupled.c 		struct cpuidle_coupled *coupled)
coupled           305 drivers/cpuidle/coupled.c 	for_each_cpu(i, &coupled->coupled_cpus)
coupled           306 drivers/cpuidle/coupled.c 		if (cpu_online(i) && coupled->requested_state[i] < state)
coupled           307 drivers/cpuidle/coupled.c 			state = coupled->requested_state[i];
coupled           347 drivers/cpuidle/coupled.c 		struct cpuidle_coupled *coupled)
coupled           351 drivers/cpuidle/coupled.c 	for_each_cpu(cpu, &coupled->coupled_cpus)
coupled           366 drivers/cpuidle/coupled.c 		struct cpuidle_coupled *coupled, int next_state)
coupled           368 drivers/cpuidle/coupled.c 	coupled->requested_state[cpu] = next_state;
coupled           374 drivers/cpuidle/coupled.c 	return atomic_inc_return(&coupled->ready_waiting_counts) & WAITING_MASK;
coupled           385 drivers/cpuidle/coupled.c 		struct cpuidle_coupled *coupled)
coupled           393 drivers/cpuidle/coupled.c 	atomic_dec(&coupled->ready_waiting_counts);
coupled           395 drivers/cpuidle/coupled.c 	coupled->requested_state[cpu] = CPUIDLE_COUPLED_NOT_IDLE;
coupled           407 drivers/cpuidle/coupled.c static void cpuidle_coupled_set_done(int cpu, struct cpuidle_coupled *coupled)
coupled           409 drivers/cpuidle/coupled.c 	cpuidle_coupled_set_not_waiting(cpu, coupled);
coupled           410 drivers/cpuidle/coupled.c 	atomic_sub(MAX_WAITING_CPUS, &coupled->ready_waiting_counts);
coupled           439 drivers/cpuidle/coupled.c static bool cpuidle_coupled_any_pokes_pending(struct cpuidle_coupled *coupled)
coupled           444 drivers/cpuidle/coupled.c 	cpumask_and(&cpus, cpu_online_mask, &coupled->coupled_cpus);
coupled           473 drivers/cpuidle/coupled.c 	struct cpuidle_coupled *coupled = dev->coupled;
coupled           476 drivers/cpuidle/coupled.c 	if (!coupled)
coupled           479 drivers/cpuidle/coupled.c 	while (coupled->prevent) {
coupled           496 drivers/cpuidle/coupled.c 	w = cpuidle_coupled_set_waiting(dev->cpu, coupled, next_state);
coupled           504 drivers/cpuidle/coupled.c 	if (w == coupled->online_count) {
coupled           506 drivers/cpuidle/coupled.c 		cpuidle_coupled_poke_others(dev->cpu, coupled);
coupled           518 drivers/cpuidle/coupled.c 	while (!cpuidle_coupled_cpus_waiting(coupled) ||
coupled           524 drivers/cpuidle/coupled.c 			cpuidle_coupled_set_not_waiting(dev->cpu, coupled);
coupled           528 drivers/cpuidle/coupled.c 		if (coupled->prevent) {
coupled           529 drivers/cpuidle/coupled.c 			cpuidle_coupled_set_not_waiting(dev->cpu, coupled);
coupled           540 drivers/cpuidle/coupled.c 		cpuidle_coupled_set_not_waiting(dev->cpu, coupled);
coupled           559 drivers/cpuidle/coupled.c 	cpuidle_coupled_set_ready(coupled);
coupled           560 drivers/cpuidle/coupled.c 	while (!cpuidle_coupled_cpus_ready(coupled)) {
coupled           562 drivers/cpuidle/coupled.c 		if (!cpuidle_coupled_cpus_waiting(coupled))
coupled           563 drivers/cpuidle/coupled.c 			if (!cpuidle_coupled_set_not_ready(coupled))
coupled           584 drivers/cpuidle/coupled.c 	if (cpuidle_coupled_any_pokes_pending(coupled)) {
coupled           585 drivers/cpuidle/coupled.c 		cpuidle_coupled_set_done(dev->cpu, coupled);
coupled           587 drivers/cpuidle/coupled.c 		cpuidle_coupled_parallel_barrier(dev, &coupled->abort_barrier);
coupled           592 drivers/cpuidle/coupled.c 	next_state = cpuidle_coupled_get_state(dev, coupled);
coupled           596 drivers/cpuidle/coupled.c 	cpuidle_coupled_set_done(dev->cpu, coupled);
coupled           620 drivers/cpuidle/coupled.c 	while (!cpuidle_coupled_no_cpus_ready(coupled))
coupled           626 drivers/cpuidle/coupled.c static void cpuidle_coupled_update_online_cpus(struct cpuidle_coupled *coupled)
coupled           629 drivers/cpuidle/coupled.c 	cpumask_and(&cpus, cpu_online_mask, &coupled->coupled_cpus);
coupled           630 drivers/cpuidle/coupled.c 	coupled->online_count = cpumask_weight(&cpus);
coupled           646 drivers/cpuidle/coupled.c 	struct cpuidle_coupled *coupled;
coupled           653 drivers/cpuidle/coupled.c 		if (other_dev && other_dev->coupled) {
coupled           654 drivers/cpuidle/coupled.c 			coupled = other_dev->coupled;
coupled           660 drivers/cpuidle/coupled.c 	coupled = kzalloc(sizeof(struct cpuidle_coupled), GFP_KERNEL);
coupled           661 drivers/cpuidle/coupled.c 	if (!coupled)
coupled           664 drivers/cpuidle/coupled.c 	coupled->coupled_cpus = dev->coupled_cpus;
coupled           667 drivers/cpuidle/coupled.c 	dev->coupled = coupled;
coupled           668 drivers/cpuidle/coupled.c 	if (WARN_ON(!cpumask_equal(&dev->coupled_cpus, &coupled->coupled_cpus)))
coupled           669 drivers/cpuidle/coupled.c 		coupled->prevent++;
coupled           671 drivers/cpuidle/coupled.c 	cpuidle_coupled_update_online_cpus(coupled);
coupled           673 drivers/cpuidle/coupled.c 	coupled->refcnt++;
coupled           692 drivers/cpuidle/coupled.c 	struct cpuidle_coupled *coupled = dev->coupled;
coupled           697 drivers/cpuidle/coupled.c 	if (--coupled->refcnt)
coupled           698 drivers/cpuidle/coupled.c 		kfree(coupled);
coupled           699 drivers/cpuidle/coupled.c 	dev->coupled = NULL;
coupled           709 drivers/cpuidle/coupled.c static void cpuidle_coupled_prevent_idle(struct cpuidle_coupled *coupled)
coupled           714 drivers/cpuidle/coupled.c 	coupled->prevent++;
coupled           715 drivers/cpuidle/coupled.c 	cpuidle_coupled_poke_others(cpu, coupled);
coupled           717 drivers/cpuidle/coupled.c 	while (!cpuidle_coupled_no_cpus_waiting(coupled))
coupled           728 drivers/cpuidle/coupled.c static void cpuidle_coupled_allow_idle(struct cpuidle_coupled *coupled)
coupled           737 drivers/cpuidle/coupled.c 	coupled->prevent--;
coupled           739 drivers/cpuidle/coupled.c 	cpuidle_coupled_poke_others(cpu, coupled);
coupled           750 drivers/cpuidle/coupled.c 	if (dev && dev->coupled) {
coupled           751 drivers/cpuidle/coupled.c 		cpuidle_coupled_update_online_cpus(dev->coupled);
coupled           752 drivers/cpuidle/coupled.c 		cpuidle_coupled_allow_idle(dev->coupled);
coupled           766 drivers/cpuidle/coupled.c 	if (dev && dev->coupled)
coupled           767 drivers/cpuidle/coupled.c 		cpuidle_coupled_prevent_idle(dev->coupled);
coupled            99 include/linux/cpuidle.h 	struct cpuidle_coupled	*coupled;