/* Initialize the ACPI P-States library (drivers/acpi/processor_perflib.c) in order to determine correct frequency and voltage pairings. We can do _PDC and _PSD and find out the processor dependency for the actual init that will happen later...  */
static int __init acpi_cpufreq_early_init(void)
/* Initialize the ACPI P-States library (drivers/acpi/processor_perflib.c) in order to determine correct frequency and voltage pairings. We can do _PDC and _PSD and find out the processor dependency for the actual init that will happen later...  */
static int __init acpi_cpufreq_early_init(void)
{
	unsigned int i;
	dprintk("acpi_cpufreq_early_init\n");
	acpi_perf_data = alloc_percpu(struct acpi_processor_performance);
	if (!acpi_perf_data) {
		dprintk("Memory allocation error for acpi_perf_data.\n");
		return -ENOMEM;
	}
	for_each_possible_cpu(i) {
		if (!zalloc_cpumask_var_node(
			&per_cpu_ptr(acpi_perf_data, i)->shared_cpu_map,
			GFP_KERNEL, cpu_to_node(i))) {
			free_acpi_perf_data();
			return -ENOMEM;
		}
	}
	acpi_processor_preregister_performance(acpi_perf_data);
	return 0;
}