Skip to content

Commit 92813fd

Browse files
dedekindrafaeljw
authored andcommitted
intel_idle: add Sierra Forest SoC support
Add Sierra Forest SoC C-states, which are C1, C1E, C6S, and C6SP. Sierra Forest SoC is built with modules, each module includes 4 cores (Crestmont microarchitecture). There is one L2 cache per module, shared between the 4 cores. There is no core C6 state, but there is C6S state, which has module scope: when all 4 cores request C6S, the entire module (4 cores + L2 cache) enters the low power state. C6SP state has package scope - when all modules in the package enter C6S, the package enters the power state mode. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent ac89d11 commit 92813fd

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

drivers/idle/intel_idle.c

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1300,6 +1300,43 @@ static struct cpuidle_state grr_cstates[] __initdata = {
13001300
.enter = NULL }
13011301
};
13021302

1303+
static struct cpuidle_state srf_cstates[] __initdata = {
1304+
{
1305+
.name = "C1",
1306+
.desc = "MWAIT 0x00",
1307+
.flags = MWAIT2flg(0x00) | CPUIDLE_FLAG_ALWAYS_ENABLE,
1308+
.exit_latency = 1,
1309+
.target_residency = 1,
1310+
.enter = &intel_idle,
1311+
.enter_s2idle = intel_idle_s2idle, },
1312+
{
1313+
.name = "C1E",
1314+
.desc = "MWAIT 0x01",
1315+
.flags = MWAIT2flg(0x01) | CPUIDLE_FLAG_ALWAYS_ENABLE,
1316+
.exit_latency = 2,
1317+
.target_residency = 10,
1318+
.enter = &intel_idle,
1319+
.enter_s2idle = intel_idle_s2idle, },
1320+
{
1321+
.name = "C6S",
1322+
.desc = "MWAIT 0x22",
1323+
.flags = MWAIT2flg(0x22) | CPUIDLE_FLAG_TLB_FLUSHED,
1324+
.exit_latency = 270,
1325+
.target_residency = 700,
1326+
.enter = &intel_idle,
1327+
.enter_s2idle = intel_idle_s2idle, },
1328+
{
1329+
.name = "C6SP",
1330+
.desc = "MWAIT 0x23",
1331+
.flags = MWAIT2flg(0x23) | CPUIDLE_FLAG_TLB_FLUSHED,
1332+
.exit_latency = 310,
1333+
.target_residency = 900,
1334+
.enter = &intel_idle,
1335+
.enter_s2idle = intel_idle_s2idle, },
1336+
{
1337+
.enter = NULL }
1338+
};
1339+
13031340
static const struct idle_cpu idle_cpu_nehalem __initconst = {
13041341
.state_table = nehalem_cstates,
13051342
.auto_demotion_disable_flags = NHM_C1_AUTO_DEMOTE | NHM_C3_AUTO_DEMOTE,
@@ -1455,6 +1492,12 @@ static const struct idle_cpu idle_cpu_grr __initconst = {
14551492
.use_acpi = true,
14561493
};
14571494

1495+
static const struct idle_cpu idle_cpu_srf __initconst = {
1496+
.state_table = srf_cstates,
1497+
.disable_promotion_to_c1e = true,
1498+
.use_acpi = true,
1499+
};
1500+
14581501
static const struct x86_cpu_id intel_idle_ids[] __initconst = {
14591502
X86_MATCH_INTEL_FAM6_MODEL(NEHALEM_EP, &idle_cpu_nhx),
14601503
X86_MATCH_INTEL_FAM6_MODEL(NEHALEM, &idle_cpu_nehalem),
@@ -1502,6 +1545,7 @@ static const struct x86_cpu_id intel_idle_ids[] __initconst = {
15021545
X86_MATCH_INTEL_FAM6_MODEL(ATOM_GOLDMONT_D, &idle_cpu_dnv),
15031546
X86_MATCH_INTEL_FAM6_MODEL(ATOM_TREMONT_D, &idle_cpu_snr),
15041547
X86_MATCH_INTEL_FAM6_MODEL(ATOM_CRESTMONT, &idle_cpu_grr),
1548+
X86_MATCH_INTEL_FAM6_MODEL(ATOM_CRESTMONT_X, &idle_cpu_srf),
15051549
{}
15061550
};
15071551

0 commit comments

Comments
 (0)