diff options
Diffstat (limited to 'arch/x86/kernel')
| -rw-r--r-- | arch/x86/kernel/cpu/cpufreq/p4-clockmod.c | 6 | ||||
| -rw-r--r-- | arch/x86/kernel/cpu/cpufreq/powernow-k8.c | 13 | 
2 files changed, 13 insertions, 6 deletions
diff --git a/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c b/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c index bd1cac747f6..52c93648e49 100644 --- a/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c +++ b/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c @@ -158,9 +158,9 @@ static unsigned int cpufreq_p4_get_frequency(struct cpuinfo_x86 *c)  {  	if (c->x86 == 0x06) {  		if (cpu_has(c, X86_FEATURE_EST)) -			printk(KERN_WARNING PFX "Warning: EST-capable CPU " -			       "detected. The acpi-cpufreq module offers " -			       "voltage scaling in addition of frequency " +			printk_once(KERN_WARNING PFX "Warning: EST-capable " +			       "CPU detected. The acpi-cpufreq module offers " +			       "voltage scaling in addition to frequency "  			       "scaling. You should use that instead of "  			       "p4-clockmod, if possible.\n");  		switch (c->x86_model) { diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c index 35c7e65e59b..c567dec854f 100644 --- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c +++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c @@ -1537,6 +1537,7 @@ static struct notifier_block cpb_nb = {  static int __cpuinit powernowk8_init(void)  {  	unsigned int i, supported_cpus = 0, cpu; +	int rv;  	for_each_online_cpu(i) {  		int rc; @@ -1555,14 +1556,14 @@ static int __cpuinit powernowk8_init(void)  		cpb_capable = true; -		register_cpu_notifier(&cpb_nb); -  		msrs = msrs_alloc();  		if (!msrs) {  			printk(KERN_ERR "%s: Error allocating msrs!\n", __func__);  			return -ENOMEM;  		} +		register_cpu_notifier(&cpb_nb); +  		rdmsr_on_cpus(cpu_online_mask, MSR_K7_HWCR, msrs);  		for_each_cpu(cpu, cpu_online_mask) { @@ -1574,7 +1575,13 @@ static int __cpuinit powernowk8_init(void)  			(cpb_enabled ? "on" : "off"));  	} -	return cpufreq_register_driver(&cpufreq_amd64_driver); +	rv = cpufreq_register_driver(&cpufreq_amd64_driver); +	if (rv < 0 && boot_cpu_has(X86_FEATURE_CPB)) { +		unregister_cpu_notifier(&cpb_nb); +		msrs_free(msrs); +		msrs = NULL; +	} +	return rv;  }  /* driver entry point for term */  |