Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a839a5d0 authored by Amir Vajid's avatar Amir Vajid
Browse files

PM / devfreq: memlat: increment mon count for compute mons



Today, compute mons do not increment the inited mons count.
Reorganize the mon probe function to make sure that they do.

Change-Id: Ia93e419a4e3e14c8e238c66630c27699ff4e0cbc
Signed-off-by: default avatarAmir Vajid <avajid@codeaurora.org>
parent 6d464a5c
Loading
Loading
Loading
Loading
+18 −19
Original line number Diff line number Diff line
@@ -649,9 +649,7 @@ static int memlat_mon_probe(struct platform_device *pdev, bool is_compute)
	if (is_compute) {
		mon->miss_ev_id = 0;
		ret = register_compute(dev, hw);
		goto unlock_out;
	}

	} else {
		mon->miss_ev =
			devm_kzalloc(dev, num_cpus * sizeof(*mon->miss_ev),
				     GFP_KERNEL);
@@ -663,7 +661,7 @@ static int memlat_mon_probe(struct platform_device *pdev, bool is_compute)
		ret = of_property_read_u32(dev->of_node, "qcom,cachemiss-ev",
						&event_id);
		if (ret) {
		dev_err(dev, "Cache miss event missing for this mon: %d\n",
			dev_err(dev, "Cache miss event missing for mon: %d\n",
					ret);
			ret = -EINVAL;
			goto unlock_out;
@@ -671,6 +669,7 @@ static int memlat_mon_probe(struct platform_device *pdev, bool is_compute)
		mon->miss_ev_id = event_id;

		ret = register_memlat(dev, hw);
	}

	if (!ret)
		cpu_grp->num_inited_mons++;