[Top] [All Lists]

Re: [PATCH] Improve atomic.h implementation robustness

To: Thiemo Seufer <>
Subject: Re: [PATCH] Improve atomic.h implementation robustness
From: Dominic Sweetman <>
Date: Thu, 2 Dec 2004 08:01:24 +0000
Cc: "Maciej W. Rozycki" <>, Dominic Sweetman <>,,, Nigel Stephens <>, David Ung <>
In-reply-to: <>
Original-recipient: rfc822;
References: <> <> <> <> <>

> I had guessed you already know what i mean. :-)

Generally a bad guess, of course...

> Current 64bit MIPS kernels run in (C)KSEG0, and exploit sign-extension
> to optimize symbol loads (2 instead of 6/7 instructions, the same as in
> 32bit kernels).

Gross... yet ingenious. I see the problem.  You want to use a
32-bit-pointer "la" for the addresses of static variables in the
kernel build (which works, because the kernel is in the
32-bit-pointer-accessible 'kseg0').

The assembler macro was a very Linux solution, if you don't mind my
saying so...  A more native compiler fix would probably be a good

What ABI are you using for the 64-bit kernel build (n64? how do you
get it to build non-PIC?)  And what constraints are there on
your choice of gcc version? - it would be easier if 3.4 was OK.

Dominic Sweetman
MIPS Technologies

<Prev in Thread] Current Thread [Next in Thread>