Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759379AbZDLAzu (ORCPT ); Sat, 11 Apr 2009 20:55:50 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754762AbZDLAz1 (ORCPT ); Sat, 11 Apr 2009 20:55:27 -0400 Received: from mail-gx0-f160.google.com ([209.85.217.160]:37997 "EHLO mail-gx0-f160.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753470AbZDLAzZ (ORCPT ); Sat, 11 Apr 2009 20:55:25 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=vu56TA3V3vZUItil6GwHG0tR1QYA6qpEZlvfcTEhihTcuzyIPmkgonQ6blSVHZRK7z LuCrsE6Rpa6akpYm2X22Ikqz8ebDL0VfqVUNKsm18RkUo6nN5U8TfGe7vJTr5t3iUajO ac+K9goggkBgr+reafv8qPrbANeMVBilhhw0I= MIME-Version: 1.0 Date: Sat, 11 Apr 2009 20:55:23 -0400 Message-ID: Subject: alpha: half done futex implementation From: Matt Turner To: linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org Cc: Ivan Kokshaysky , Richard Henderson , Jay Estabrook , Oliver Falk Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1357 Lines: 42 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/