* [PATCH] 2.4.2: cure the kapm-idled taking (100-epsilon)% CPU time
@ 2001-03-03 23:03 Francis Galiegue
2001-03-03 23:15 ` Francis Galiegue
2001-03-03 23:16 ` Alan Cox
0 siblings, 2 replies; 7+ messages in thread
From: Francis Galiegue @ 2001-03-03 23:03 UTC (permalink / raw)
To: linux-kernel; +Cc: jgarzik, Kernel list
[-- Attachment #1: Type: TEXT/PLAIN, Size: 422 bytes --]
As attachment. Don't ask me why it works. Rather, if you see why it works, I'd
like to know why :)
Patch also applies cleanly over 2.4.2-ac10.
--
Francis Galiegue, fg@mandrakesoft.com - Normand et fier de l'être
"Programming is a race between programmers, who try and make more and more
idiot-proof software, and universe, which produces more and more remarkable
idiots. Until now, universe leads the race" -- R. Cook
[-- Attachment #2: Type: TEXT/PLAIN, Size: 348 bytes --]
--- linux/arch/i386/kernel/apm.c.old Sat Mar 3 23:59:36 2001
+++ linux/arch/i386/kernel/apm.c Sat Mar 3 23:57:56 2001
@@ -557,7 +557,7 @@
{
u32 dummy;
- if (apm_bios_call_simple(APM_FUNC_IDLE, 0, 0, &dummy))
+ if (apm_bios_call(APM_FUNC_IDLE, 0, 0, &dummy, &dummy, &dummy, &dummy, &dummy))
return 0;
#ifdef ALWAYS_CALL_BUSY
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] 2.4.2: cure the kapm-idled taking (100-epsilon)% CPU time
2001-03-03 23:03 [PATCH] 2.4.2: cure the kapm-idled taking (100-epsilon)% CPU time Francis Galiegue
@ 2001-03-03 23:15 ` Francis Galiegue
2001-03-03 23:16 ` Alan Cox
1 sibling, 0 replies; 7+ messages in thread
From: Francis Galiegue @ 2001-03-03 23:15 UTC (permalink / raw)
To: linux-kernel; +Cc: jgarzik, Kernel list
On Sun, 4 Mar 2001, Francis Galiegue wrote:
>
> As attachment. Don't ask me why it works. Rather, if you see why it works, I'd
> like to know why :)
>
BTW, in case this matters, this is with gcc 2.95.3 compiler...
--
Francis Galiegue, fg@mandrakesoft.com - Normand et fier de l'être
"Programming is a race between programmers, who try and make more and more
idiot-proof software, and universe, which produces more and more remarkable
idiots. Until now, universe leads the race" -- R. Cook
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] 2.4.2: cure the kapm-idled taking (100-epsilon)% CPU time
2001-03-03 23:03 [PATCH] 2.4.2: cure the kapm-idled taking (100-epsilon)% CPU time Francis Galiegue
2001-03-03 23:15 ` Francis Galiegue
@ 2001-03-03 23:16 ` Alan Cox
2001-03-03 23:19 ` Francis Galiegue
1 sibling, 1 reply; 7+ messages in thread
From: Alan Cox @ 2001-03-03 23:16 UTC (permalink / raw)
To: Francis Galiegue; +Cc: linux-kernel, jgarzik, Kernel list
> As attachment. Don't ask me why it works. Rather, if you see why it works, I'd
> like to know why :)
Why are you breaking kapm-idled. It is supposed to take all that cpu time. You
just broke all the power saving
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] 2.4.2: cure the kapm-idled taking (100-epsilon)% CPU time
2001-03-03 23:16 ` Alan Cox
@ 2001-03-03 23:19 ` Francis Galiegue
2001-03-03 23:28 ` [kernel] " Philipp Rumpf
2001-03-03 23:35 ` [PATCH] 2.4.2: cure the kapm-idled taking (100-epsilon)% CPU Alan Cox
0 siblings, 2 replies; 7+ messages in thread
From: Francis Galiegue @ 2001-03-03 23:19 UTC (permalink / raw)
To: Alan Cox; +Cc: linux-kernel, jgarzik, Kernel list
On Sat, 3 Mar 2001, Alan Cox wrote:
>
> > As attachment. Don't ask me why it works. Rather, if you see why it works, I'd
> > like to know why :)
>
> Why are you breaking kapm-idled. It is supposed to take all that cpu time. You
> just broke all the power saving
>
Well, from reading the source, I don't see how this can break APM... What am I
missing?
--
Francis Galiegue, fg@mandrakesoft.com - Normand et fier de l'être
"Programming is a race between programmers, who try and make more and more
idiot-proof software, and universe, which produces more and more remarkable
idiots. Until now, universe leads the race" -- R. Cook
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [kernel] Re: [PATCH] 2.4.2: cure the kapm-idled taking (100-epsilon)% CPU time
2001-03-03 23:19 ` Francis Galiegue
@ 2001-03-03 23:28 ` Philipp Rumpf
2001-03-04 0:02 ` Francis Galiegue
2001-03-03 23:35 ` [PATCH] 2.4.2: cure the kapm-idled taking (100-epsilon)% CPU Alan Cox
1 sibling, 1 reply; 7+ messages in thread
From: Philipp Rumpf @ 2001-03-03 23:28 UTC (permalink / raw)
To: Francis Galiegue; +Cc: Alan Cox, linux-kernel, jgarzik, Kernel list
On Sun, Mar 04, 2001 at 12:19:07AM +0100, Francis Galiegue wrote:
> Well, from reading the source, I don't see how this can break APM... What am I
> missing?
apm_bios_call must not be called with two identical pointers for
two different registers.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] 2.4.2: cure the kapm-idled taking (100-epsilon)% CPU
2001-03-03 23:19 ` Francis Galiegue
2001-03-03 23:28 ` [kernel] " Philipp Rumpf
@ 2001-03-03 23:35 ` Alan Cox
1 sibling, 0 replies; 7+ messages in thread
From: Alan Cox @ 2001-03-03 23:35 UTC (permalink / raw)
To: Francis Galiegue; +Cc: Alan Cox, linux-kernel, jgarzik, Kernel list
> Well, from reading the source, I don't see how this can break APM... What=
> am I
> missing?
If you've stopped kapm-idled from using cpu then you've stopped it from going
into the bios suspend one presumes.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [kernel] Re: [PATCH] 2.4.2: cure the kapm-idled taking (100-epsilon)% CPU time
2001-03-03 23:28 ` [kernel] " Philipp Rumpf
@ 2001-03-04 0:02 ` Francis Galiegue
0 siblings, 0 replies; 7+ messages in thread
From: Francis Galiegue @ 2001-03-04 0:02 UTC (permalink / raw)
To: Philipp Rumpf; +Cc: Alan Cox, linux-kernel, jgarzik, Kernel list
On Sat, 3 Mar 2001, Philipp Rumpf wrote:
> > Well, from reading the source, I don't see how this can break APM... What am I
> > missing?
>
> apm_bios_call must not be called with two identical pointers for
> two different registers.
>
OK, my bad... By replacing the call I made with this:
u32 dummy, a, b, c, d;
if (apm_bios_call(APM_FUNC_IDLE, 0, 0, &dummy, &a, &b, &c, &d))
return 0;
then the situation is back to "normal"...
Just one more thing though: in apm_bios_call_simple():
[...]
APM_DO_SAVE_SEGS;
{
int cx, dx, si;
[...]
Aren't cx, dx and si really meant to be u32?
--
Francis Galiegue, fg@mandrakesoft.com - Normand et fier de l'être
"Programming is a race between programmers, who try and make more and more
idiot-proof software, and universe, which produces more and more remarkable
idiots. Until now, universe leads the race" -- R. Cook
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2001-03-04 0:03 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-03 23:03 [PATCH] 2.4.2: cure the kapm-idled taking (100-epsilon)% CPU time Francis Galiegue
2001-03-03 23:15 ` Francis Galiegue
2001-03-03 23:16 ` Alan Cox
2001-03-03 23:19 ` Francis Galiegue
2001-03-03 23:28 ` [kernel] " Philipp Rumpf
2001-03-04 0:02 ` Francis Galiegue
2001-03-03 23:35 ` [PATCH] 2.4.2: cure the kapm-idled taking (100-epsilon)% CPU Alan Cox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).