Re: Suspend 2 merge: 22/51: Suspend2 lowlevel code.

From: Nigel Cunningham
Date: Fri Nov 26 2004 - 16:41:42 EST


Hi.

On Fri, 2004-11-26 at 05:39, Pavel Machek wrote:
> Hi!
>
> > +#include "../../../kernel/power/suspend.h"
>
> Ouch.
>
> > +#define loaddebug(thread,register) > + __asm__("movl %0,%%db" #register > + : /* no output */ > + :"r" ((thread)->debugreg[register]))
>
> This should be already defined somewhere...

Will look for it.

> > + * Note that the context and timing of this function is pretty critical.
> > + * With a minimal amount of things going on in the caller and in here, gcc
> > + * does a good job of being just a dumb compiler. Watch the assembly output
> > + * if anything changes, though, and make sure everything is going in the right
> > + * place.
>
> You should include assembly source (unless you can test all the compilers...). Feel free
> to include C version, too, but #ifdef it out.

I'm thinking I should actually be removing the comment. The C is simple,
clear, fast and easy to maintain and we haven't actually had any
problems at all with compilers. All my tweaking in here has turned out
to be irrelevant to the real cause of problems (I recently found a bug
where work queues were wrongly inheriting freezer flags; since fixing
that, all the symptoms in this area have gone away).

Regards,

Nigel
--
Nigel Cunningham
Pastoral Worker
Christian Reformed Church of Tuggeranong
PO Box 1004, Tuggeranong, ACT 2901

You see, at just the right time, when we were still powerless, Christ
died for the ungodly. -- Romans 5:6

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/