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

Commit 8227ad73 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "drivers: soc: qcom: update rimps memlat while saving pmu counters"

parents b67df143 3da3b760
Loading
Loading
Loading
Loading
+12 −4
Original line number Original line Diff line number Diff line
@@ -620,7 +620,8 @@ static void save_cpugrp_pmu_events(struct memlat_cpu_grp *cpu_grp, u8 cpu)
	for (i = 0; i < NUM_COMMON_EVS; i++) {
	for (i = 0; i < NUM_COMMON_EVS; i++) {
		u8 hw_id = pmu[i].hw_cntr_idx;
		u8 hw_id = pmu[i].hw_cntr_idx;


		if (hw_id == INVALID_PMU_HW_IDX)
		if ((hw_id == INVALID_PMU_HW_IDX) ||
				!cpus_data->common_evs[i])
			continue;
			continue;
		perf_event_read_local(cpus_data->common_evs[i],
		perf_event_read_local(cpus_data->common_evs[i],
				&ev_count, NULL, NULL);
				&ev_count, NULL, NULL);
@@ -639,7 +640,8 @@ static void save_mon_pmu_events(struct memlat_mon *mon, u8 cpu)
	for (i = 0; i < NUM_MON_EVS; i++) {
	for (i = 0; i < NUM_MON_EVS; i++) {
		u8 hw_id = pmu[i].hw_cntr_idx;
		u8 hw_id = pmu[i].hw_cntr_idx;


		if (hw_id == INVALID_PMU_HW_IDX)
		if (hw_id == INVALID_PMU_HW_IDX ||
				!ev_data->mon_evs[i])
			continue;
			continue;
		perf_event_read_local(ev_data->mon_evs[i],
		perf_event_read_local(ev_data->mon_evs[i],
				&ev_count, NULL, NULL);
				&ev_count, NULL, NULL);
@@ -658,6 +660,7 @@ static void free_common_evs(struct memlat_cpu_grp *cpu_grp, cpumask_t *mask)
			if (!cpus_data->common_evs[i])
			if (!cpus_data->common_evs[i])
				continue;
				continue;
			perf_event_release_kernel(cpus_data->common_evs[i]);
			perf_event_release_kernel(cpus_data->common_evs[i]);
			cpus_data->common_evs[i] = NULL;
		}
		}
	}
	}
}
}
@@ -674,6 +677,7 @@ static void free_mon_evs(struct memlat_mon *mon, cpumask_t *mask)
				continue;
				continue;


			perf_event_release_kernel(ev_data->mon_evs[i]);
			perf_event_release_kernel(ev_data->mon_evs[i]);
			ev_data->mon_evs[i] = NULL;
		}
		}
	}
	}
}
}
@@ -755,8 +759,12 @@ static int memlat_hp_restart_events(unsigned int cpu, bool cpu_up)


static int memlat_event_hotplug_coming_up(unsigned int cpu)
static int memlat_event_hotplug_coming_up(unsigned int cpu)
{
{
	int ret;

	ret = memlat_hp_restart_events(cpu, true);
	if (!ret)
		per_cpu(cpu_is_hp, cpu) = false;
		per_cpu(cpu_is_hp, cpu) = false;
	return memlat_hp_restart_events(cpu, true);
	return ret;
}
}


static int memlat_event_hotplug_going_down(unsigned int cpu)
static int memlat_event_hotplug_going_down(unsigned int cpu)