Re: Bug#234976: kernel-source-2.6.4: Software Suspend doesn't work

From: Pavel Machek
Date: Tue Apr 27 2004 - 19:24:34 EST


Hi!

> > ged, anyway...
> >
> > Could do. And on the top of merging, sorry for the delays I'm getting
> > there. I figured out yesterday what was holding me back with getting SMP &
> > HighMem going under 2.6. It was really simple: the compile was using -O2.
> > A quick change to the Makefile and I can now use a C file as I do with 2.4.
>
> Which, as I keep saying, is plain broken ... You simply cannot control
> what side effects the compiler will generate, like touching the stack,
> etc... Such a critical routine _has_ to be written in assembly (and
> properly commented of course). Anything else is asking for trouble.

You are of course right.

OTOH this is easy to solve... gcc -E and use resulting assembly after
verifying it (and probably cleaning it up).

BTW do not do the same mistake I did... I basically lost original .c
file. Make sure .c file is still there somewhere, so assembly can be
regenerated after big changes.
Pavel
--
934a471f20d6580d5aad759bf0d97ddc
-
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/