diff options
-rw-r--r-- | drivers/idle/intel_idle.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c index 3226ce98fb18..cbd4e9abc47e 100644 --- a/drivers/idle/intel_idle.c +++ b/drivers/idle/intel_idle.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * intel_idle.c - native hardware idle loop for modern Intel processors | 2 | * intel_idle.c - native hardware idle loop for modern Intel processors |
3 | * | 3 | * |
4 | * Copyright (c) 2010, Intel Corporation. | 4 | * Copyright (c) 2013, Intel Corporation. |
5 | * Len Brown <len.brown@intel.com> | 5 | * Len Brown <len.brown@intel.com> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify it | 7 | * This program is free software; you can redistribute it and/or modify it |
@@ -329,6 +329,22 @@ static struct cpuidle_state atom_cstates[] __initdata = { | |||
329 | { | 329 | { |
330 | .enter = NULL } | 330 | .enter = NULL } |
331 | }; | 331 | }; |
332 | static struct cpuidle_state avn_cstates[CPUIDLE_STATE_MAX] = { | ||
333 | { | ||
334 | .name = "C1-AVN", | ||
335 | .desc = "MWAIT 0x00", | ||
336 | .flags = MWAIT2flg(0x00) | CPUIDLE_FLAG_TIME_VALID, | ||
337 | .exit_latency = 2, | ||
338 | .target_residency = 2, | ||
339 | .enter = &intel_idle }, | ||
340 | { | ||
341 | .name = "C6-AVN", | ||
342 | .desc = "MWAIT 0x51", | ||
343 | .flags = MWAIT2flg(0x58) | CPUIDLE_FLAG_TIME_VALID | CPUIDLE_FLAG_TLB_FLUSHED, | ||
344 | .exit_latency = 15, | ||
345 | .target_residency = 45, | ||
346 | .enter = &intel_idle }, | ||
347 | }; | ||
332 | 348 | ||
333 | /** | 349 | /** |
334 | * intel_idle | 350 | * intel_idle |
@@ -462,6 +478,11 @@ static const struct idle_cpu idle_cpu_hsw = { | |||
462 | .disable_promotion_to_c1e = true, | 478 | .disable_promotion_to_c1e = true, |
463 | }; | 479 | }; |
464 | 480 | ||
481 | static const struct idle_cpu idle_cpu_avn = { | ||
482 | .state_table = avn_cstates, | ||
483 | .disable_promotion_to_c1e = true, | ||
484 | }; | ||
485 | |||
465 | #define ICPU(model, cpu) \ | 486 | #define ICPU(model, cpu) \ |
466 | { X86_VENDOR_INTEL, 6, model, X86_FEATURE_MWAIT, (unsigned long)&cpu } | 487 | { X86_VENDOR_INTEL, 6, model, X86_FEATURE_MWAIT, (unsigned long)&cpu } |
467 | 488 | ||
@@ -483,6 +504,7 @@ static const struct x86_cpu_id intel_idle_ids[] = { | |||
483 | ICPU(0x3f, idle_cpu_hsw), | 504 | ICPU(0x3f, idle_cpu_hsw), |
484 | ICPU(0x45, idle_cpu_hsw), | 505 | ICPU(0x45, idle_cpu_hsw), |
485 | ICPU(0x46, idle_cpu_hsw), | 506 | ICPU(0x46, idle_cpu_hsw), |
507 | ICPU(0x4D, idle_cpu_avn), | ||
486 | {} | 508 | {} |
487 | }; | 509 | }; |
488 | MODULE_DEVICE_TABLE(x86cpu, intel_idle_ids); | 510 | MODULE_DEVICE_TABLE(x86cpu, intel_idle_ids); |