Re: [RFT] [SPARC] Emulate cmpxchg like parisc

2007-05-30 Thread Martin Habets
On Tue, May 29, 2007 at 01:59:31PM -0700, David Miller wrote: From: Martin Habets [EMAIL PROTECTED] Date: Tue, 29 May 2007 21:30:45 +0100 On Tue, May 29, 2007 at 01:12:33AM -0700, David Miller wrote: From: Martin Habets [EMAIL PROTECTED] Date: Tue, 29 May 2007 00:37:01 +0100

Re: [RFT] [SPARC] Emulate cmpxchg like parisc

2007-05-29 Thread David Miller
From: Martin Habets [EMAIL PROTECTED] Date: Tue, 29 May 2007 21:30:45 +0100 On Tue, May 29, 2007 at 01:12:33AM -0700, David Miller wrote: From: Martin Habets [EMAIL PROTECTED] Date: Tue, 29 May 2007 00:37:01 +0100 Good to see someone has a crystal ball handy. So a patch like like this

Re: [RFT] [SPARC] Emulate cmpxchg like parisc

2007-05-28 Thread Martin Habets
On Sun, May 27, 2007 at 07:49:21PM -0700, David Miller wrote: From: Martin Habets [EMAIL PROTECTED] Date: Mon, 28 May 2007 01:07:46 +0100 On Sat, May 26, 2007 at 03:59:21PM -0700, David Miller wrote: Alternatively we can have a KCONFIG variable with reversed logic, like

Re: [RFT] [SPARC] Emulate cmpxchg like parisc

2007-05-27 Thread Martin Habets
On Sat, May 26, 2007 at 03:59:21PM -0700, David Miller wrote: Alternatively we can have a KCONFIG variable with reversed logic, like EMULATED_CMPXCHG which only the atomically challenged platforms need to set. Like this idea, but if we're not going to build DRM I see no point adding the

Re: [RFT] [SPARC] Emulate cmpxchg like parisc

2007-05-27 Thread Kyle McMartin
On Sun, May 27, 2007 at 07:49:21PM -0700, David Miller wrote: From: Martin Habets [EMAIL PROTECTED] Date: Mon, 28 May 2007 01:07:46 +0100 On Sat, May 26, 2007 at 03:59:21PM -0700, David Miller wrote: Alternatively we can have a KCONFIG variable with reversed logic, like

Re: [RFT] [SPARC] Emulate cmpxchg like parisc

2007-05-26 Thread Kyle McMartin
On Fri, May 25, 2007 at 10:00:36PM -0700, David Miller wrote: After some minor fixes this builds, and the DRM drivers also build again. I cannot test this since I do not have a machine with PCI or these cards. Removed your name in the comment, as that went out of fashion after we started

Re: [RFT] [SPARC] Emulate cmpxchg like parisc

2007-05-26 Thread Martin Habets
On Fri, May 25, 2007 at 10:00:36PM -0700, David Miller wrote: From: Martin Habets [EMAIL PROTECTED] Date: Sat, 26 May 2007 01:24:40 +0100 Hi Kyle, After some minor fixes this builds, and the DRM drivers also build again. I cannot test this since I do not have a machine with PCI or

Re: [RFT] [SPARC] Emulate cmpxchg like parisc

2007-05-26 Thread Dave Airlie
My knowledge of the DRM is weak, but as I understand it, the only time it is used is by the ioctl handlers, and not by userspace. I've added Dave Airlie to the CC list, hopefully he can enlighten us as to where else cmpxchg is used. Unless something %100 inside of the kernel will be the only

Re: [RFT] [SPARC] Emulate cmpxchg like parisc

2007-05-26 Thread David Miller
From: Kyle McMartin [EMAIL PROTECTED] Date: Sat, 26 May 2007 10:45:09 -0400 On Fri, May 25, 2007 at 10:00:36PM -0700, David Miller wrote: After some minor fixes this builds, and the DRM drivers also build again. I cannot test this since I do not have a machine with PCI or these cards.

Re: [RFT] [SPARC] Emulate cmpxchg like parisc

2007-05-26 Thread David Miller
From: Dave Airlie [EMAIL PROTECTED] Date: Sat, 26 May 2007 21:32:10 +0100 (IST) the DRM can use cmpxchg in userspace, to implement DRM_CAS, have a look in drm git libdrm/xf86drm.h we appear to have a sparc implementation, this gives us fast userspace locking, however if an arch doesn't

Re: [RFT] [SPARC] Emulate cmpxchg like parisc

2007-05-26 Thread David Miller
From: Kyle McMartin [EMAIL PROTECTED] Date: Sat, 26 May 2007 19:41:34 -0400 I don't see what the problem is? If we can't do it in userspace, we fall back to a heavyweight ioctl lock. This sounds sensible to me. On parisc we implement userspace CAS with a lightweight syscall on our gateway

[RFT] [SPARC] Emulate cmpxchg like parisc

2007-05-25 Thread Kyle McMartin
Signed-off-by: Kyle McMartin [EMAIL PROTECTED] --- PS: Anyone have a nice prebuilt i386-sparc{32,64} xcompiler setup I could snag? Would be nice to testbuild these patches before I send them out next time. diff --git a/arch/sparc/lib/atomic32.c b/arch/sparc/lib/atomic32.c index 559335f..a45caca

Re: [RFT] [SPARC] Emulate cmpxchg like parisc

2007-05-25 Thread David Miller
From: Martin Habets [EMAIL PROTECTED] Date: Sat, 26 May 2007 01:24:40 +0100 Hi Kyle, After some minor fixes this builds, and the DRM drivers also build again. I cannot test this since I do not have a machine with PCI or these cards. Removed your name in the comment, as that went out of

Re: [RFT] [SPARC] Emulate cmpxchg like parisc

2007-05-25 Thread Tom \spot\ Callaway
On Fri, 2007-05-25 at 22:00 -0700, David Miller wrote: Sparc 32-bit barely has PCI let alone 3D graphics cards. If it's a build issue, simply disallow DRM to be turned on for SPARC32. I was really wondering about this one. I'd assumed DRM was already conditionalized out for sparc32. ~spot