[parisc-linux] xchg/cmpxchg defined in wrong place?
Grant Grundler
grundler@cup.hp.com
Sat, 30 Dec 2000 17:55:41 -0800
Grant Grundler wrote:
> ok. I'll take a whack at parisc arch and see what happens.
This was easy. Was even able to build/link with DRM and all the
related drivers. Code change committed to parisc-linux CVS:
o removes bogus definition of __xchg_called_with_bad_pointer from setup.c
o definitions follow sparc64 model except I didn't try to inline all
of this mess.
o added __xchgNN() and __cmpxchg_uNN() functions to bitops.c and
declared them in parisc_ksyms.c for CONFIG_MODULES support.
o added "include <asm/atomic.h>" to arch/parisc/kernel/semaphore.c
to make sure it gets the xchg() macro definition.
TODO: DRM should explicitly include asm/atomic.h to pick up
#define __HAVE_ARCH_CMPXCHG directly.
> If it's easy, I'll try the i386 arch as well - mostly
> to build more drivers as a sanity check.
I moved all the xchg/cmpxchg related code from include/asm-i386/system.h
to include/asm-i386/atomic.h and built an x86 kernel (natively) but didn't
boot it. Booting the kernel shouldn't be necessary since mis-use will
result in a linker error (xchg undefined).
I used 2.4.0-test10 since it was handy. Once I get newer Linus
tree, I can cut/paste again and submit the patch to l-k.
Should be able to do this in the next couple of days unless someone
tells me they've done it already.
thanks,
grant