@@ -720,6 +720,22 @@ static const struct cpuidle_state dnv_cstates[] = {
{}
};
+static const struct cpuidle_state naples_cstates[] = {
+ {
+ .name = "CC1",
+ .flags = MWAIT2flg(0x00),
+ .exit_latency = 1,
+ .target_residency = 2,
+ },
+ {
+ .name = "CC6",
+ .flags = MWAIT2flg(0x10) | CPUIDLE_FLAG_USE_HALT,
+ .exit_latency = 400,
+ .target_residency = 1000,
+ },
+ {}
+};
+
static void mwait_idle(void)
{
unsigned int cpu = smp_processor_id();
@@ -964,10 +980,16 @@ static const struct x86_cpu_id intel_idle_ids[] __initconstrel = {
{}
};
+static const struct idle_cpu idle_cpu_naples = {
+ .state_table = naples_cstates,
+};
+
#define ACPU(family, model, cpu) \
{ X86_VENDOR_AMD, family, model, X86_FEATURE_ALWAYS, &idle_cpu_##cpu}
static const struct x86_cpu_id amd_idle_ids[] __initconstrel = {
+ ACPU(0x17, 0x01, naples),
+ ACPU(0x17, 0x31, naples), /* Rome shares the same c-state config */
{}
};