mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier.adi@gmail.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linux-kernel@vger.kernel.org, Paul Mundt <lethal@linux-sh.org>
Subject: making asm-generic/futex.h completely usable
Date: Fri, 3 Jul 2009 04:14:05 -0400	[thread overview]
Message-ID: <8bd0f97a0907030114g459863e9l829a6291e990b9cf@mail.gmail.com> (raw)

ive been reading up on futexes of late and have been poking around the
futex kernel pieces to see what is needed to get Blackfin working with
it.

Blackfin falls into the "no hardware atomic instructions" category as
can easily be seen in our atomic.h: disable interrupts, do
load/stores, restore interrupts.  my understanding of the
futex_atomic_op_inuser() function is that this runs in process
context, so this same interrupt trick should work fine.  which leads
me to wonder why doesnt the asm-generic/futex.h header already take
this approach ?

seems to me that the SuperH implementation fits the bill nicely.
their arch/sh/include/asm/futex-irq.h looks like it could be literally
straight copied into asm-generic/futex.h thus making it fully
functional for everyone by default.

also, the futex_atomic_op_inuser() function itself seems to largely be
copy & paste between architectures ... the only differences are in the
atomic functions called by FUTEX_OP_XXX.  so perhaps the structure of
the header should follow that of asm-generic/uaccess.h in that arches
can override specific functions while still getting the rest for free
?
-mike

             reply	other threads:[~2009-07-03  8:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-03  8:14 Mike Frysinger [this message]
2009-07-03 15:51 ` Arnd Bergmann
2009-07-03 18:12   ` Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8bd0f97a0907030114g459863e9l829a6291e990b9cf@mail.gmail.com \
    --to=vapier.adi@gmail.com \
    --cc=arnd@arndb.de \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®