Commit 077a671d7bac2fd792eb04136d4fc08fd962a55e
Exists in
smarc-imx_3.14.28_1.0.0_ga
and in
1 other branch
Merge branch 'pm-cpuidle'
* pm-cpuidle: intel_idle: Support Intel Atom Processor C2000 Product Family
Showing 1 changed file Side-by-side Diff
drivers/idle/intel_idle.c
1 | 1 | /* |
2 | 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 | 5 | * Len Brown <len.brown@intel.com> |
6 | 6 | * |
7 | 7 | * This program is free software; you can redistribute it and/or modify it |
... | ... | @@ -329,6 +329,22 @@ |
329 | 329 | { |
330 | 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 | 350 | * intel_idle |
... | ... | @@ -462,6 +478,11 @@ |
462 | 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 | 486 | #define ICPU(model, cpu) \ |
466 | 487 | { X86_VENDOR_INTEL, 6, model, X86_FEATURE_MWAIT, (unsigned long)&cpu } |
467 | 488 | |
... | ... | @@ -483,6 +504,7 @@ |
483 | 504 | ICPU(0x3f, idle_cpu_hsw), |
484 | 505 | ICPU(0x45, idle_cpu_hsw), |
485 | 506 | ICPU(0x46, idle_cpu_hsw), |
507 | + ICPU(0x4D, idle_cpu_avn), | |
486 | 508 | {} |
487 | 509 | }; |
488 | 510 | MODULE_DEVICE_TABLE(x86cpu, intel_idle_ids); |