On 18-Nov-00 Ralf Baechle wrote:
> CVSROOT: /home/pub/cvs
> Module name: linux
> Changes by: ralf@oss.sgi.com 00/11/17 17:19:36
>
> Modified files:
> arch/mips/kernel: sysmips.c
>
> Log message:
> Hopefully R3k-proof version of sysmips(MIPS_ATOMIC_SET, ...).
Compiles but will never work on non-ll/sc CPUs, obviously. Wouldn't it be
better to let the compilation fail than to generate code which is known not to
work for R3000?
--
Regards,
Harald
--- snip here ---
diff -ruN /nfs/cvs/linux-2.3/linux/arch/mips/kernel/sysmips.c
linux/arch/mips/kernel/sysmips.c
--- /nfs/cvs/linux-2.3/linux/arch/mips/kernel/sysmips.c Sat Nov 18 14:31:06 2000
+++ linux/arch/mips/kernel/sysmips.c Sat Nov 18 17:56:01 2000
@@ -83,6 +83,7 @@
return errno;
errno = 0;
+#ifdef CONFIG_CPU_HAS_LLSC
__asm__(".set\tpush\t\t\t# sysmips(MIPS_ATOMIC, ...)\n\t"
".set\tmips2\n\t"
".set\tnoat\n\t"
@@ -101,6 +102,9 @@
: "=&r" (tmp), "=o" (* (u32 *) p), "=r" (errno)
: "r" (arg2), "o" (* (u32 *) p), "2" (errno)
: "$1");
+#else
+#error "sys_sysmips(MIPS_ATOMIC_SET, ...): Fixme, I'm broken"
+#endif
if (errno)
return -EFAULT;
|