qcacld-3.0: Use for_each_present_cpu() to traverse each cpu
On quad-core cpu paltform, the qdf_for_each_possible_cpu() iterate 8 times in the hdd_pm_qos_add_request() trying to add pm qos request for CPU0~7, but only CPU0~3 actually. There is same issue in the hdd_pm_qos_update_request()/hdd_pm_qos_remove_request(), it hit the kernel waring about "called for unknown object" when try to update /remove pm qos request for non-existed CPU4~7. The fix is to use for_each_present_cpu() to traverse each cpu to avoid the kernel warning. Change-Id: I38fe4a6807452e11eb7230c2c194af7cbae28564 CRs-Fixed: 2902547
This commit is contained in:
@@ -9779,7 +9779,7 @@ static inline void hdd_pm_qos_update_request(struct hdd_context *hdd_ctx,
|
|||||||
|
|
||||||
if (qdf_cpumask_empty(pm_qos_cpu_mask)) {
|
if (qdf_cpumask_empty(pm_qos_cpu_mask)) {
|
||||||
latency = wlan_hdd_get_pm_qos_cpu_latency();
|
latency = wlan_hdd_get_pm_qos_cpu_latency();
|
||||||
qdf_for_each_possible_cpu(cpu) {
|
for_each_present_cpu(cpu) {
|
||||||
dev_pm_qos_update_request(
|
dev_pm_qos_update_request(
|
||||||
&hdd_ctx->pm_qos_req[cpu],
|
&hdd_ctx->pm_qos_req[cpu],
|
||||||
latency);
|
latency);
|
||||||
@@ -9815,7 +9815,7 @@ static inline void hdd_pm_qos_add_request(struct hdd_context *hdd_ctx)
|
|||||||
qdf_cpumask_clear(&hdd_ctx->qos_cpu_mask);
|
qdf_cpumask_clear(&hdd_ctx->qos_cpu_mask);
|
||||||
hdd_pm_qos_update_cpu_mask(&hdd_ctx->qos_cpu_mask, false);
|
hdd_pm_qos_update_cpu_mask(&hdd_ctx->qos_cpu_mask, false);
|
||||||
|
|
||||||
for_each_possible_cpu(cpu) {
|
for_each_present_cpu(cpu) {
|
||||||
cpu_dev = get_cpu_device(cpu);
|
cpu_dev = get_cpu_device(cpu);
|
||||||
|
|
||||||
dev_pm_qos_add_request(cpu_dev, &hdd_ctx->pm_qos_req[cpu],
|
dev_pm_qos_add_request(cpu_dev, &hdd_ctx->pm_qos_req[cpu],
|
||||||
@@ -9830,7 +9830,7 @@ static inline void hdd_pm_qos_remove_request(struct hdd_context *hdd_ctx)
|
|||||||
{
|
{
|
||||||
int cpu;
|
int cpu;
|
||||||
|
|
||||||
for_each_possible_cpu(cpu) {
|
for_each_present_cpu(cpu) {
|
||||||
dev_pm_qos_remove_request(&hdd_ctx->pm_qos_req[cpu]);
|
dev_pm_qos_remove_request(&hdd_ctx->pm_qos_req[cpu]);
|
||||||
hdd_debug("Remove dev_pm_qos_request for all cpus: %d", cpu);
|
hdd_debug("Remove dev_pm_qos_request for all cpus: %d", cpu);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user