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

Commit b2d5fb97 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

Merge branches 'pm-sleep', 'pm-cpufreq' and 'pm-cpuidle'

* pm-sleep:
  Revert "PM / hibernate: avoid unsafe pages in e820 reserved regions"

* pm-cpufreq:
  cpufreq: Schedule work for the first-online CPU on resume

* pm-cpuidle:
  cpuidle: ACPI: do not overwrite name and description of C0
  cpuidle: remove state_count field from struct cpuidle_device
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -922,7 +922,7 @@ static int acpi_processor_setup_cpuidle_states(struct acpi_processor *pr)
		return -EINVAL;

	drv->safe_state_index = -1;
	for (i = 0; i < CPUIDLE_STATE_MAX; i++) {
	for (i = CPUIDLE_DRIVER_STATE_START; i < CPUIDLE_STATE_MAX; i++) {
		drv->states[i].name[0] = '\0';
		drv->states[i].desc[0] = '\0';
	}
+11 −8
Original line number Diff line number Diff line
@@ -1698,16 +1698,19 @@ void cpufreq_resume(void)
		    || __cpufreq_governor(policy, CPUFREQ_GOV_LIMITS))
			pr_err("%s: Failed to start governor for policy: %p\n",
				__func__, policy);
	}

	/*
		 * schedule call cpufreq_update_policy() for boot CPU, i.e. last
		 * policy in list. It will verify that the current freq is in
		 * sync with what we believe it to be.
	 * schedule call cpufreq_update_policy() for first-online CPU, as that
	 * wouldn't be hotplugged-out on suspend. It will verify that the
	 * current freq is in sync with what we believe it to be.
	 */
		if (list_is_last(&policy->policy_list, &cpufreq_policy_list))
	policy = cpufreq_cpu_get_raw(cpumask_first(cpu_online_mask));
	if (WARN_ON(!policy))
		return;

	schedule_work(&policy->update);
}
}

/**
 *	cpufreq_get_current_driver - return current driver's name
+0 −3
Original line number Diff line number Diff line
@@ -330,9 +330,6 @@ int cpuidle_enable_device(struct cpuidle_device *dev)
	if (!dev->registered)
		return -EINVAL;

	if (!dev->state_count)
		dev->state_count = drv->state_count;

	ret = cpuidle_add_device_sysfs(dev);
	if (ret)
		return ret;
+3 −2
Original line number Diff line number Diff line
@@ -401,7 +401,7 @@ static int cpuidle_add_state_sysfs(struct cpuidle_device *device)
	struct cpuidle_driver *drv = cpuidle_get_cpu_driver(device);

	/* state statistics */
	for (i = 0; i < device->state_count; i++) {
	for (i = 0; i < drv->state_count; i++) {
		kobj = kzalloc(sizeof(struct cpuidle_state_kobj), GFP_KERNEL);
		if (!kobj)
			goto error_state;
@@ -433,9 +433,10 @@ static int cpuidle_add_state_sysfs(struct cpuidle_device *device)
 */
static void cpuidle_remove_state_sysfs(struct cpuidle_device *device)
{
	struct cpuidle_driver *drv = cpuidle_get_cpu_driver(device);
	int i;

	for (i = 0; i < device->state_count; i++)
	for (i = 0; i < drv->state_count; i++)
		cpuidle_free_state_kobj(device, i);
}

+0 −1
Original line number Diff line number Diff line
@@ -77,7 +77,6 @@ struct cpuidle_device {
	unsigned int		cpu;

	int			last_residency;
	int			state_count;
	struct cpuidle_state_usage	states_usage[CPUIDLE_STATE_MAX];
	struct cpuidle_state_kobj *kobjs[CPUIDLE_STATE_MAX];
	struct cpuidle_driver_kobj *kobj_driver;
Loading