Skip to content

Commit 2076cba

Browse files
committed
Merge back ACPI processor driver changes for 6.13
2 parents b79276d + bf41bb5 commit 2076cba

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

drivers/acpi/processor_perflib.c

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424

2525
#define ACPI_PROCESSOR_FILE_PERFORMANCE "performance"
2626

27-
static DEFINE_MUTEX(performance_mutex);
28-
2927
/*
3028
* _PPC support is implemented as a CPUfreq policy notifier:
3129
* This means each time a CPUfreq driver registered also with
@@ -209,6 +207,10 @@ void acpi_processor_ppc_exit(struct cpufreq_policy *policy)
209207
}
210208
}
211209

210+
#ifdef CONFIG_X86
211+
212+
static DEFINE_MUTEX(performance_mutex);
213+
212214
static int acpi_processor_get_performance_control(struct acpi_processor *pr)
213215
{
214216
int result = 0;
@@ -267,7 +269,6 @@ static int acpi_processor_get_performance_control(struct acpi_processor *pr)
267269
return result;
268270
}
269271

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

305303
static int acpi_processor_get_performance_states(struct acpi_processor *pr)
306304
{
@@ -440,13 +438,11 @@ int acpi_processor_get_performance_info(struct acpi_processor *pr)
440438
* the BIOS is older than the CPU and does not know its frequencies
441439
*/
442440
update_bios:
443-
#ifdef CONFIG_X86
444441
if (acpi_has_method(pr->handle, "_PPC")) {
445442
if(boot_cpu_has(X86_FEATURE_EST))
446443
pr_warn(FW_BUG "BIOS needs update for CPU "
447444
"frequency support\n");
448445
}
449-
#endif
450446
return result;
451447
}
452448
EXPORT_SYMBOL_GPL(acpi_processor_get_performance_info);
@@ -788,3 +784,4 @@ void acpi_processor_unregister_performance(unsigned int cpu)
788784
mutex_unlock(&performance_mutex);
789785
}
790786
EXPORT_SYMBOL(acpi_processor_unregister_performance);
787+
#endif

0 commit comments

Comments
 (0)