Re: SMP and gcc 2.7.2.3 break arch/i386/kernel/time.c (more clues

Mike Galbraith (mikeg@weiden.de)
Wed, 8 Dec 1999 16:39:17 +0100 (CET)


On Tue, 7 Dec 1999, David Dyck wrote:

> > the macro __build_read_lock_ptr() in include/asm-i386/rwlock.h
> >
> > #define __build_read_lock_ptr(rw, helper) \
> > asm volatile(LOCK "subl $1,(%0)\n\t" \
> > "js 2f\n" \
> > "1:\n" \
> > ".section .text.lock,\"ax\"\n" \
> > "2:\tcall " helper "\n\t" \
> > "jmp 1b\n" \
> > ".previous" \
> > ::"a" (rw) : "memory")
> >
>
> Since the helper function requires it's argument to
> be in ax we can't change the constraint on rw to be "r",
> but Mike suggested later that maybe the more of the
> helper function could be inlined

I didn't suggest inlining it, I said only that if it _were_ inline,
register selection _could_ be left up to the compiler.

> In this case when looking at ./arch/i386/kernel/semaphore.c
> for the helper function __read_lock_failed
> It does appear 'short' enough to inline.
>
> What do you think?

Add bytes all over the place just to make older compilers happy about
one function? Changing the one function makes more sense to me ;-)

-Mike

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