Thread (5 messages) 5 messages, 2 authors, 2007-06-13

smp_mb() in asm-mips/bitops.h

From: Atsushi Nemoto <hidden>
Date: 2007-06-07 07:53:34

I found some funny usages of smp_mb() in asm-mips/bitops.h:

static inline int test_and_set_bit(unsigned long nr,
	volatile unsigned long *addr)
{
	if (cpu_has_llsc && R10000_LLSC_WAR) {
...
		return res != 0;
	} else if (cpu_has_llsc) {
...
		return res != 0;
	} else {
...
		return retval;
	}

	smp_mb();
}

It looks this smp_mb() never have any effects.  This change is from:
commit 0004a9dfeaa709a7f853487aba19932c9b1a87c8
Author: Ralf Baechle [off-list ref]
Date:   Tue Oct 31 03:45:07 2006 +0000

    [MIPS] Cleanup memory barriers for weakly ordered systems.
at 2.6.18 development cycle.

---
Atsushi Nemoto
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help