mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Dave Airlie" <airlied@gmail.com>
To: "David Miller" <davem@davemloft.net>
Cc: akpm@linux-foundation.org, airlied@linux.ie,
	linux-kernel@vger.kernel.org
Subject: Re: cmpxchg is not available to generic code
Date: Thu, 19 Jul 2007 18:15:03 +1000	[thread overview]
Message-ID: <21d7e9970707190115r15e691d5s123c9889a8ebd8a5@mail.gmail.com> (raw)
In-Reply-To: <20070719.002716.30181989.davem@davemloft.net>

On 7/19/07, David Miller <davem@davemloft.net> wrote:
> From: Andrew Morton <akpm@linux-foundation.org>
> Date: Thu, 19 Jul 2007 00:05:49 -0700
>
> > What's that code doing anyway?  driver-private locking primitives?
>
> It's an atomic lock shared with userspace.  Whatever implementation is
> used to do the lock on that object must be identical in the userspace
> DRM bits.
>
> Unlike futex, the lock operation on the user side isn't optional.
> So if the platform can't do a true cmpxchg it generally cannot
> support DRM.

Actually in  theory the userspace side is optional, it should fallback
to always entering the kernel and being slow, but Ive no idea how
well that codepath is tested... but it's an area I'd hate to play with
now ..

Maybe we could add CONFIG_HAVE_CMPXCHG and let DRM depend on it..

Dave.

  reply	other threads:[~2007-07-19  8:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-19  7:05 Andrew Morton
2007-07-19  7:27 ` David Miller
2007-07-19  8:15   ` Dave Airlie [this message]
2007-07-19  8:21     ` Andrew Morton
2007-07-19  8:23       ` Dave Airlie
2007-07-23  6:48         ` Nick Piggin
2007-07-19 20:54       ` David Miller
2007-07-19 20:58     ` David Miller
2007-07-19  8:02 ` Dave Airlie
2007-07-19  8:10   ` Andrew Morton
2007-07-19  8:19     ` Dave Airlie
2007-07-19  8:36       ` Andrew Morton

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=21d7e9970707190115r15e691d5s123c9889a8ebd8a5@mail.gmail.com \
    --to=airlied@gmail.com \
    --cc=airlied@linux.ie \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --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®