Bug 2554
Summary: | DRM fails to compile on i386 | ||
---|---|---|---|
Product: | Drivers | Reporter: | Denis Pilon (dpilon) |
Component: | Video(DRI - non Intel) | Assignee: | Dave Airlie (airlied) |
Status: | REJECTED WILL_NOT_FIX | ||
Severity: | normal | ||
Priority: | P2 | ||
Hardware: | i386 | ||
OS: | Linux | ||
Kernel Version: | 2.4.26 | Subsystem: | |
Regression: | --- | Bisected commit-id: |
Description
Denis Pilon
2004-04-20 20:08:01 UTC
The following patch removes the i386 cmpxchg from being defined again: diff -Nur linux-2.4.26/drivers/char/drm/drmP.h linux- 2.4.26.patched/drivers/char/drm/drmP.h --- linux-2.4.26/drivers/char/drm/drmP.h Wed Feb 18 08:36:31 2004 +++ linux-2.4.26.patched/drivers/char/drm/drmP.h Tue Apr 20 13:10:47 2004 @@ -173,39 +173,7 @@ (__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_, \ (unsigned long)_n_, sizeof(*(ptr))); \ }) - -#elif __i386__ -static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, - unsigned long new, int size) -{ - unsigned long prev; - switch (size) { - case 1: - __asm__ __volatile__(LOCK_PREFIX "cmpxchgb %b1,%2" - : "=a"(prev) - : "q"(new), "m"(*__xg(ptr)), "0"(old) - : "memory"); - return prev; - case 2: - __asm__ __volatile__(LOCK_PREFIX "cmpxchgw %w1,%2" - : "=a"(prev) - : "q"(new), "m"(*__xg(ptr)), "0"(old) - : "memory"); - return prev; - case 4: - __asm__ __volatile__(LOCK_PREFIX "cmpxchgl %1,%2" - : "=a"(prev) - : "q"(new), "m"(*__xg(ptr)), "0"(old) - : "memory"); - return prev; - } - return old; -} - -#define cmpxchg(ptr,o,n) \ - ((__typeof__(*(ptr)))__cmpxchg((ptr),(unsigned long)(o), \ - (unsigned long)(n),sizeof(*(ptr)))) -#endif /* i386 & alpha */ +#endif /* alpha */ #endif #define __REALLY_HAVE_SG (__HAVE_SG) this is a 2.4 only problem I doubt it'll ever get fixed in 2.4 unless someone really cares.. |