diff options
| author | Len Brown <len.brown@intel.com> | 2014-02-04 23:56:40 -0500 |
|---|---|---|
| committer | Len Brown <len.brown@intel.com> | 2014-08-15 17:06:40 -0400 |
| commit | a138b56800f4b83a7af69a9958d04f0f124eb37b (patch) | |
| tree | 1626c54b0acadbefbb5d3d391503844a2fbb5218 /drivers | |
| parent | 8c058d53f6f2eb0b9cd3bc4ce5c053a64dded671 (diff) | |
intel_idle: Broadwell support
Broadwell (BDW) is similar to Haswell (HSW), the preceding processor generation.
Currently, the only difference in their C-state tables is that PC3 max exit latency
is 33usec on HSW and 40usec on BDW.
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/idle/intel_idle.c | 70 |
1 files changed, 69 insertions, 1 deletions
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c index 2d23cf8279f0..9b7ee7e427df 100644 --- a/drivers/idle/intel_idle.c +++ b/drivers/idle/intel_idle.c | |||
| @@ -443,6 +443,66 @@ static struct cpuidle_state hsw_cstates[] = { | |||
| 443 | { | 443 | { |
| 444 | .enter = NULL } | 444 | .enter = NULL } |
| 445 | }; | 445 | }; |
| 446 | static struct cpuidle_state bdw_cstates[] = { | ||
| 447 | { | ||
| 448 | .name = "C1-BDW", | ||
| 449 | .desc = "MWAIT 0x00", | ||
| 450 | .flags = MWAIT2flg(0x00) | CPUIDLE_FLAG_TIME_VALID, | ||
| 451 | .exit_latency = 2, | ||
| 452 | .target_residency = 2, | ||
| 453 | .enter = &intel_idle }, | ||
| 454 | { | ||
| 455 | .name = "C1E-BDW", | ||
| 456 | .desc = "MWAIT 0x01", | ||
| 457 | .flags = MWAIT2flg(0x01) | CPUIDLE_FLAG_TIME_VALID, | ||
| 458 | .exit_latency = 10, | ||
| 459 | .target_residency = 20, | ||
| 460 | .enter = &intel_idle }, | ||
| 461 | { | ||
| 462 | .name = "C3-BDW", | ||
| 463 | .desc = "MWAIT 0x10", | ||
| 464 | .flags = MWAIT2flg(0x10) | CPUIDLE_FLAG_TIME_VALID | CPUIDLE_FLAG_TLB_FLUSHED, | ||
| 465 | .exit_latency = 40, | ||
| 466 | .target_residency = 100, | ||
| 467 | .enter = &intel_idle }, | ||
| 468 | { | ||
| 469 | .name = "C6-BDW", | ||
| 470 | .desc = "MWAIT 0x20", | ||
| 471 | .flags = MWAIT2flg(0x20) | CPUIDLE_FLAG_TIME_VALID | CPUIDLE_FLAG_TLB_FLUSHED, | ||
| 472 | .exit_latency = 133, | ||
| 473 | .target_residency = 400, | ||
| 474 | .enter = &intel_idle }, | ||
| 475 | { | ||
| 476 | .name = "C7s-BDW", | ||
| 477 | .desc = "MWAIT 0x32", | ||
| 478 | .flags = MWAIT2flg(0x32) | CPUIDLE_FLAG_TIME_VALID | CPUIDLE_FLAG_TLB_FLUSHED, | ||
| 479 | .exit_latency = 166, | ||
| 480 | .target_residency = 500, | ||
| 481 | .enter = &intel_idle }, | ||
| 482 | { | ||
| 483 | .name = "C8-BDW", | ||
| 484 | .desc = "MWAIT 0x40", | ||
| 485 | .flags = MWAIT2flg(0x40) | CPUIDLE_FLAG_TIME_VALID | CPUIDLE_FLAG_TLB_FLUSHED, | ||
| 486 | .exit_latency = 300, | ||
| 487 | .target_residency = 900, | ||
| 488 | .enter = &intel_idle }, | ||
| 489 | { | ||
| 490 | .name = "C9-BDW", | ||
| 491 | .desc = "MWAIT 0x50", | ||
| 492 | .flags = MWAIT2flg(0x50) | CPUIDLE_FLAG_TIME_VALID | CPUIDLE_FLAG_TLB_FLUSHED, | ||
| 493 | .exit_latency = 600, | ||
| 494 | .target_residency = 1800, | ||
| 495 | .enter = &intel_idle }, | ||
| 496 | { | ||
| 497 | .name = "C10-BDW", | ||
| 498 | .desc = "MWAIT 0x60", | ||
| 499 | .flags = MWAIT2flg(0x60) | CPUIDLE_FLAG_TIME_VALID | CPUIDLE_FLAG_TLB_FLUSHED, | ||
| 500 | .exit_latency = 2600, | ||
| 501 | .target_residency = 7700, | ||
| 502 | .enter = &intel_idle }, | ||
| 503 | { | ||
| 504 | .enter = NULL } | ||
| 505 | }; | ||
| 446 | 506 | ||
| 447 | static struct cpuidle_state atom_cstates[] = { | 507 | static struct cpuidle_state atom_cstates[] = { |
| 448 | { | 508 | { |
| @@ -632,6 +692,11 @@ static const struct idle_cpu idle_cpu_hsw = { | |||
| 632 | .disable_promotion_to_c1e = true, | 692 | .disable_promotion_to_c1e = true, |
| 633 | }; | 693 | }; |
| 634 | 694 | ||
| 695 | static const struct idle_cpu idle_cpu_bdw = { | ||
| 696 | .state_table = bdw_cstates, | ||
| 697 | .disable_promotion_to_c1e = true, | ||
| 698 | }; | ||
| 699 | |||
| 635 | static const struct idle_cpu idle_cpu_avn = { | 700 | static const struct idle_cpu idle_cpu_avn = { |
| 636 | .state_table = avn_cstates, | 701 | .state_table = avn_cstates, |
| 637 | .disable_promotion_to_c1e = true, | 702 | .disable_promotion_to_c1e = true, |
| @@ -660,7 +725,10 @@ static const struct x86_cpu_id intel_idle_ids[] = { | |||
| 660 | ICPU(0x3f, idle_cpu_hsw), | 725 | ICPU(0x3f, idle_cpu_hsw), |
| 661 | ICPU(0x45, idle_cpu_hsw), | 726 | ICPU(0x45, idle_cpu_hsw), |
| 662 | ICPU(0x46, idle_cpu_hsw), | 727 | ICPU(0x46, idle_cpu_hsw), |
| 663 | ICPU(0x4D, idle_cpu_avn), | 728 | ICPU(0x4d, idle_cpu_avn), |
| 729 | ICPU(0x3d, idle_cpu_bdw), | ||
| 730 | ICPU(0x4f, idle_cpu_bdw), | ||
| 731 | ICPU(0x56, idle_cpu_bdw), | ||
| 664 | {} | 732 | {} |
| 665 | }; | 733 | }; |
| 666 | MODULE_DEVICE_TABLE(x86cpu, intel_idle_ids); | 734 | MODULE_DEVICE_TABLE(x86cpu, intel_idle_ids); |
