History

Merge tag 'pm+acpi-3.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI and power management fixes from Rafael Wysocki: - The resume part of user space driven hibernation (s2disk) is now broken after the change that moved the creation of memory bitmaps to after the freezing of tasks, because I forgot that the resume utility loaded the image before freezing tasks and needed the bitmaps for that. The fix adds special handling for that case. - One of recent commits changed the export of acpi_bus_get_device() to EXPORT_SYMBOL_GPL(), which was technically correct but broke existing binary modules using that function including one in particularly widespread use. Change it back to EXPORT_SYMBOL(). - The intel_pstate driver sometimes fails to disable turbo if its no_turbo sysfs attribute is set. Fix from Srinivas Pandruvada. - One of recent cpufreq fixes forgot to update a check in cpufreq-cpu0 which still (incorrectly) treats non-NULL as non-error. Fix from Philipp Zabel. - The SPEAr cpufreq driver uses a wrong variable type in one place preventing it from catching errors returned by one of the functions called by it. Fix from Sachin Kamat. * tag 'pm+acpi-3.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: Use EXPORT_SYMBOL() for acpi_bus_get_device() intel_pstate: fix no_turbo cpufreq: cpufreq-cpu0: NULL is a valid regulator, part 2 cpufreq: SPEAr: Fix incorrect variable type PM / hibernate: Fix user space driven resume regression

Linus Torvalds committed 13 years ago

Commit 7dee8df2 parents 3dbecf0 726dcbe6 files · +19 −5Browse files

Unified · Split

6 files
  1. drivers/acpi/scan.c +1 −1
  2. drivers/cpufreq/cpufreq-cpu0.c +1 −1
  3. drivers/cpufreq/intel_pstate.c +4 −1
  4. drivers/cpufreq/spear-cpufreq.c +1 −1
  5. kernel/power/snapshot.c +4 −1
  6. kernel/power/user.c +8 −0
drivers/acpi/scan.c+1−1
@@ -968,7 +968,7 @@ int acpi_bus_get_device(acpi_handle handle, struct acpi_device **device) · 967 unmodified lines
968 }968 }
969 return 0;969 return 0;
970}970}
971EXPORT_SYMBOL_GPL(acpi_bus_get_device);971EXPORT_SYMBOL(acpi_bus_get_device);
972 972
973int acpi_device_add(struct acpi_device *device,973int acpi_device_add(struct acpi_device *device,
974 void (*release)(struct device *))974 void (*release)(struct device *))
drivers/cpufreq/cpufreq-cpu0.c+1−1
@@ -229,7 +229,7 @@ static int cpu0_cpufreq_probe(struct platform_device *pdev) · 228 unmodified lines
229 if (of_property_read_u32(np, "clock-latency", &transition_latency))229 if (of_property_read_u32(np, "clock-latency", &transition_latency))
230 transition_latency = CPUFREQ_ETERNAL;230 transition_latency = CPUFREQ_ETERNAL;
231 231
232 if (cpu_reg) {232 if (!IS_ERR(cpu_reg)) {
233 struct opp *opp;233 struct opp *opp;
234 unsigned long min_uV, max_uV;234 unsigned long min_uV, max_uV;
235 int i;235 int i;
drivers/cpufreq/intel_pstate.c+4−1
@@ -394,7 +394,10 @@ static void intel_pstate_set_pstate(struct cpudata *cpu, int pstate) · 393 unmodified lines
394 trace_cpu_frequency(pstate * 100000, cpu->cpu);394 trace_cpu_frequency(pstate * 100000, cpu->cpu);
395 395
396 cpu->pstate.current_pstate = pstate;396 cpu->pstate.current_pstate = pstate;
397 wrmsrl(MSR_IA32_PERF_CTL, pstate << 8);397 if (limits.no_turbo)
398 wrmsrl(MSR_IA32_PERF_CTL, BIT(32) | (pstate << 8));
399 else
400 wrmsrl(MSR_IA32_PERF_CTL, pstate << 8);
398 401
399}402}
400 403
drivers/cpufreq/spear-cpufreq.c+1−1
@@ -113,7 +113,7 @@ static int spear_cpufreq_target(struct cpufreq_policy *policy, · 112 unmodified lines
113 unsigned int target_freq, unsigned int relation)113 unsigned int target_freq, unsigned int relation)
114{114{
115 struct cpufreq_freqs freqs;115 struct cpufreq_freqs freqs;
116 unsigned long newfreq;116 long newfreq;
117 struct clk *srcclk;117 struct clk *srcclk;
118 int index, ret, mult = 1;118 int index, ret, mult = 1;
119 119
kernel/power/snapshot.c+4−1
@@ -743,7 +743,10 @@ int create_basic_memory_bitmaps(void) · 742 unmodified lines
743 struct memory_bitmap *bm1, *bm2;743 struct memory_bitmap *bm1, *bm2;
744 int error = 0;744 int error = 0;
745 745
746 BUG_ON(forbidden_pages_map || free_pages_map);746 if (forbidden_pages_map && free_pages_map)
747 return 0;
748 else
749 BUG_ON(forbidden_pages_map || free_pages_map);
747 750
748 bm1 = kzalloc(sizeof(struct memory_bitmap), GFP_KERNEL);751 bm1 = kzalloc(sizeof(struct memory_bitmap), GFP_KERNEL);
749 if (!bm1)752 if (!bm1)
kernel/power/user.c+8−0
@@ -39,6 +39,7 @@ static struct snapshot_data { · 38 unmodified lines
39 char frozen;39 char frozen;
40 char ready;40 char ready;
41 char platform_support;41 char platform_support;
42 bool free_bitmaps;
42} snapshot_state;43} snapshot_state;
43 44
44atomic_t snapshot_device_available = ATOMIC_INIT(1);45atomic_t snapshot_device_available = ATOMIC_INIT(1);
@@ -82,6 +83,10 @@ static int snapshot_open(struct inode *inode, struct file *filp) · 37 unmodified lines
82 data->swap = -1;83 data->swap = -1;
83 data->mode = O_WRONLY;84 data->mode = O_WRONLY;
84 error = pm_notifier_call_chain(PM_RESTORE_PREPARE);85 error = pm_notifier_call_chain(PM_RESTORE_PREPARE);
86 if (!error) {
87 error = create_basic_memory_bitmaps();
88 data->free_bitmaps = !error;
89 }
85 if (error)90 if (error)
86 pm_notifier_call_chain(PM_POST_RESTORE);91 pm_notifier_call_chain(PM_POST_RESTORE);
87 }92 }
@@ -111,6 +116,8 @@ static int snapshot_release(struct inode *inode, struct file *filp) · 23 unmodified lines
111 pm_restore_gfp_mask();116 pm_restore_gfp_mask();
112 free_basic_memory_bitmaps();117 free_basic_memory_bitmaps();
113 thaw_processes();118 thaw_processes();
119 } else if (data->free_bitmaps) {
120 free_basic_memory_bitmaps();
114 }121 }
115 pm_notifier_call_chain(data->mode == O_RDONLY ?122 pm_notifier_call_chain(data->mode == O_RDONLY ?
116 PM_POST_HIBERNATION : PM_POST_RESTORE);123 PM_POST_HIBERNATION : PM_POST_RESTORE);
@@ -231,6 +238,7 @@ static long snapshot_ioctl(struct file *filp, unsigned int cmd, · 114 unmodified lines
231 break;238 break;
232 pm_restore_gfp_mask();239 pm_restore_gfp_mask();
233 free_basic_memory_bitmaps();240 free_basic_memory_bitmaps();
241 data->free_bitmaps = false;
234 thaw_processes();242 thaw_processes();
235 data->frozen = 0;243 data->frozen = 0;
236 break;244 break;