My two cents to this discussion. I consider both of these macros (write_can_lock and read_can_lock) brain-damaged as they do not guarantee anything. That's why I haven't copied the read_can_lock macro - it is not used in the sparc kernel and let it be this way. The write_can_lock is used in one place only - in ptrace.c file when it is used to add a little efficiency into a waiting for two spinlocks to be free. I suppose this call can be removed but I afraid changing it. A whole idea there is simple: obtain one lock, try to obtain another one and if it is not successful use the write_can_lock macro to wait before repeating former steps. I think that without this macro the waiting may become less efficient - more trials of obtaining lock will be made. See the code below: repeat: /* * Nasty, nasty. * * We want to hold both the task-lock and the * tasklist_lock for writing at the same time. * But that's against the rules (tasklist_lock * is taken for reading by interrupts on other * cpu's that may have task_lock). */ task_lock(task); local_irq_disable(); if (!write_trylock(&tasklist_lock)) { local_irq_enable(); task_unlock(task); do { cpu_relax(); } while (!write_can_lock(&tasklist_lock)); goto repeat; } There is no need for this macro to be 100% accurate. It is enough to be conservative as Bob Breuer suggested (it should not spin waiting either). The other way is to remove the call to write_can_lock from the code above. I beg you (sparc32 maintainers) to start pushing smp patches (or even parts of them) into the kernel tree. I have another patch which clears sun4m_smp.c a little (replaced loops with for_each_online_cpu, removed one unused global variable) but this will stop Bob Breuer's patch from applying so I wait sitting on it. I am able to boot a dual SM81 in SS20 with all the smp patches from this list, but the kernel hangs on first module load. It is something I will investigate. Regards, Krzysztof ---------------------------------------------------- Nowe serie superksiążek o Czarodziejkach WITCH! Poznaj świat bohaterek WITCH! Will, Irma, Taranee, Cornelia i Hay-Lin zapraszają do księgarni. http://klik.wp.pl/?adr=http%3A%2F%2Fadv.reklama.wp.pl%2Fas%2Fwitch.html&sid=781 - To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html