View | Details | Raw Unified | Return to bug 299891
Collapse All | Expand All

(-)linux-2.6.22/drivers/cpufreq/cpufreq.c (+14 lines)
Lines 515-520 static ssize_t show_scaling_governor (st Link Here
515
/**
515
/**
516
 * store_scaling_governor - store policy for the specified CPU
516
 * store_scaling_governor - store policy for the specified CPU
517
 */
517
 */
518
static int cpufreq_gov_initialized;
519
518
static ssize_t store_scaling_governor (struct cpufreq_policy * policy,
520
static ssize_t store_scaling_governor (struct cpufreq_policy * policy,
519
				       const char *buf, size_t count)
521
				       const char *buf, size_t count)
520
{
522
{
Lines 522-527 static ssize_t store_scaling_governor (s Link Here
522
	char	str_governor[16];
524
	char	str_governor[16];
523
	struct cpufreq_policy new_policy;
525
	struct cpufreq_policy new_policy;
524
526
527
	/* opteron, do not load ondemand per default workaround variable */
528
	cpufreq_gov_initialized = 1;
529
525
	ret = cpufreq_get_policy(&new_policy, policy->cpu);
530
	ret = cpufreq_get_policy(&new_policy, policy->cpu);
526
	if (ret)
531
	if (ret)
527
		return ret;
532
		return ret;
Lines 1466-1471 static int __cpufreq_governor(struct cpu Link Here
1466
	struct cpufreq_governor *gov = NULL;
1471
	struct cpufreq_governor *gov = NULL;
1467
#endif
1472
#endif
1468
1473
1474
#ifdef CONFIG_X86
1475
	struct cpuinfo_x86 *c = &cpu_data[policy->cpu];
1476
	if (!cpufreq_gov_initialized && strstr(c->x86_model_id, "Opteron")){
1477
		if (policy->cpu == 0)
1478
			printk(KERN_INFO "Opteron detected - Initialising cpufreq"
1479
			       " with performance governor\n");
1480
		policy->governor = gov;
1481
	} else
1482
#endif
1469
	if (policy->governor->max_transition_latency &&
1483
	if (policy->governor->max_transition_latency &&
1470
	    policy->cpuinfo.transition_latency >
1484
	    policy->cpuinfo.transition_latency >
1471
	    policy->governor->max_transition_latency) {
1485
	    policy->governor->max_transition_latency) {

Return to bug 299891