mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@davemloft.net>
To: rmk+lkml@arm.linux.org.uk
Cc: nickpiggin@yahoo.com.au, zippel@linux-m68k.org,
	Linux-Kernel@vger.kernel.org, dipankar@in.ibm.com
Subject: Re: [PATCH 5/5] remove HAVE_ARCH_CMPXCHG
Date: Wed, 14 Sep 2005 15:26:10 -0700 (PDT)	[thread overview]
Message-ID: <20050914.152610.15194310.davem@davemloft.net> (raw)
In-Reply-To: <20050914230352.G30746@flint.arm.linux.org.uk>

From: Russell King <rmk+lkml@arm.linux.org.uk>
Date: Wed, 14 Sep 2005 23:03:53 +0100

> What business has userspace got of telling whether cmpxchg works on
> an architecture by looking at kernel headers?

Russell, please don't fly off the handle like this.

Nick is talking about something slightly different.

Things, for example, like DRM assume there is a cmpxchg()
they can use in the kernel and userland for interlocking.

DRM doesn't actually _check_ anything to see if this is the case, it
just so happens to only get enabled on platforms where cmpxchg() is
available in this fashion.

What Nick is suggesting is to actually move HAVE_ARCH_CMPXCHG or
something like it into the Kconfig so that things like DRM can
actually do the correct dependency check.  If you want something like
"HAVE_ARCH_CMPXCHG_WHICH_CAN_INTERFACE_WITH_USERSPACE" that DRM can
check too, all the better.

It's not about whether userspace can include some kernel header
and get cmpxchg(), it's whether there is some way that a cmpxchg()
shared semaphore between userspace and kernel is possible, which
things like DRM depend upon having available.

  reply	other threads:[~2005-09-14 22:26 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-14 14:48 [PATCH 1/5] atomic: introduce atomic_cmpxchg Nick Piggin
2005-09-14 14:49 ` [PATCH 2/5] atomic: introduce atomic_inc_not_zero Nick Piggin
2005-09-14 14:51   ` [PATCH 3/5] rcu file: use atomic primitives Nick Piggin
2005-09-14 14:55     ` [PATCH 4/5] atomic: dec_and_lock use cmpxchg Nick Piggin
2005-09-14 15:01       ` [PATCH 5/5] remove HAVE_ARCH_CMPXCHG Nick Piggin
2005-09-14 16:31         ` Roman Zippel
2005-09-14 16:49           ` Nick Piggin
2005-09-14 17:59             ` David S. Miller
2005-09-14 22:03             ` Russell King
2005-09-14 22:26               ` David S. Miller [this message]
2005-09-15  7:10                 ` Russell King
2005-09-15 13:08         ` Alan Cox
2005-09-14 15:20       ` [PATCH 4/5] atomic: dec_and_lock use cmpxchg Nick Piggin
2005-09-14 16:24       ` David S. Miller
2005-09-14 16:52         ` Nick Piggin
2005-09-17  0:05           ` David S. Miller
2005-09-14 16:16   ` [PATCH 2/5] atomic: introduce atomic_inc_not_zero Roman Zippel
2005-09-14 16:44     ` Nick Piggin
2005-09-14 17:04       ` Nick Piggin
2005-09-14 17:18       ` Roman Zippel
2005-09-14 22:00         ` Russell King
2005-09-14 22:10           ` Roman Zippel
2005-09-14 22:21             ` Russell King
2005-09-15  1:51               ` Nick Piggin
2005-09-17  1:15                 ` Roman Zippel
2005-09-17  6:36                   ` Andrew Morton
2005-09-17 10:01                     ` Roman Zippel
2005-09-17  7:19                   ` David S. Miller
2005-09-17  7:34                   ` Dipankar Sarma
2005-09-18  8:08                   ` Nick Piggin
2005-09-17  0:59               ` Roman Zippel
2005-09-17  7:18                 ` David S. Miller
2005-09-17  7:27                   ` Russell King
2005-09-18  6:03                     ` David S. Miller
2005-09-14 15:17 ` [PATCH 1/5] atomic: introduce atomic_cmpxchg Russell King
2005-09-14 15:22   ` Nick Piggin

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=20050914.152610.15194310.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=Linux-Kernel@vger.kernel.org \
    --cc=dipankar@in.ibm.com \
    --cc=nickpiggin@yahoo.com.au \
    --cc=rmk+lkml@arm.linux.org.uk \
    --cc=zippel@linux-m68k.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®