ACPI: cpufreq: Switch to QoS requests instead of cpufreq notifier

The cpufreq core now takes the min/max frequency constraints via QoS
requests and the CPUFREQ_ADJUST notifier shall get removed later on.

Switch over to using the QoS request for maximum frequency constraint
for acpi driver.

Signed-off-by: Viresh Kumar <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
This commit is contained in:
Viresh Kumar 2019-08-28 14:20:13 +05:30 • committed by Rafael J. Wysocki
commit d15ce41273
4 changed files with 132 additions and 117 deletions

View file

@ -4,6 +4,8 @@
#include <linux/kernel.h>
#include <linux/cpu.h>
#include <linux/cpufreq.h>
#include <linux/pm_qos.h>
#include <linux/thermal.h>
#include <asm/acpi.h>
@ -230,6 +232,8 @@ struct acpi_processor {
struct acpi_processor_limit limit;
struct thermal_cooling_device *cdev;
struct device *dev; /* Processor device. */
struct dev_pm_qos_request perflib_req;
struct dev_pm_qos_request thermal_req;
};
struct acpi_processor_errata {
@ -296,16 +300,22 @@ static inline void acpi_processor_ffh_cstate_enter(struct acpi_processor_cx
/* in processor_perflib.c */
#ifdef CONFIG_CPU_FREQ
void acpi_processor_ppc_init(void);
void acpi_processor_ppc_exit(void);
extern bool acpi_processor_cpufreq_init;
void acpi_processor_ignore_ppc_init(void);
void acpi_processor_ppc_init(int cpu);
void acpi_processor_ppc_exit(int cpu);
void acpi_processor_ppc_has_changed(struct acpi_processor *pr, int event_flag);
extern int acpi_processor_get_bios_limit(int cpu, unsigned int *limit);
#else
static inline void acpi_processor_ppc_init(void)
static inline void acpi_processor_ignore_ppc_init(void)
{
return;
}
static inline void acpi_processor_ppc_exit(void)
static inline void acpi_processor_ppc_init(int cpu)
{
return;
}
static inline void acpi_processor_ppc_exit(int cpu)
{
return;
}
@ -421,14 +431,14 @@ static inline int acpi_processor_hotplug(struct acpi_processor *pr)
int acpi_processor_get_limit_info(struct acpi_processor *pr);
extern const struct thermal_cooling_device_ops processor_cooling_ops;
#if defined(CONFIG_ACPI_CPU_FREQ_PSS) & defined(CONFIG_CPU_FREQ)
void acpi_thermal_cpufreq_init(void);
void acpi_thermal_cpufreq_exit(void);
void acpi_thermal_cpufreq_init(int cpu);
void acpi_thermal_cpufreq_exit(int cpu);
#else
static inline void acpi_thermal_cpufreq_init(void)
static inline void acpi_thermal_cpufreq_init(int cpu)
{
return;
}
static inline void acpi_thermal_cpufreq_exit(void)
static inline void acpi_thermal_cpufreq_exit(int cpu)
{
return;
}