|
@@ -22,7 +22,7 @@
|
|
#include <asm/msr.h>
|
|
#include <asm/msr.h>
|
|
#include <asm/tsc.h>
|
|
#include <asm/tsc.h>
|
|
|
|
|
|
-#if defined CONFIG_ACPI_PROCESSOR || defined CONFIG_ACPI_PROCESSOR_MODULE
|
|
|
|
|
|
+#if IS_ENABLED(CONFIG_ACPI_PROCESSOR)
|
|
#include <linux/acpi.h>
|
|
#include <linux/acpi.h>
|
|
#include <acpi/processor.h>
|
|
#include <acpi/processor.h>
|
|
#endif
|
|
#endif
|
|
@@ -35,7 +35,7 @@
|
|
|
|
|
|
struct eps_cpu_data {
|
|
struct eps_cpu_data {
|
|
u32 fsb;
|
|
u32 fsb;
|
|
-#if defined CONFIG_ACPI_PROCESSOR || defined CONFIG_ACPI_PROCESSOR_MODULE
|
|
|
|
|
|
+#if IS_ENABLED(CONFIG_ACPI_PROCESSOR)
|
|
u32 bios_limit;
|
|
u32 bios_limit;
|
|
#endif
|
|
#endif
|
|
struct cpufreq_frequency_table freq_table[];
|
|
struct cpufreq_frequency_table freq_table[];
|
|
@@ -48,7 +48,7 @@ static int freq_failsafe_off;
|
|
static int voltage_failsafe_off;
|
|
static int voltage_failsafe_off;
|
|
static int set_max_voltage;
|
|
static int set_max_voltage;
|
|
|
|
|
|
-#if defined CONFIG_ACPI_PROCESSOR || defined CONFIG_ACPI_PROCESSOR_MODULE
|
|
|
|
|
|
+#if IS_ENABLED(CONFIG_ACPI_PROCESSOR)
|
|
static int ignore_acpi_limit;
|
|
static int ignore_acpi_limit;
|
|
|
|
|
|
static struct acpi_processor_performance *eps_acpi_cpu_perf;
|
|
static struct acpi_processor_performance *eps_acpi_cpu_perf;
|
|
@@ -186,7 +186,7 @@ static int eps_cpu_init(struct cpufreq_policy *policy)
|
|
int k, step, voltage;
|
|
int k, step, voltage;
|
|
int ret;
|
|
int ret;
|
|
int states;
|
|
int states;
|
|
-#if defined CONFIG_ACPI_PROCESSOR || defined CONFIG_ACPI_PROCESSOR_MODULE
|
|
|
|
|
|
+#if IS_ENABLED(CONFIG_ACPI_PROCESSOR)
|
|
unsigned int limit;
|
|
unsigned int limit;
|
|
#endif
|
|
#endif
|
|
|
|
|
|
@@ -286,7 +286,7 @@ static int eps_cpu_init(struct cpufreq_policy *policy)
|
|
/* Calc FSB speed */
|
|
/* Calc FSB speed */
|
|
fsb = cpu_khz / current_multiplier;
|
|
fsb = cpu_khz / current_multiplier;
|
|
|
|
|
|
-#if defined CONFIG_ACPI_PROCESSOR || defined CONFIG_ACPI_PROCESSOR_MODULE
|
|
|
|
|
|
+#if IS_ENABLED(CONFIG_ACPI_PROCESSOR)
|
|
/* Check for ACPI processor speed limit */
|
|
/* Check for ACPI processor speed limit */
|
|
if (!ignore_acpi_limit && !eps_acpi_init()) {
|
|
if (!ignore_acpi_limit && !eps_acpi_init()) {
|
|
if (!acpi_processor_get_bios_limit(policy->cpu, &limit)) {
|
|
if (!acpi_processor_get_bios_limit(policy->cpu, &limit)) {
|
|
@@ -333,7 +333,7 @@ static int eps_cpu_init(struct cpufreq_policy *policy)
|
|
|
|
|
|
/* Copy basic values */
|
|
/* Copy basic values */
|
|
centaur->fsb = fsb;
|
|
centaur->fsb = fsb;
|
|
-#if defined CONFIG_ACPI_PROCESSOR || defined CONFIG_ACPI_PROCESSOR_MODULE
|
|
|
|
|
|
+#if IS_ENABLED(CONFIG_ACPI_PROCESSOR)
|
|
centaur->bios_limit = limit;
|
|
centaur->bios_limit = limit;
|
|
#endif
|
|
#endif
|
|
|
|
|
|
@@ -418,7 +418,7 @@ module_param(freq_failsafe_off, int, 0644);
|
|
MODULE_PARM_DESC(freq_failsafe_off, "Disable current vs max frequency check");
|
|
MODULE_PARM_DESC(freq_failsafe_off, "Disable current vs max frequency check");
|
|
module_param(voltage_failsafe_off, int, 0644);
|
|
module_param(voltage_failsafe_off, int, 0644);
|
|
MODULE_PARM_DESC(voltage_failsafe_off, "Disable current vs max voltage check");
|
|
MODULE_PARM_DESC(voltage_failsafe_off, "Disable current vs max voltage check");
|
|
-#if defined CONFIG_ACPI_PROCESSOR || defined CONFIG_ACPI_PROCESSOR_MODULE
|
|
|
|
|
|
+#if IS_ENABLED(CONFIG_ACPI_PROCESSOR)
|
|
module_param(ignore_acpi_limit, int, 0644);
|
|
module_param(ignore_acpi_limit, int, 0644);
|
|
MODULE_PARM_DESC(ignore_acpi_limit, "Don't check ACPI's processor speed limit");
|
|
MODULE_PARM_DESC(ignore_acpi_limit, "Don't check ACPI's processor speed limit");
|
|
#endif
|
|
#endif
|