Skip to content

Commit

Permalink
Merge back ACPI processor driver changes for 6.13
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafael J. Wysocki committed Nov 11, 2024
2 parents b79276d + bf41bb5 commit 2076cba
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions drivers/acpi/processor_perflib.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@

#define ACPI_PROCESSOR_FILE_PERFORMANCE "performance"

static DEFINE_MUTEX(performance_mutex);

/*
* _PPC support is implemented as a CPUfreq policy notifier:
* This means each time a CPUfreq driver registered also with
Expand Down Expand Up @@ -209,6 +207,10 @@ void acpi_processor_ppc_exit(struct cpufreq_policy *policy)
}
}

#ifdef CONFIG_X86

static DEFINE_MUTEX(performance_mutex);

static int acpi_processor_get_performance_control(struct acpi_processor *pr)
{
int result = 0;
Expand Down Expand Up @@ -267,7 +269,6 @@ static int acpi_processor_get_performance_control(struct acpi_processor *pr)
return result;
}

#ifdef CONFIG_X86
/*
* Some AMDs have 50MHz frequency multiples, but only provide 100MHz rounding
* in their ACPI data. Calculate the real values and fix up the _PSS data.
Expand Down Expand Up @@ -298,9 +299,6 @@ static void amd_fixup_frequency(struct acpi_processor_px *px, int i)
px->core_frequency = (100 * (fid + 8)) >> did;
}
}
#else
static void amd_fixup_frequency(struct acpi_processor_px *px, int i) {};
#endif

static int acpi_processor_get_performance_states(struct acpi_processor *pr)
{
Expand Down Expand Up @@ -440,13 +438,11 @@ int acpi_processor_get_performance_info(struct acpi_processor *pr)
* the BIOS is older than the CPU and does not know its frequencies
*/
update_bios:
#ifdef CONFIG_X86
if (acpi_has_method(pr->handle, "_PPC")) {
if(boot_cpu_has(X86_FEATURE_EST))
pr_warn(FW_BUG "BIOS needs update for CPU "
"frequency support\n");
}
#endif
return result;
}
EXPORT_SYMBOL_GPL(acpi_processor_get_performance_info);
Expand Down Expand Up @@ -788,3 +784,4 @@ void acpi_processor_unregister_performance(unsigned int cpu)
mutex_unlock(&performance_mutex);
}
EXPORT_SYMBOL(acpi_processor_unregister_performance);
#endif

0 comments on commit 2076cba

Please sign in to comment.