File tree Expand file tree Collapse file tree 6 files changed +16
-31
lines changed Expand file tree Collapse file tree 6 files changed +16
-31
lines changed Original file line number Diff line number Diff line change @@ -162,21 +162,23 @@ void acpi_processor_ppc_init(int cpu)
162
162
struct acpi_processor * pr = per_cpu (processors , cpu );
163
163
int ret ;
164
164
165
+ if (!pr )
166
+ return ;
167
+
165
168
ret = dev_pm_qos_add_request (get_cpu_device (cpu ),
166
169
& pr -> perflib_req , DEV_PM_QOS_MAX_FREQUENCY ,
167
170
INT_MAX );
168
- if (ret < 0 ) {
171
+ if (ret < 0 )
169
172
pr_err ("Failed to add freq constraint for CPU%d (%d)\n" , cpu ,
170
173
ret );
171
- return ;
172
- }
173
174
}
174
175
175
176
void acpi_processor_ppc_exit (int cpu )
176
177
{
177
178
struct acpi_processor * pr = per_cpu (processors , cpu );
178
179
179
- dev_pm_qos_remove_request (& pr -> perflib_req );
180
+ if (pr )
181
+ dev_pm_qos_remove_request (& pr -> perflib_req );
180
182
}
181
183
182
184
static int acpi_processor_get_performance_control (struct acpi_processor * pr )
Original file line number Diff line number Diff line change @@ -130,21 +130,23 @@ void acpi_thermal_cpufreq_init(int cpu)
130
130
struct acpi_processor * pr = per_cpu (processors , cpu );
131
131
int ret ;
132
132
133
+ if (!pr )
134
+ return ;
135
+
133
136
ret = dev_pm_qos_add_request (get_cpu_device (cpu ),
134
137
& pr -> thermal_req , DEV_PM_QOS_MAX_FREQUENCY ,
135
138
INT_MAX );
136
- if (ret < 0 ) {
139
+ if (ret < 0 )
137
140
pr_err ("Failed to add freq constraint for CPU%d (%d)\n" , cpu ,
138
141
ret );
139
- return ;
140
- }
141
142
}
142
143
143
144
void acpi_thermal_cpufreq_exit (int cpu )
144
145
{
145
146
struct acpi_processor * pr = per_cpu (processors , cpu );
146
147
147
- dev_pm_qos_remove_request (& pr -> thermal_req );
148
+ if (pr )
149
+ dev_pm_qos_remove_request (& pr -> thermal_req );
148
150
}
149
151
#else /* ! CONFIG_CPU_FREQ */
150
152
static int cpufreq_get_max_state (unsigned int cpu )
Original file line number Diff line number Diff line change @@ -361,19 +361,6 @@ static const struct dmi_system_id acpisleep_dmi_table[] __initconst = {
361
361
DMI_MATCH (DMI_PRODUCT_NAME , "80E3" ),
362
362
},
363
363
},
364
- /*
365
- * https://bugzilla.kernel.org/show_bug.cgi?id=196907
366
- * Some Dell XPS13 9360 cannot do suspend-to-idle using the Low Power
367
- * S0 Idle firmware interface.
368
- */
369
- {
370
- .callback = init_default_s3 ,
371
- .ident = "Dell XPS13 9360" ,
372
- .matches = {
373
- DMI_MATCH (DMI_SYS_VENDOR , "Dell Inc." ),
374
- DMI_MATCH (DMI_PRODUCT_NAME , "XPS 13 9360" ),
375
- },
376
- },
377
364
/*
378
365
* ThinkPad X1 Tablet(2016) cannot do suspend-to-idle using
379
366
* the Low Power S0 Idle firmware interface (see
Original file line number Diff line number Diff line change 9
9
*/
10
10
11
11
#include <linux/acpi.h>
12
+ #include <linux/cpufreq.h>
12
13
#include <linux/device.h>
13
14
#include <linux/err.h>
14
15
#include <linux/fwnode.h>
@@ -3179,6 +3180,8 @@ void device_shutdown(void)
3179
3180
wait_for_device_probe ();
3180
3181
device_block_probing ();
3181
3182
3183
+ cpufreq_suspend ();
3184
+
3182
3185
spin_lock (& devices_kset -> list_lock );
3183
3186
/*
3184
3187
* Walk the devices list backward, shutting down each in turn.
Original file line number Diff line number Diff line change @@ -2737,14 +2737,6 @@ int cpufreq_unregister_driver(struct cpufreq_driver *driver)
2737
2737
}
2738
2738
EXPORT_SYMBOL_GPL (cpufreq_unregister_driver );
2739
2739
2740
- /*
2741
- * Stop cpufreq at shutdown to make sure it isn't holding any locks
2742
- * or mutexes when secondary CPUs are halted.
2743
- */
2744
- static struct syscore_ops cpufreq_syscore_ops = {
2745
- .shutdown = cpufreq_suspend ,
2746
- };
2747
-
2748
2740
struct kobject * cpufreq_global_kobject ;
2749
2741
EXPORT_SYMBOL (cpufreq_global_kobject );
2750
2742
@@ -2756,8 +2748,6 @@ static int __init cpufreq_core_init(void)
2756
2748
cpufreq_global_kobject = kobject_create_and_add ("cpufreq" , & cpu_subsys .dev_root -> kobj );
2757
2749
BUG_ON (!cpufreq_global_kobject );
2758
2750
2759
- register_syscore_ops (& cpufreq_syscore_ops );
2760
-
2761
2751
return 0 ;
2762
2752
}
2763
2753
module_param (off , int , 0444 );
Original file line number Diff line number Diff line change 15
15
#include <linux/seq_file.h>
16
16
#include <linux/suspend.h>
17
17
#include <linux/syscalls.h>
18
+ #include <linux/pm_runtime.h>
18
19
19
20
#include "power.h"
20
21
You can’t perform that action at this time.
0 commit comments