public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* alpha: half done futex implementation
@ 2009-04-12  0:55 Matt Turner
  2009-04-12 13:49 ` Tobias Klausmann
  2009-04-13 20:23 ` Richard Henderson
  0 siblings, 2 replies; 10+ messages in thread
From: Matt Turner @ 2009-04-12  0:55 UTC (permalink / raw)
  To: linux-kernel, linux-alpha
  Cc: Ivan Kokshaysky, Richard Henderson, Jay Estabrook, Oliver Falk

Hi,

Going on Richard's advice, I've tried to write an alpha futex
implementation based on the powerpc futex.h.

I've gotten this far.. :\

#define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \
    __asm__ __volatile(             \
    "1: ldl_l   %0,%2\n"            \
        insn                        \
    /* something needs to happen here
     * to save result of insn across
     * stl_c? */
    "   stl_c   %1,%2\n"            \
    "   beq     %1,2f\n"            \
    "   mb\n"                       \
    /* something needs to happen here
     * for the ret */
    "   .subsection 2\n"            \
    "2: br      1b\n"               \
    "   .previous\n"                \
    : "=&r" (oldval), "=&r" (ret)   \
    : "b" (uaddr) \
    : "memory")

Could someone take a look and help finish it?

For futex_atomic_cmpxchg_inatomic, I think Ivan's DRM_CAS
implementation can be used with only trivial changes. See
http://cgit.freedesktop.org/mesa/drm/commit/?id=6feac49398d0f037103a4ae3d5a512badeed61fb

Please CC me on responses, as I'm not subscribed to linux-kernel@.

Thanks,

Matt Turner

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-04-16 22:06 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-12  0:55 alpha: half done futex implementation Matt Turner
2009-04-12 13:49 ` Tobias Klausmann
2009-04-13 20:23 ` Richard Henderson
2009-04-13 21:54   ` Andreas Schwab
2009-04-13 22:20     ` Richard Henderson
2009-04-14  9:40   ` Segher Boessenkool
2009-04-14  9:45     ` Segher Boessenkool
2009-04-14 22:38   ` Matt Turner
2009-04-15 15:42     ` Ivan Kokshaysky
2009-04-16 22:06     ` Ivan Kokshaysky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox