* [PATCH] 2/2 fix driver removal code to clean up all governors
@ 2005-11-10 22:53 Langsdorf, Mark
2005-11-21 15:36 ` Dave Jones
0 siblings, 1 reply; 3+ messages in thread
From: Langsdorf, Mark @ 2005-11-10 22:53 UTC (permalink / raw)
To: cpufreq; +Cc: shin, jacob
[-- Attachment #1: Type: text/plain, Size: 235 bytes --]
This patch fixes a bug that causes a segfault when the
powernow-k8 driver is removed while the ondemand
governor is running.
Signed-off-by: Jacob Shin <jacob.shin@amd.com>
Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com>
[-- Attachment #2: cpufreq-gov_stop-fix.patch --]
[-- Type: application/octet-stream, Size: 353 bytes --]
--- cpufreq.c.orig 2005-11-10 13:32:41.000000000 -0600
+++ cpufreq.c 2005-11-10 13:33:19.000000000 -0600
@@ -772,7 +772,6 @@ static int cpufreq_remove_dev (struct sy
down(&data->lock);
if (cpufreq_driver->target)
__cpufreq_governor(data, CPUFREQ_GOV_STOP);
- cpufreq_driver->target = NULL;
up(&data->lock);
kobject_unregister(&data->kobj);
[-- Attachment #3: Type: text/plain, Size: 147 bytes --]
_______________________________________________
Cpufreq mailing list
Cpufreq@lists.linux.org.uk
http://lists.linux.org.uk/mailman/listinfo/cpufreq
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] 2/2 fix driver removal code to clean up all governors
2005-11-10 22:53 [PATCH] 2/2 fix driver removal code to clean up all governors Langsdorf, Mark
@ 2005-11-21 15:36 ` Dave Jones
0 siblings, 0 replies; 3+ messages in thread
From: Dave Jones @ 2005-11-21 15:36 UTC (permalink / raw)
To: Langsdorf, Mark; +Cc: cpufreq
On Thu, Nov 10, 2005 at 04:53:57PM -0600, Langsdorf, Mark wrote:
> This patch fixes a bug that causes a segfault when the
> powernow-k8 driver is removed while the ondemand
> governor is running.
>
> Signed-off-by: Jacob Shin <jacob.shin@amd.com>
> Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com>
Can you elaborate on this one a little ?
(Also: Please make your patches so that they apply with -p1
I fixed up the other one by hand adding in the full pathname,
but I'm far too lazy to do that for every patch :-)
Dave
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] 2/2 fix driver removal code to clean up all governors
@ 2005-11-21 17:48 shin, jacob
0 siblings, 0 replies; 3+ messages in thread
From: shin, jacob @ 2005-11-21 17:48 UTC (permalink / raw)
To: Dave Jones, Langsdorf, Mark; +Cc: cpufreq
oops sorry about that.. will create patches for -p1 in the future.
when running on SMP setup, powernow-k8 as module:
- we unload powernow-k8 module,
- powernow calls cpufreq_unregister_driver
- which calls cpufreq_remove_device per cpu
- cpu0 will CPUFREQ_GOV_STOP and set cpufreq_driver->target = NULL
- cpu1.. and all following cpus will see NULL and not call CPUFREQ_GOV_STOP
result is that we have module dependancy left over in lsmod. which is not critical when running trivial governors that doesn't DECLARE_WORK.
however, when running with cpufreq_ondemand governor, which does DECLARE_WORK, the work scheduled is not destroyed properly, because of the left over module dependancies, and kernel goes kaboom.
this is actually fixed already in the latest 2.6.15 rc (probably indirectly) by Ashok Raj getting cpufreq to work w/ cpu hotplug:
http://kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c32b6b8e524d2c337767d312814484d9289550cf
so I think we're good here.
-Jacob Shin
AMD, Inc.
On Monday, November 21, 2005 9:36 AM Dave Jones wrote:
> On Thu, Nov 10, 2005 at 04:53:57PM -0600, Langsdorf, Mark wrote:
> > This patch fixes a bug that causes a segfault when the
> > powernow-k8 driver is removed while the ondemand > governor is running.
> >
> > Signed-off-by: Jacob Shin <jacob.shin@amd.com>
> > Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com>
>
> Can you elaborate on this one a little ?
>
> (Also: Please make your patches so that they apply with -p1
> I fixed up the other one by hand adding in the full pathname,
> but I'm far too lazy to do that for every patch :-)
>
> Dave
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-11-21 17:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-10 22:53 [PATCH] 2/2 fix driver removal code to clean up all governors Langsdorf, Mark
2005-11-21 15:36 ` Dave Jones
-- strict thread matches above, loose matches on Subject: below --
2005-11-21 17:48 shin, jacob
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox