[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

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



From: Martin Habets <errandir_news@mph.eclipse.co.uk>
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 fashion after
> we started using proper versioning systems.
> 
> I've got a ppc->sparc32 compiler if that would help...

So how in the world is something like this going to "work" with DRM?
Userland cannot disable interrupts and it can't take the magic lock
the kernel uses to provide mutual exclusion for the emulated
cmpxchg().

All userland can do is not try to use the atomic operations and always
go into the kernel, which defeats the entire point of the cmpxchg().

Unless something %100 inside of the kernel will be the only consumers
of this, I'd recommend not adding it.  You can't let anything part of
a userland API try to make use of it, and DRM definitely falls into
that category.

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.

Thanks.



Reply to: