Skip to content

Commit ac89d11

Browse files
dedekindrafaeljw
authored andcommitted
intel_idle: add Grand Ridge SoC support
Add Intel Grand Ridge SoC C-states, which are C1, C1E, and C6S. The Grand Ridge 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. Package C6 is not supported by Grand Ridge SoC. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent eeae55e commit ac89d11

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

drivers/idle/intel_idle.c

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1271,6 +1271,35 @@ static struct cpuidle_state snr_cstates[] __initdata = {
12711271
.enter = NULL }
12721272
};
12731273

1274+
static struct cpuidle_state grr_cstates[] __initdata = {
1275+
{
1276+
.name = "C1",
1277+
.desc = "MWAIT 0x00",
1278+
.flags = MWAIT2flg(0x00) | CPUIDLE_FLAG_ALWAYS_ENABLE,
1279+
.exit_latency = 1,
1280+
.target_residency = 1,
1281+
.enter = &intel_idle,
1282+
.enter_s2idle = intel_idle_s2idle, },
1283+
{
1284+
.name = "C1E",
1285+
.desc = "MWAIT 0x01",
1286+
.flags = MWAIT2flg(0x01) | CPUIDLE_FLAG_ALWAYS_ENABLE,
1287+
.exit_latency = 2,
1288+
.target_residency = 10,
1289+
.enter = &intel_idle,
1290+
.enter_s2idle = intel_idle_s2idle, },
1291+
{
1292+
.name = "C6S",
1293+
.desc = "MWAIT 0x22",
1294+
.flags = MWAIT2flg(0x22) | CPUIDLE_FLAG_TLB_FLUSHED,
1295+
.exit_latency = 140,
1296+
.target_residency = 500,
1297+
.enter = &intel_idle,
1298+
.enter_s2idle = intel_idle_s2idle, },
1299+
{
1300+
.enter = NULL }
1301+
};
1302+
12741303
static const struct idle_cpu idle_cpu_nehalem __initconst = {
12751304
.state_table = nehalem_cstates,
12761305
.auto_demotion_disable_flags = NHM_C1_AUTO_DEMOTE | NHM_C3_AUTO_DEMOTE,
@@ -1420,6 +1449,12 @@ static const struct idle_cpu idle_cpu_snr __initconst = {
14201449
.use_acpi = true,
14211450
};
14221451

1452+
static const struct idle_cpu idle_cpu_grr __initconst = {
1453+
.state_table = grr_cstates,
1454+
.disable_promotion_to_c1e = true,
1455+
.use_acpi = true,
1456+
};
1457+
14231458
static const struct x86_cpu_id intel_idle_ids[] __initconst = {
14241459
X86_MATCH_INTEL_FAM6_MODEL(NEHALEM_EP, &idle_cpu_nhx),
14251460
X86_MATCH_INTEL_FAM6_MODEL(NEHALEM, &idle_cpu_nehalem),
@@ -1466,6 +1501,7 @@ static const struct x86_cpu_id intel_idle_ids[] __initconst = {
14661501
X86_MATCH_INTEL_FAM6_MODEL(ATOM_GOLDMONT_PLUS, &idle_cpu_bxt),
14671502
X86_MATCH_INTEL_FAM6_MODEL(ATOM_GOLDMONT_D, &idle_cpu_dnv),
14681503
X86_MATCH_INTEL_FAM6_MODEL(ATOM_TREMONT_D, &idle_cpu_snr),
1504+
X86_MATCH_INTEL_FAM6_MODEL(ATOM_CRESTMONT, &idle_cpu_grr),
14691505
{}
14701506
};
14711507

0 commit comments

Comments
 (0)