Skip to content

Commit

Permalink
Merge branches 'pm-cpufreq', 'pm-pci' and 'pm-sleep'
Browse files Browse the repository at this point in the history
Merge fixes for the ondemand and conservative cpufreq governors,
PCI power management and system wakeup framework.

* pm-cpufreq:
  cpufreq: governor: Avoid accessing invalid governor_data

* pm-pci:
  PCI / ACPI / PM: Resume all bridges on suspend-to-RAM

* pm-sleep:
  PM / sleep: wakeup: Fix build error caused by missing SRCU support
  • Loading branch information
rafaeljw committed Aug 21, 2018
4 parents 5ef499c + 2a3eb51 + 9d64b53 + 3df6f61 commit 01ac7c4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
12 changes: 10 additions & 2 deletions drivers/cpufreq/cpufreq_governor.c
Original file line number Diff line number Diff line change
Expand Up @@ -555,12 +555,20 @@ EXPORT_SYMBOL_GPL(cpufreq_dbs_governor_stop);

void cpufreq_dbs_governor_limits(struct cpufreq_policy *policy)
{
struct policy_dbs_info *policy_dbs = policy->governor_data;
struct policy_dbs_info *policy_dbs;

/* Protect gov->gdbs_data against cpufreq_dbs_governor_exit() */
mutex_lock(&gov_dbs_data_mutex);
policy_dbs = policy->governor_data;
if (!policy_dbs)
goto out;

mutex_lock(&policy_dbs->update_mutex);
cpufreq_policy_apply_limits(policy);
gov_update_sample_delay(policy_dbs, 0);

mutex_unlock(&policy_dbs->update_mutex);

out:
mutex_unlock(&gov_dbs_data_mutex);
}
EXPORT_SYMBOL_GPL(cpufreq_dbs_governor_limits);
6 changes: 2 additions & 4 deletions drivers/pci/pci-acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -632,13 +632,11 @@ static bool acpi_pci_need_resume(struct pci_dev *dev)
/*
* In some cases (eg. Samsung 305V4A) leaving a bridge in suspend over
* system-wide suspend/resume confuses the platform firmware, so avoid
* doing that, unless the bridge has a driver that should take care of
* the PM handling. According to Section 16.1.6 of ACPI 6.2, endpoint
* doing that. According to Section 16.1.6 of ACPI 6.2, endpoint
* devices are expected to be in D3 before invoking the S3 entry path
* from the firmware, so they should not be affected by this issue.
*/
if (pci_is_bridge(dev) && !dev->driver &&
acpi_target_system_state() != ACPI_STATE_S0)
if (pci_is_bridge(dev) && acpi_target_system_state() != ACPI_STATE_S0)
return true;

if (!adev || !acpi_device_power_manageable(adev))
Expand Down
1 change: 1 addition & 0 deletions kernel/power/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ config PM_SLEEP
def_bool y
depends on SUSPEND || HIBERNATE_CALLBACKS
select PM
select SRCU

config PM_SLEEP_SMP
def_bool y
Expand Down

0 comments on commit 01ac7c4

Please sign in to comment.