* [Ubuntu PATCH] cpufreq: fix powernow-k8 load bug
@ 2006-06-21 5:32 Randy Dunlap
2006-06-21 5:41 ` Dave Jones
2006-06-22 20:38 ` Pavel Machek
0 siblings, 2 replies; 8+ messages in thread
From: Randy Dunlap @ 2006-06-21 5:32 UTC (permalink / raw)
To: davej, lkml, akpm
Fix powernow-k8 doesn't load bug.
Reference: https://launchpad.net/distros/ubuntu/+source/linux-source-2.6.15/+bug/35145
http://www.kernel.org/git/?p=linux/kernel/git/bcollins/ubuntu-dapper.git;a=commitdiff;h=dce0ca36f2ae348f005735e9acd400d2c0954421
---
arch/i386/kernel/cpu/cpufreq/powernow-k8.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- linux-2617-pv.orig/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
+++ linux-2617-pv/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
@@ -1008,7 +1008,7 @@ static int __cpuinit powernowk8_cpu_init
* an UP version, and is deprecated by AMD.
*/
- if ((num_online_cpus() != 1) || (num_possible_cpus() != 1)) {
+ if ((num_online_cpus() != 1)) {
printk(KERN_ERR PFX "MP systems not supported by PSB BIOS structure\n");
kfree(data);
return -ENODEV;
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [Ubuntu PATCH] cpufreq: fix powernow-k8 load bug 2006-06-21 5:32 [Ubuntu PATCH] cpufreq: fix powernow-k8 load bug Randy Dunlap @ 2006-06-21 5:41 ` Dave Jones 2006-06-21 5:45 ` Dave Jones 2006-06-22 20:38 ` Pavel Machek 1 sibling, 1 reply; 8+ messages in thread From: Dave Jones @ 2006-06-21 5:41 UTC (permalink / raw) To: Randy Dunlap; +Cc: davej, lkml, akpm On Tue, Jun 20, 2006 at 10:32:56PM -0700, Randy Dunlap wrote: > Fix powernow-k8 doesn't load bug. > Reference: https://launchpad.net/distros/ubuntu/+source/linux-source-2.6.15/+bug/35145 > > http://www.kernel.org/git/?p=linux/kernel/git/bcollins/ubuntu-dapper.git;a=commitdiff;h=dce0ca36f2ae348f005735e9acd400d2c0954421 Already fixed in -git1 Dave -- http://www.codemonkey.org.uk ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Ubuntu PATCH] cpufreq: fix powernow-k8 load bug 2006-06-21 5:41 ` Dave Jones @ 2006-06-21 5:45 ` Dave Jones 0 siblings, 0 replies; 8+ messages in thread From: Dave Jones @ 2006-06-21 5:45 UTC (permalink / raw) To: Randy Dunlap, davej, lkml, akpm On Wed, Jun 21, 2006 at 01:41:44AM -0400, Dave Jones wrote: > On Tue, Jun 20, 2006 at 10:32:56PM -0700, Randy Dunlap wrote: > > Fix powernow-k8 doesn't load bug. > > Reference: https://launchpad.net/distros/ubuntu/+source/linux-source-2.6.15/+bug/35145 > > > > http://www.kernel.org/git/?p=linux/kernel/git/bcollins/ubuntu-dapper.git;a=commitdiff;h=dce0ca36f2ae348f005735e9acd400d2c0954421 > > Already fixed in -git1 My bad, I mixed it up with the similar fix for powernow-k7. I'll queue this up tomorrow morning. thanks, Dave -- http://www.codemonkey.org.uk ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Ubuntu PATCH] cpufreq: fix powernow-k8 load bug 2006-06-21 5:32 [Ubuntu PATCH] cpufreq: fix powernow-k8 load bug Randy Dunlap 2006-06-21 5:41 ` Dave Jones @ 2006-06-22 20:38 ` Pavel Machek 2006-06-23 12:28 ` Dave Jones 1 sibling, 1 reply; 8+ messages in thread From: Pavel Machek @ 2006-06-22 20:38 UTC (permalink / raw) To: Randy Dunlap; +Cc: davej, lkml, akpm Hi! > Fix powernow-k8 doesn't load bug. > Reference: https://launchpad.net/distros/ubuntu/+source/linux-source-2.6.15/+bug/35145 > > http://www.kernel.org/git/?p=linux/kernel/git/bcollins/ubuntu-dapper.git;a=commitdiff;h=dce0ca36f2ae348f005735e9acd400d2c0954421 > > > > --- > arch/i386/kernel/cpu/cpufreq/powernow-k8.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > --- linux-2617-pv.orig/arch/i386/kernel/cpu/cpufreq/powernow-k8.c > +++ linux-2617-pv/arch/i386/kernel/cpu/cpufreq/powernow-k8.c > @@ -1008,7 +1008,7 @@ static int __cpuinit powernowk8_cpu_init > * an UP version, and is deprecated by AMD. > */ > > - if ((num_online_cpus() != 1) || (num_possible_cpus() != 1)) { > + if ((num_online_cpus() != 1)) { > printk(KERN_ERR PFX "MP systems not supported by PSB BIOS structure\n"); > kfree(data); > return -ENODEV; > Seems wrong to me... what if I boot, then hotplug second cpu? -- 64 bytes from 195.113.31.123: icmp_seq=28 ttl=51 time=448769.1 ms ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Ubuntu PATCH] cpufreq: fix powernow-k8 load bug 2006-06-22 20:38 ` Pavel Machek @ 2006-06-23 12:28 ` Dave Jones 2006-06-23 12:46 ` Pavel Machek 0 siblings, 1 reply; 8+ messages in thread From: Dave Jones @ 2006-06-23 12:28 UTC (permalink / raw) To: Pavel Machek; +Cc: Randy Dunlap, davej, lkml, akpm On Thu, Jun 22, 2006 at 10:38:56PM +0200, Pavel Machek wrote: > > --- linux-2617-pv.orig/arch/i386/kernel/cpu/cpufreq/powernow-k8.c > > +++ linux-2617-pv/arch/i386/kernel/cpu/cpufreq/powernow-k8.c > > @@ -1008,7 +1008,7 @@ static int __cpuinit powernowk8_cpu_init > > * an UP version, and is deprecated by AMD. > > */ > > > > - if ((num_online_cpus() != 1) || (num_possible_cpus() != 1)) { > > + if ((num_online_cpus() != 1)) { > > printk(KERN_ERR PFX "MP systems not supported by PSB BIOS structure\n"); > > kfree(data); > > return -ENODEV; > > > > Seems wrong to me... what if I boot, then hotplug second cpu? We only run this code if powernow_k8_cpu_init_acpi() has failed, which it should never do on an SMP system. So, you get exactly the same behaviour, as expected. You can't support >1 CPU with PSB. The above patch makes sure things continue to work if you run an SMP kernel on UP hardware. Dave -- http://www.codemonkey.org.uk ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Ubuntu PATCH] cpufreq: fix powernow-k8 load bug 2006-06-23 12:28 ` Dave Jones @ 2006-06-23 12:46 ` Pavel Machek 2006-06-23 13:04 ` Dave Jones 0 siblings, 1 reply; 8+ messages in thread From: Pavel Machek @ 2006-06-23 12:46 UTC (permalink / raw) To: Dave Jones, Randy Dunlap, davej, lkml, akpm Hi! > > > --- linux-2617-pv.orig/arch/i386/kernel/cpu/cpufreq/powernow-k8.c > > > +++ linux-2617-pv/arch/i386/kernel/cpu/cpufreq/powernow-k8.c > > > @@ -1008,7 +1008,7 @@ static int __cpuinit powernowk8_cpu_init > > > * an UP version, and is deprecated by AMD. > > > */ > > > > > > - if ((num_online_cpus() != 1) || (num_possible_cpus() != 1)) { > > > + if ((num_online_cpus() != 1)) { > > > printk(KERN_ERR PFX "MP systems not supported by PSB BIOS structure\n"); > > > kfree(data); > > > return -ENODEV; > > > > > > > Seems wrong to me... what if I boot, then hotplug second cpu? > > We only run this code if powernow_k8_cpu_init_acpi() has failed, > which it should never do on an SMP system. > > So, you get exactly the same behaviour, as expected. > You can't support >1 CPU with PSB. > > The above patch makes sure things continue to work if you run > an SMP kernel on UP hardware. I'm pretty sure you'll find SMP machine with broken ACPI cpufreq (therefore cpu_init_acpi() will fail). And if user is perverse enough, he might boot with one cpu then simulate hotplug of second one. OTOH: 1) user is already doing perverse things at this point and 2) machine BIOS is b0rken ...so... it is only theoretical and probably not worth fixing. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Ubuntu PATCH] cpufreq: fix powernow-k8 load bug 2006-06-23 12:46 ` Pavel Machek @ 2006-06-23 13:04 ` Dave Jones 2006-06-23 13:05 ` Pavel Machek 0 siblings, 1 reply; 8+ messages in thread From: Dave Jones @ 2006-06-23 13:04 UTC (permalink / raw) To: Pavel Machek; +Cc: Randy Dunlap, davej, lkml, akpm On Fri, Jun 23, 2006 at 02:46:56PM +0200, Pavel Machek wrote: > > > > --- linux-2617-pv.orig/arch/i386/kernel/cpu/cpufreq/powernow-k8.c > > > > +++ linux-2617-pv/arch/i386/kernel/cpu/cpufreq/powernow-k8.c > > > > @@ -1008,7 +1008,7 @@ static int __cpuinit powernowk8_cpu_init > > > > * an UP version, and is deprecated by AMD. > > > > */ > > > > > > > > - if ((num_online_cpus() != 1) || (num_possible_cpus() != 1)) { > > > > + if ((num_online_cpus() != 1)) { > > > > printk(KERN_ERR PFX "MP systems not supported by PSB BIOS structure\n"); > > > > kfree(data); > > > > return -ENODEV; > > > > > > > > > > Seems wrong to me... what if I boot, then hotplug second cpu? > > > > We only run this code if powernow_k8_cpu_init_acpi() has failed, > > which it should never do on an SMP system. > > > > So, you get exactly the same behaviour, as expected. > > You can't support >1 CPU with PSB. > > > > The above patch makes sure things continue to work if you run > > an SMP kernel on UP hardware. > > I'm pretty sure you'll find SMP machine with broken ACPI cpufreq > (therefore cpu_init_acpi() will fail). So? It fails now, it'll fail after this patch. That's not the situation that this patch is changing. If you have >1 CPU, you *must* have a working ACPI BIOS. > he might boot with one cpu then simulate hotplug of second one. > > 1) user is already doing perverse things at this point > > and > > 2) machine BIOS is b0rken > > ...so... it is only theoretical and probably not worth fixing. SMP kernel on UP hardware is not theoretical, and is worth fixing. Dave -- http://www.codemonkey.org.uk ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Ubuntu PATCH] cpufreq: fix powernow-k8 load bug 2006-06-23 13:04 ` Dave Jones @ 2006-06-23 13:05 ` Pavel Machek 0 siblings, 0 replies; 8+ messages in thread From: Pavel Machek @ 2006-06-23 13:05 UTC (permalink / raw) To: Dave Jones, Randy Dunlap, davej, lkml, akpm On Fri 2006-06-23 09:04:14, Dave Jones wrote: > On Fri, Jun 23, 2006 at 02:46:56PM +0200, Pavel Machek wrote: > > > > > > --- linux-2617-pv.orig/arch/i386/kernel/cpu/cpufreq/powernow-k8.c > > > > > +++ linux-2617-pv/arch/i386/kernel/cpu/cpufreq/powernow-k8.c > > > > > @@ -1008,7 +1008,7 @@ static int __cpuinit powernowk8_cpu_init > > > > > * an UP version, and is deprecated by AMD. > > > > > */ > > > > > > > > > > - if ((num_online_cpus() != 1) || (num_possible_cpus() != 1)) { > > > > > + if ((num_online_cpus() != 1)) { > > > > > printk(KERN_ERR PFX "MP systems not supported by PSB BIOS structure\n"); > > > > > kfree(data); > > > > > return -ENODEV; > > > > > > > > > > > > > Seems wrong to me... what if I boot, then hotplug second cpu? > > > > > > We only run this code if powernow_k8_cpu_init_acpi() has failed, > > > which it should never do on an SMP system. > > > > > > So, you get exactly the same behaviour, as expected. > > > You can't support >1 CPU with PSB. > > > > > > The above patch makes sure things continue to work if you run > > > an SMP kernel on UP hardware. > > > > I'm pretty sure you'll find SMP machine with broken ACPI cpufreq > > (therefore cpu_init_acpi() will fail). > > So? It fails now, it'll fail after this patch. > That's not the situation that this patch is changing. > > If you have >1 CPU, you *must* have a working ACPI BIOS. > > > he might boot with one cpu then simulate hotplug of second one. > > > > 1) user is already doing perverse things at this point > > > > and > > > > 2) machine BIOS is b0rken > > > > ...so... it is only theoretical and probably not worth fixing. > > SMP kernel on UP hardware is not theoretical, and is worth fixing. Problem _I_ pointed out is theoretical, so the patch is okay and sorry for the noise. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2006-06-23 13:06 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2006-06-21 5:32 [Ubuntu PATCH] cpufreq: fix powernow-k8 load bug Randy Dunlap 2006-06-21 5:41 ` Dave Jones 2006-06-21 5:45 ` Dave Jones 2006-06-22 20:38 ` Pavel Machek 2006-06-23 12:28 ` Dave Jones 2006-06-23 12:46 ` Pavel Machek 2006-06-23 13:04 ` Dave Jones 2006-06-23 13:05 ` Pavel Machek
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox