Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

* pm-sleep:
PM / sleep: fix freeze_ops NULL pointer dereferences
PM / sleep: Fix request_firmware() error at resume

* pm-cpufreq:
cpufreq: make table sentinel macros unsigned to match use
cpufreq: move policy kobj to policy->cpu at resume
cpufreq: cpu0: OPPs can be populated at runtime
cpufreq: kirkwood: Reinstate cpufreq driver for ARCH_KIRKWOOD
cpufreq: imx6q: Select PM_OPP
cpufreq: sa1110: set memory type for h3600

+18 -15
+4 -2
Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt
··· 8 8 under node /cpus/cpu@0. 9 9 10 10 Required properties: 11 - - operating-points: Refer to Documentation/devicetree/bindings/power/opp.txt 12 - for details 11 + - None 13 12 14 13 Optional properties: 14 + - operating-points: Refer to Documentation/devicetree/bindings/power/opp.txt for 15 + details. OPPs *must* be supplied either via DT, i.e. this property, or 16 + populated at runtime. 15 17 - clock-latency: Specify the possible maximum transition latency for clock, 16 18 in unit of nanoseconds. 17 19 - voltage-tolerance: Specify the CPU voltage tolerance in percentage.
+2 -1
drivers/cpufreq/Kconfig.arm
··· 104 104 tristate "Freescale i.MX6 cpufreq support" 105 105 depends on ARCH_MXC 106 106 depends on REGULATOR_ANATOP 107 + select PM_OPP 107 108 help 108 109 This adds cpufreq driver support for Freescale i.MX6 series SoCs. 109 110 ··· 119 118 If in doubt, say Y. 120 119 121 120 config ARM_KIRKWOOD_CPUFREQ 122 - def_bool MACH_KIRKWOOD 121 + def_bool ARCH_KIRKWOOD || MACH_KIRKWOOD 123 122 help 124 123 This adds the CPUFreq driver for Marvell Kirkwood 125 124 SoCs.
+2 -5
drivers/cpufreq/cpufreq-cpu0.c
··· 152 152 goto out_put_reg; 153 153 } 154 154 155 - ret = of_init_opp_table(cpu_dev); 156 - if (ret) { 157 - pr_err("failed to init OPP table: %d\n", ret); 158 - goto out_put_clk; 159 - } 155 + /* OPPs might be populated at runtime, don't check for error here */ 156 + of_init_opp_table(cpu_dev); 160 157 161 158 ret = dev_pm_opp_init_cpufreq_table(cpu_dev, &freq_table); 162 159 if (ret) {
+4 -2
drivers/cpufreq/cpufreq.c
··· 1153 1153 * the creation of a brand new one. So we need to perform this update 1154 1154 * by invoking update_policy_cpu(). 1155 1155 */ 1156 - if (recover_policy && cpu != policy->cpu) 1156 + if (recover_policy && cpu != policy->cpu) { 1157 1157 update_policy_cpu(policy, cpu); 1158 - else 1158 + WARN_ON(kobject_move(&policy->kobj, &dev->kobj)); 1159 + } else { 1159 1160 policy->cpu = cpu; 1161 + } 1160 1162 1161 1163 cpumask_copy(policy->cpus, cpumask_of(cpu)); 1162 1164
+1 -1
drivers/cpufreq/sa1110-cpufreq.c
··· 349 349 name = "K4S641632D"; 350 350 if (machine_is_h3100()) 351 351 name = "KM416S4030CT"; 352 - if (machine_is_jornada720()) 352 + if (machine_is_jornada720() || machine_is_h3600()) 353 353 name = "K4S281632B-1H"; 354 354 if (machine_is_nanoengine()) 355 355 name = "MT48LC8M16A2TG-75";
+2 -2
include/linux/cpufreq.h
··· 482 482 *********************************************************************/ 483 483 484 484 /* Special Values of .frequency field */ 485 - #define CPUFREQ_ENTRY_INVALID ~0 486 - #define CPUFREQ_TABLE_END ~1 485 + #define CPUFREQ_ENTRY_INVALID ~0u 486 + #define CPUFREQ_TABLE_END ~1u 487 487 /* Special Values of .flags field */ 488 488 #define CPUFREQ_BOOST_FREQ (1 << 0) 489 489
+1
kernel/power/process.c
··· 186 186 187 187 printk("Restarting tasks ... "); 188 188 189 + __usermodehelper_set_disable_depth(UMH_FREEZING); 189 190 thaw_workqueues(); 190 191 191 192 read_lock(&tasklist_lock);
+2 -2
kernel/power/suspend.c
··· 306 306 error = suspend_ops->begin(state); 307 307 if (error) 308 308 goto Close; 309 - } else if (state == PM_SUSPEND_FREEZE && freeze_ops->begin) { 309 + } else if (state == PM_SUSPEND_FREEZE && freeze_ops && freeze_ops->begin) { 310 310 error = freeze_ops->begin(); 311 311 if (error) 312 312 goto Close; ··· 335 335 Close: 336 336 if (need_suspend_ops(state) && suspend_ops->end) 337 337 suspend_ops->end(); 338 - else if (state == PM_SUSPEND_FREEZE && freeze_ops->end) 338 + else if (state == PM_SUSPEND_FREEZE && freeze_ops && freeze_ops->end) 339 339 freeze_ops->end(); 340 340 341 341 return error;