aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/idle/intel_idle.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/idle/intel_idle.c')
-rw-r--r--drivers/idle/intel_idle.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
index fe95d5464a02..f559088869f6 100644
--- a/drivers/idle/intel_idle.c
+++ b/drivers/idle/intel_idle.c
@@ -170,6 +170,38 @@ static struct cpuidle_state snb_cstates[MWAIT_MAX_NUM_CSTATES] = {
170 .enter = &intel_idle }, 170 .enter = &intel_idle },
171}; 171};
172 172
173static struct cpuidle_state ivb_cstates[MWAIT_MAX_NUM_CSTATES] = {
174 { /* MWAIT C0 */ },
175 { /* MWAIT C1 */
176 .name = "C1-IVB",
177 .desc = "MWAIT 0x00",
178 .flags = CPUIDLE_FLAG_TIME_VALID,
179 .exit_latency = 1,
180 .target_residency = 1,
181 .enter = &intel_idle },
182 { /* MWAIT C2 */
183 .name = "C3-IVB",
184 .desc = "MWAIT 0x10",
185 .flags = CPUIDLE_FLAG_TIME_VALID | CPUIDLE_FLAG_TLB_FLUSHED,
186 .exit_latency = 59,
187 .target_residency = 156,
188 .enter = &intel_idle },
189 { /* MWAIT C3 */
190 .name = "C6-IVB",
191 .desc = "MWAIT 0x20",
192 .flags = CPUIDLE_FLAG_TIME_VALID | CPUIDLE_FLAG_TLB_FLUSHED,
193 .exit_latency = 80,
194 .target_residency = 300,
195 .enter = &intel_idle },
196 { /* MWAIT C4 */
197 .name = "C7-IVB",
198 .desc = "MWAIT 0x30",
199 .flags = CPUIDLE_FLAG_TIME_VALID | CPUIDLE_FLAG_TLB_FLUSHED,
200 .exit_latency = 87,
201 .target_residency = 300,
202 .enter = &intel_idle },
203};
204
173static struct cpuidle_state atom_cstates[MWAIT_MAX_NUM_CSTATES] = { 205static struct cpuidle_state atom_cstates[MWAIT_MAX_NUM_CSTATES] = {
174 { /* MWAIT C0 */ }, 206 { /* MWAIT C0 */ },
175 { /* MWAIT C1 */ 207 { /* MWAIT C1 */
@@ -361,6 +393,10 @@ static const struct idle_cpu idle_cpu_snb = {
361 .state_table = snb_cstates, 393 .state_table = snb_cstates,
362}; 394};
363 395
396static const struct idle_cpu idle_cpu_ivb = {
397 .state_table = ivb_cstates,
398};
399
364#define ICPU(model, cpu) \ 400#define ICPU(model, cpu) \
365 { X86_VENDOR_INTEL, 6, model, X86_FEATURE_MWAIT, (unsigned long)&cpu } 401 { X86_VENDOR_INTEL, 6, model, X86_FEATURE_MWAIT, (unsigned long)&cpu }
366 402
@@ -376,6 +412,7 @@ static const struct x86_cpu_id intel_idle_ids[] = {
376 ICPU(0x2f, idle_cpu_nehalem), 412 ICPU(0x2f, idle_cpu_nehalem),
377 ICPU(0x2a, idle_cpu_snb), 413 ICPU(0x2a, idle_cpu_snb),
378 ICPU(0x2d, idle_cpu_snb), 414 ICPU(0x2d, idle_cpu_snb),
415 ICPU(0x3a, idle_cpu_ivb),
379 {} 416 {}
380}; 417};
381MODULE_DEVICE_TABLE(x86cpu, intel_idle_ids); 418MODULE_DEVICE_TABLE(x86cpu, intel_idle_ids);