Miles Lane wrote: > > Hi, > > Yesterday I reported a problem compiling with SMP enabled for an > Athlon-targetted kernel. I wonder whether this is because there > are no Athlon SMP systems out there, yet? If so, then if the > architecture selected is Athlon, the SMP option should not be > available when configuring the kernel tree. If there are SMP > Athlon machines, would someone please follow up on this compile > error? > > Thanks, > Miles > Hello, As far as I know there are no SMP boards yet for Athlon. Nonetheless, here's the patch. Tom
--- v2.4.0-test8/linux/arch/i386/lib/mmx.c.orig Wed Oct 27 21:30:39 1999 +++ linux/arch/i386/lib/mmx.c Tue Jun 6 04:20:01 2000 @@ -1,6 +1,7 @@ #include <linux/types.h> #include <linux/string.h> #include <linux/sched.h> +#include <asm/hardirq.h> /* * MMX 3DNow! library helper functions @@ -88,6 +89,21 @@ stts(); return p; } + +void * __constant_mmx_memcpy3d(void * to, const void * from, size_t len) +{ + if(in_interrupt()) + return __constant_memcpy(to, from, len); + return _mmx_memcpy(to, from, len); +} + +void *__mmx_memcpy3d(void *to, const void *from, size_t len) +{ + if(in_interrupt()) + return __memcpy(to, from, len); + return _mmx_memcpy(to, from, len); +} + static void fast_clear_page(void *page) { --- v2.4.0-test8/linux/include/asm-i386/mmx.h.orig Tue Jun 6 03:05:02 2000 +++ linux/include/asm-i386/mmx.h Tue Jun 6 04:25:27 2000 @@ -10,5 +10,7 @@ extern void *_mmx_memcpy(void *to, const void *from, size_t size); extern void mmx_clear_page(void *page); extern void mmx_copy_page(void *to, void *from); +extern __inline__ void *__constant_mmx_memcpy3d(void * to, const void * from, size_t +len); +extern __inline__ void *__mmx_memcpy3d(void *to, const void *from, size_t len); #endif --- v2.4.0-test8/linux/include/asm-i386/string.h.orig Tue Jun 6 03:05:02 2000 +++ linux/include/asm-i386/string.h Tue Jun 6 04:30:37 2000 @@ -287,13 +287,6 @@ #ifdef CONFIG_X86_USE_3DNOW -/* All this just for in_interrupt() ... */ - -#include <asm/system.h> -#include <asm/ptrace.h> -#include <linux/smp.h> -#include <linux/spinlock.h> -#include <linux/interrupt.h> #include <asm/mmx.h> /* @@ -302,16 +295,16 @@ static inline void * __constant_memcpy3d(void * to, const void * from, size_t len) { - if(len<512 || in_interrupt()) + if(len<512) return __constant_memcpy(to, from, len); - return _mmx_memcpy(to, from, len); + return __constant_mmx_memcpy3d(to, from, len); } extern __inline__ void *__memcpy3d(void *to, const void *from, size_t len) { - if(len<512 || in_interrupt()) + if(len<512) return __memcpy(to, from, len); - return _mmx_memcpy(to, from, len); + return __mmx_memcpy3d(to, from, len); } #define memcpy(t, f, n) \