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

Commit 76eca066 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: thermal: Initialize per cpu variables during thermal init"

parents 59c134c7 8cd2f0a3
Loading
Loading
Loading
Loading
+12 −17
Original line number Diff line number Diff line
@@ -2336,6 +2336,18 @@ int msm_thermal_init(struct msm_thermal_data *pdata)
	int ret = 0;
	uint32_t cpu;

	for_each_possible_cpu(cpu) {
		cpus[cpu].cpu = cpu;
		cpus[cpu].offline = 0;
		cpus[cpu].user_offline = 0;
		cpus[cpu].hotplug_thresh_clear = false;
		cpus[cpu].max_freq = false;
		cpus[cpu].user_max_freq = UINT_MAX;
		cpus[cpu].user_min_freq = 0;
		cpus[cpu].limited_max_freq = UINT_MAX;
		cpus[cpu].limited_min_freq = 0;
		cpus[cpu].freq_thresh_clear = false;
	}
	BUG_ON(!pdata);
	memcpy(&msm_thermal_info, pdata, sizeof(struct msm_thermal_data));

@@ -2344,10 +2356,6 @@ int msm_thermal_init(struct msm_thermal_data *pdata)

	enabled = 1;
	polling_enabled = 1;
	for_each_possible_cpu(cpu) {
		cpus[cpu].limited_max_freq = UINT_MAX;
		cpus[cpu].limited_min_freq = 0;
	}
	ret = cpufreq_register_notifier(&msm_thermal_cpufreq_notifier,
			CPUFREQ_POLICY_NOTIFIER);
	if (ret)
@@ -2817,10 +2825,6 @@ static int probe_cc(struct device_node *node, struct msm_thermal_data *data,
	}

	for_each_possible_cpu(cpu) {
		cpus[cpu].cpu = cpu;
		cpus[cpu].offline = 0;
		cpus[cpu].user_offline = 0;
		cpus[cpu].hotplug_thresh_clear = false;
		ret = of_property_read_string_index(node, key, cpu,
				&cpus[cpu].sensor_type);
		if (ret)
@@ -2984,7 +2988,6 @@ static int probe_freq_mitigation(struct device_node *node,
{
	char *key = NULL;
	int ret = 0;
	uint32_t cpu;

	key = "qcom,freq-mitigation-temp";
	ret = of_property_read_u32(node, key, &data->freq_mitig_temp_degc);
@@ -3008,14 +3011,6 @@ static int probe_freq_mitigation(struct device_node *node,
		goto PROBE_FREQ_EXIT;

	freq_mitigation_enabled = 1;
	for_each_possible_cpu(cpu) {
		cpus[cpu].max_freq = false;
		cpus[cpu].user_max_freq = UINT_MAX;
		cpus[cpu].user_min_freq = 0;
		cpus[cpu].limited_max_freq = UINT_MAX;
		cpus[cpu].limited_min_freq = 0;
		cpus[cpu].freq_thresh_clear = false;
	}

PROBE_FREQ_EXIT:
	if (ret) {