diff -Nru sysmips.c.orig sysmips.c --- sysmips.c.orig Wed Jun 13 11:32:09 2001 +++ sysmips.c Wed Jun 13 11:46:06 2001 @@ -120,7 +120,23 @@ : "r" (&cmd)); /* Unreached */ #else - printk("sys_sysmips(MIPS_ATOMIC_SET, ...) not ready for !CONFIG_CPU_HAS_LLSC\n"); + /* this is handled in assembly now */ + panic("Unexpected MIPS_ATOMIC_SET call in sys_sysmips()"); +#else + int flags; + + /* without ll/sc, we have a broken code that kind of works */ + /* This is broken in case of page faults and SMP ... + Risc/OS fauls after maximum 20 tries with EAGAIN. */ + p = (int *) arg1; + retval = verify_area(VERIFY_WRITE, p, sizeof(*p)); + if (retval) + goto out; + save_and_cli(flags); + retval = *p; + *p = arg2; + restore_flags(flags); + goto out; #endif }