Loading kernel/power/qos.c +10 −4 Original line number Original line Diff line number Diff line Loading @@ -160,7 +160,8 @@ static inline void pm_qos_set_value(struct pm_qos_constraints *c, s32 value) c->target_value = value; c->target_value = value; } } static inline void pm_qos_set_value_for_cpus(struct pm_qos_constraints *c) static inline void pm_qos_set_value_for_cpus(struct pm_qos_constraints *c, struct cpumask *cpus) { { struct pm_qos_request *req = NULL; struct pm_qos_request *req = NULL; int cpu; int cpu; Loading @@ -184,9 +185,12 @@ static inline void pm_qos_set_value_for_cpus(struct pm_qos_constraints *c) } } } } for_each_possible_cpu(cpu) for_each_possible_cpu(cpu) { if (c->target_per_cpu[cpu] != qos_val[cpu]) cpumask_set_cpu(cpu, cpus); c->target_per_cpu[cpu] = qos_val[cpu]; c->target_per_cpu[cpu] = qos_val[cpu]; } } } /** /** * pm_qos_update_target - manages the constraints list and calls the notifiers * pm_qos_update_target - manages the constraints list and calls the notifiers Loading @@ -206,6 +210,7 @@ int pm_qos_update_target(struct pm_qos_constraints *c, unsigned long flags; unsigned long flags; int prev_value, curr_value, new_value; int prev_value, curr_value, new_value; struct plist_node *node = &req->node; struct plist_node *node = &req->node; struct cpumask cpus; spin_lock_irqsave(&pm_qos_lock, flags); spin_lock_irqsave(&pm_qos_lock, flags); prev_value = pm_qos_get_value(c); prev_value = pm_qos_get_value(c); Loading Loading @@ -235,15 +240,16 @@ int pm_qos_update_target(struct pm_qos_constraints *c, } } curr_value = pm_qos_get_value(c); curr_value = pm_qos_get_value(c); cpumask_clear(&cpus); pm_qos_set_value(c, curr_value); pm_qos_set_value(c, curr_value); pm_qos_set_value_for_cpus(c); pm_qos_set_value_for_cpus(c, &cpus); spin_unlock_irqrestore(&pm_qos_lock, flags); spin_unlock_irqrestore(&pm_qos_lock, flags); if (prev_value != curr_value) { if (prev_value != curr_value) { blocking_notifier_call_chain(c->notifiers, blocking_notifier_call_chain(c->notifiers, (unsigned long)curr_value, (unsigned long)curr_value, NULL); &cpus); return 1; return 1; } else { } else { return 0; return 0; Loading Loading
kernel/power/qos.c +10 −4 Original line number Original line Diff line number Diff line Loading @@ -160,7 +160,8 @@ static inline void pm_qos_set_value(struct pm_qos_constraints *c, s32 value) c->target_value = value; c->target_value = value; } } static inline void pm_qos_set_value_for_cpus(struct pm_qos_constraints *c) static inline void pm_qos_set_value_for_cpus(struct pm_qos_constraints *c, struct cpumask *cpus) { { struct pm_qos_request *req = NULL; struct pm_qos_request *req = NULL; int cpu; int cpu; Loading @@ -184,9 +185,12 @@ static inline void pm_qos_set_value_for_cpus(struct pm_qos_constraints *c) } } } } for_each_possible_cpu(cpu) for_each_possible_cpu(cpu) { if (c->target_per_cpu[cpu] != qos_val[cpu]) cpumask_set_cpu(cpu, cpus); c->target_per_cpu[cpu] = qos_val[cpu]; c->target_per_cpu[cpu] = qos_val[cpu]; } } } /** /** * pm_qos_update_target - manages the constraints list and calls the notifiers * pm_qos_update_target - manages the constraints list and calls the notifiers Loading @@ -206,6 +210,7 @@ int pm_qos_update_target(struct pm_qos_constraints *c, unsigned long flags; unsigned long flags; int prev_value, curr_value, new_value; int prev_value, curr_value, new_value; struct plist_node *node = &req->node; struct plist_node *node = &req->node; struct cpumask cpus; spin_lock_irqsave(&pm_qos_lock, flags); spin_lock_irqsave(&pm_qos_lock, flags); prev_value = pm_qos_get_value(c); prev_value = pm_qos_get_value(c); Loading Loading @@ -235,15 +240,16 @@ int pm_qos_update_target(struct pm_qos_constraints *c, } } curr_value = pm_qos_get_value(c); curr_value = pm_qos_get_value(c); cpumask_clear(&cpus); pm_qos_set_value(c, curr_value); pm_qos_set_value(c, curr_value); pm_qos_set_value_for_cpus(c); pm_qos_set_value_for_cpus(c, &cpus); spin_unlock_irqrestore(&pm_qos_lock, flags); spin_unlock_irqrestore(&pm_qos_lock, flags); if (prev_value != curr_value) { if (prev_value != curr_value) { blocking_notifier_call_chain(c->notifiers, blocking_notifier_call_chain(c->notifiers, (unsigned long)curr_value, (unsigned long)curr_value, NULL); &cpus); return 1; return 1; } else { } else { return 0; return 0; Loading