Merge branch 'idle-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-idle-2.6

* 'idle-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-idle-2.6:
intel_idle: recognize Lincroft Atom Processor
intel_idle: no longer EXPERIMENTAL
intel_idle: disable module support
intel_idle: add support for Westmere-EX
intel_idle: delete power_policy modparam, and choose substate functions
intel_idle: delete substates DEBUG modparam

+8 -56
+1 -2
drivers/idle/Kconfig
··· 1 1 config INTEL_IDLE 2 - tristate "Cpuidle Driver for Intel Processors" 2 + bool "Cpuidle Driver for Intel Processors" 3 3 depends on CPU_IDLE 4 4 depends on X86 5 5 depends on CPU_SUP_INTEL 6 - depends on EXPERIMENTAL 7 6 help 8 7 Enable intel_idle, a cpuidle driver that includes knowledge of 9 8 native Intel hardware idle features. The acpi_idle driver
+7 -54
drivers/idle/intel_idle.c
··· 77 77 }; 78 78 /* intel_idle.max_cstate=0 disables driver */ 79 79 static int max_cstate = MWAIT_MAX_NUM_CSTATES - 1; 80 - static int power_policy = 7; /* 0 = max perf; 15 = max powersave */ 81 80 82 - static unsigned int substates; 83 - static int (*choose_substate)(int); 81 + static unsigned int mwait_substates; 84 82 85 83 /* Reliable LAPIC Timer States, bit 1 for C1 etc. */ 86 84 static unsigned int lapic_timer_reliable_states; ··· 166 168 .enter = NULL }, /* disabled */ 167 169 }; 168 170 169 - /* 170 - * choose_tunable_substate() 171 - * 172 - * Run-time decision on which C-state substate to invoke 173 - * If power_policy = 0, choose shallowest substate (0) 174 - * If power_policy = 15, choose deepest substate 175 - * If power_policy = middle, choose middle substate etc. 176 - */ 177 - static int choose_tunable_substate(int cstate) 178 - { 179 - unsigned int num_substates; 180 - unsigned int substate_choice; 181 - 182 - power_policy &= 0xF; /* valid range: 0-15 */ 183 - cstate &= 7; /* valid range: 0-7 */ 184 - 185 - num_substates = (substates >> ((cstate) * 4)) & MWAIT_SUBSTATE_MASK; 186 - 187 - if (num_substates <= 1) 188 - return 0; 189 - 190 - substate_choice = ((power_policy + (power_policy + 1) * 191 - (num_substates - 1)) / 16); 192 - 193 - return substate_choice; 194 - } 195 - 196 - /* 197 - * choose_zero_substate() 198 - */ 199 - static int choose_zero_substate(int cstate) 200 - { 201 - return 0; 202 - } 203 - 204 171 /** 205 172 * intel_idle 206 173 * @dev: cpuidle_device ··· 182 219 int cpu = smp_processor_id(); 183 220 184 221 cstate = (((eax) >> MWAIT_SUBSTATE_SIZE) & MWAIT_CSTATE_MASK) + 1; 185 - 186 - eax = eax + (choose_substate)(cstate); 187 222 188 223 local_irq_disable(); 189 224 ··· 220 259 */ 221 260 static int intel_idle_probe(void) 222 261 { 223 - unsigned int eax, ebx, ecx, edx; 262 + unsigned int eax, ebx, ecx; 224 263 225 264 if (max_cstate == 0) { 226 265 pr_debug(PREFIX "disabled\n"); ··· 236 275 if (boot_cpu_data.cpuid_level < CPUID_MWAIT_LEAF) 237 276 return -ENODEV; 238 277 239 - cpuid(CPUID_MWAIT_LEAF, &eax, &ebx, &ecx, &edx); 278 + cpuid(CPUID_MWAIT_LEAF, &eax, &ebx, &ecx, &mwait_substates); 240 279 241 280 if (!(ecx & CPUID5_ECX_EXTENSIONS_SUPPORTED) || 242 281 !(ecx & CPUID5_ECX_INTERRUPT_BREAK)) 243 282 return -ENODEV; 244 - #ifdef DEBUG 245 - if (substates == 0) /* can over-ride via modparam */ 246 - #endif 247 - substates = edx; 248 283 249 - pr_debug(PREFIX "MWAIT substates: 0x%x\n", substates); 284 + pr_debug(PREFIX "MWAIT substates: 0x%x\n", mwait_substates); 250 285 251 286 if (boot_cpu_has(X86_FEATURE_ARAT)) /* Always Reliable APIC Timer */ 252 287 lapic_timer_reliable_states = 0xFFFFFFFF; ··· 256 299 case 0x1E: /* Core i7 and i5 Processor - Lynnfield Jasper Forest */ 257 300 case 0x1F: /* Core i7 and i5 Processor - Nehalem */ 258 301 case 0x2E: /* Nehalem-EX Xeon */ 302 + case 0x2F: /* Westmere-EX Xeon */ 259 303 lapic_timer_reliable_states = (1 << 1); /* C1 */ 260 304 261 305 case 0x25: /* Westmere */ 262 306 case 0x2C: /* Westmere */ 263 307 cpuidle_state_table = nehalem_cstates; 264 - choose_substate = choose_tunable_substate; 265 308 break; 266 309 267 310 case 0x1C: /* 28 - Atom Processor */ 311 + case 0x26: /* 38 - Lincroft Atom Processor */ 268 312 lapic_timer_reliable_states = (1 << 2) | (1 << 1); /* C2, C1 */ 269 313 cpuidle_state_table = atom_cstates; 270 - choose_substate = choose_zero_substate; 271 314 break; 272 315 #ifdef FUTURE_USE 273 316 case 0x17: /* 23 - Core 2 Duo */ ··· 333 376 } 334 377 335 378 /* does the state exist in CPUID.MWAIT? */ 336 - num_substates = (substates >> ((cstate) * 4)) 379 + num_substates = (mwait_substates >> ((cstate) * 4)) 337 380 & MWAIT_SUBSTATE_MASK; 338 381 if (num_substates == 0) 339 382 continue; ··· 407 450 module_init(intel_idle_init); 408 451 module_exit(intel_idle_exit); 409 452 410 - module_param(power_policy, int, 0644); 411 453 module_param(max_cstate, int, 0444); 412 - #ifdef DEBUG 413 - module_param(substates, int, 0444); 414 - #endif 415 454 416 455 MODULE_AUTHOR("Len Brown <len.brown@intel.com>"); 417 456 MODULE_DESCRIPTION("Cpuidle driver for Intel Hardware v" INTEL_IDLE_VERSION);