Skip to content

Commit a138b56

Browse files
committed
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>
1 parent 8c058d5 commit a138b56

File tree

1 file changed

+69
-1
lines changed

1 file changed

+69
-1
lines changed

drivers/idle/intel_idle.c

Lines changed: 69 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,66 @@ static struct cpuidle_state hsw_cstates[] = {
443443
{
444444
.enter = NULL }
445445
};
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+
};
446506

447507
static struct cpuidle_state atom_cstates[] = {
448508
{
@@ -632,6 +692,11 @@ static const struct idle_cpu idle_cpu_hsw = {
632692
.disable_promotion_to_c1e = true,
633693
};
634694

695+
static const struct idle_cpu idle_cpu_bdw = {
696+
.state_table = bdw_cstates,
697+
.disable_promotion_to_c1e = true,
698+
};
699+
635700
static const struct idle_cpu idle_cpu_avn = {
636701
.state_table = avn_cstates,
637702
.disable_promotion_to_c1e = true,
@@ -660,7 +725,10 @@ static const struct x86_cpu_id intel_idle_ids[] = {
660725
ICPU(0x3f, idle_cpu_hsw),
661726
ICPU(0x45, idle_cpu_hsw),
662727
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),
664732
{}
665733
};
666734
MODULE_DEVICE_TABLE(x86cpu, intel_idle_ids);

0 commit comments

Comments
 (0)