mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
cpufreq: CPPC: Remove cpu_data_list
After commit a28b2bfc09
("cppc_cpufreq: replace per-cpu data array with a
list"), cpu_data can be got from policy->driver_data, so cpu_data_list is
not actually needed and can be removed.
Signed-off-by: Lifeng Zheng <zhenglifeng1@huawei.com>
Link: https://patch.msgid.link/20250526113057.3086513-2-zhenglifeng1@huawei.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
e04c78d86a
commit
d80a756240
2 changed files with 0 additions and 26 deletions
|
@ -26,14 +26,6 @@
|
|||
|
||||
#include <acpi/cppc_acpi.h>
|
||||
|
||||
/*
|
||||
* This list contains information parsed from per CPU ACPI _CPC and _PSD
|
||||
* structures: e.g. the highest and lowest supported performance, capabilities,
|
||||
* desired performance, level requested etc. Depending on the share_type, not
|
||||
* all CPUs will have an entry in the list.
|
||||
*/
|
||||
static LIST_HEAD(cpu_data_list);
|
||||
|
||||
static struct cpufreq_driver cppc_cpufreq_driver;
|
||||
|
||||
#ifdef CONFIG_ACPI_CPPC_CPUFREQ_FIE
|
||||
|
@ -567,8 +559,6 @@ static struct cppc_cpudata *cppc_cpufreq_get_cpu_data(unsigned int cpu)
|
|||
goto free_mask;
|
||||
}
|
||||
|
||||
list_add(&cpu_data->node, &cpu_data_list);
|
||||
|
||||
return cpu_data;
|
||||
|
||||
free_mask:
|
||||
|
@ -583,7 +573,6 @@ static void cppc_cpufreq_put_cpu_data(struct cpufreq_policy *policy)
|
|||
{
|
||||
struct cppc_cpudata *cpu_data = policy->driver_data;
|
||||
|
||||
list_del(&cpu_data->node);
|
||||
free_cpumask_var(cpu_data->shared_cpu_map);
|
||||
kfree(cpu_data);
|
||||
policy->driver_data = NULL;
|
||||
|
@ -954,24 +943,10 @@ static int __init cppc_cpufreq_init(void)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static inline void free_cpu_data(void)
|
||||
{
|
||||
struct cppc_cpudata *iter, *tmp;
|
||||
|
||||
list_for_each_entry_safe(iter, tmp, &cpu_data_list, node) {
|
||||
free_cpumask_var(iter->shared_cpu_map);
|
||||
list_del(&iter->node);
|
||||
kfree(iter);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static void __exit cppc_cpufreq_exit(void)
|
||||
{
|
||||
cpufreq_unregister_driver(&cppc_cpufreq_driver);
|
||||
cppc_freq_invariance_exit();
|
||||
|
||||
free_cpu_data();
|
||||
}
|
||||
|
||||
module_exit(cppc_cpufreq_exit);
|
||||
|
|
|
@ -139,7 +139,6 @@ struct cppc_perf_fb_ctrs {
|
|||
|
||||
/* Per CPU container for runtime CPPC management. */
|
||||
struct cppc_cpudata {
|
||||
struct list_head node;
|
||||
struct cppc_perf_caps perf_caps;
|
||||
struct cppc_perf_ctrls perf_ctrls;
|
||||
struct cppc_perf_fb_ctrs perf_fb_ctrs;
|
||||
|
|
Loading…
Add table
Reference in a new issue