Re: cmpxchg is not available to generic code

2007-07-22 Thread Nick Piggin
Dave Airlie wrote: On 7/19/07, Andrew Morton <[EMAIL PROTECTED]> wrote: On Thu, 19 Jul 2007 18:15:03 +1000 "Dave Airlie" <[EMAIL PROTECTED]> wrote: > Maybe we could add CONFIG_HAVE_CMPXCHG and let DRM depend on it.. That would certainly be better than adding a sprinkle of architectures in DR

Re: cmpxchg is not available to generic code

2007-07-19 Thread David Miller
From: "Dave Airlie" <[EMAIL PROTECTED]> Date: Thu, 19 Jul 2007 18:15:03 +1000 > Maybe we could add CONFIG_HAVE_CMPXCHG and let DRM depend on it.. There is already a "!EMULATED_CMPXCHG" guarding DRM, perhaps ARM's Kconfig can set that if appropriate. - To unsubscribe from this list: send the line

Re: cmpxchg is not available to generic code

2007-07-19 Thread David Miller
From: Andrew Morton <[EMAIL PROTECTED]> Date: Thu, 19 Jul 2007 01:21:41 -0700 > On Thu, 19 Jul 2007 18:15:03 +1000 "Dave Airlie" <[EMAIL PROTECTED]> wrote: > > > Maybe we could add CONFIG_HAVE_CMPXCHG and let DRM depend on it.. > > That would certainly be better than adding a sprinkle of archite

Re: cmpxchg is not available to generic code

2007-07-19 Thread Dave Airlie
they need to grow a userpsace cmpxchg as davem mentioned to go along with this, changing the drm now isn't possible due to backwards compat.. For reference purposes, that position is not acceptable. We _never_ accept the "oh I can't change my proposed kernel interface because I already have

Re: cmpxchg is not available to generic code

2007-07-19 Thread Dave Airlie
On 7/19/07, David Miller <[EMAIL PROTECTED]> wrote: From: Andrew Morton <[EMAIL PROTECTED]> 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 th

Re: cmpxchg is not available to generic code

2007-07-19 Thread Dave Airlie
arm: drivers/char/drm/drm_lock.c: In function `drm_lock_take': drivers/char/drm/drm_lock.c:221: error: implicit declaration of function `cmpxchg' You might be able to use atomic_cmpxchg, which _is_ present on all architectures. Or use a spinlock. What's that code doing anyway? driver-priv

Re: cmpxchg is not available to generic code

2007-07-19 Thread Andrew Morton
On Thu, 19 Jul 2007 09:19:10 +0100 (IST) Dave Airlie <[EMAIL PROTECTED]> wrote: > > > >> they need to grow a userpsace > >> cmpxchg as davem mentioned to go along with this, changing the drm now > >> isn't possible due to backwards compat.. > > > > For reference purposes, that position is not acce

Re: cmpxchg is not available to generic code

2007-07-19 Thread Andrew Morton
On Thu, 19 Jul 2007 18:15:03 +1000 "Dave Airlie" <[EMAIL PROTECTED]> wrote: > Maybe we could add CONFIG_HAVE_CMPXCHG and let DRM depend on it.. That would certainly be better than adding a sprinkle of architectures in DRM Kconfig dependencies. I don't know how important DRM is on ARM. Zero? - T

Re: cmpxchg is not available to generic code

2007-07-19 Thread Andrew Morton
On Thu, 19 Jul 2007 09:02:03 +0100 (IST) Dave Airlie <[EMAIL PROTECTED]> wrote: > > > > arm: > > > > drivers/char/drm/drm_lock.c: In function `drm_lock_take': > > drivers/char/drm/drm_lock.c:221: error: implicit declaration of function > > `cmpxchg' > > > > You might be able to use atomic_cmpxc

Re: cmpxchg is not available to generic code

2007-07-19 Thread Dave Airlie
On 7/19/07, Andrew Morton <[EMAIL PROTECTED]> wrote: On Thu, 19 Jul 2007 18:15:03 +1000 "Dave Airlie" <[EMAIL PROTECTED]> wrote: > Maybe we could add CONFIG_HAVE_CMPXCHG and let DRM depend on it.. That would certainly be better than adding a sprinkle of architectures in DRM Kconfig dependencies

Re: cmpxchg is not available to generic code

2007-07-19 Thread David Miller
From: Andrew Morton <[EMAIL PROTECTED]> 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.

cmpxchg is not available to generic code

2007-07-19 Thread Andrew Morton
arm: drivers/char/drm/drm_lock.c: In function `drm_lock_take': drivers/char/drm/drm_lock.c:221: error: implicit declaration of function `cmpxchg' You might be able to use atomic_cmpxchg, which _is_ present on all architectures. Or use a spinlock. What's that code doing anyway? driver-private