mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
Revert "power: qos: Use effective affinity mask"
This reverts commit 3007ade07d69af9696650048e127657d8a3bcf26. This was solved in the previous commits. Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com> Signed-off-by: azrim <mirzaspc@gmail.com>
This commit is contained in:
parent
d54b362346
commit
be25483dfe
@ -548,29 +548,19 @@ static void pm_qos_irq_release(struct kref *ref)
|
||||
}
|
||||
|
||||
static void pm_qos_irq_notify(struct irq_affinity_notify *notify,
|
||||
const cpumask_t *unused_mask)
|
||||
const cpumask_t *mask)
|
||||
{
|
||||
unsigned long flags;
|
||||
struct pm_qos_request *req = container_of(notify,
|
||||
struct pm_qos_request, irq_notify);
|
||||
struct pm_qos_constraints *c =
|
||||
pm_qos_array[req->pm_qos_class]->constraints;
|
||||
struct irq_desc *desc = irq_to_desc(req->irq);
|
||||
struct cpumask *new_affinity =
|
||||
irq_data_get_effective_affinity_mask(&desc->irq_data);
|
||||
bool affinity_changed = false;
|
||||
|
||||
spin_lock_irqsave(&pm_qos_lock, flags);
|
||||
if (!cpumask_equal(&req->cpus_affine, new_affinity)) {
|
||||
cpumask_copy(&req->cpus_affine, new_affinity);
|
||||
affinity_changed = true;
|
||||
}
|
||||
|
||||
cpumask_copy(&req->cpus_affine, mask);
|
||||
spin_unlock_irqrestore(&pm_qos_lock, flags);
|
||||
|
||||
if (affinity_changed)
|
||||
pm_qos_update_target(c, &req->node, PM_QOS_UPDATE_REQ,
|
||||
req->node.prio);
|
||||
pm_qos_update_target(c, &req->node, PM_QOS_UPDATE_REQ, req->node.prio);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -615,16 +605,9 @@ void pm_qos_add_request(struct pm_qos_request *req,
|
||||
if (!desc)
|
||||
return;
|
||||
|
||||
/*
|
||||
* If the IRQ is not started, the effective affinity
|
||||
* won't be set. So fallback to the default affinity.
|
||||
*/
|
||||
mask = irq_data_get_effective_affinity_mask(
|
||||
&desc->irq_data);
|
||||
if (cpumask_empty(mask))
|
||||
mask = irq_data_get_affinity_mask(
|
||||
&desc->irq_data);
|
||||
mask = desc->irq_data.common->affinity;
|
||||
|
||||
/* Get the current affinity */
|
||||
cpumask_copy(&req->cpus_affine, mask);
|
||||
req->irq_notify.irq = req->irq;
|
||||
req->irq_notify.notify = pm_qos_irq_notify;
|
||||
|
Loading…
x
Reference in New Issue
Block a user