Re: cmpxchg is not available to generic code

2007-07-23 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

Re: cmpxchg is not available to generic code

2007-07-23 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 DRM

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

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

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

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?

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

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? -

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

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

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

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

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

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.

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. I

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_cmpxchg, which _is_

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? - To

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 acceptable. We

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 that

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?

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 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 architectures in

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