svn commit: r216408 - head/sys/mips/rmi/dev/xlr
Andriy Gapon
avg at FreeBSD.org
Mon Dec 13 14:30:35 UTC 2010
Author: avg
Date: Mon Dec 13 14:30:35 2010
New Revision: 216408
URL: http://svn.freebsd.org/changeset/base/216408
Log:
fix mips build breakage introduced in r216375: atomic_store_int doesn't exists
1) 32-bit assignment are expected to always be atomic.
2) Release/acquire memory barrier semantics doesn't seem to be needed here.
So a simple assignment can be used.
Remove unused port_set_counter() while here, it also used to mis-use
atomic_set_int().
Reported by: jhb
Pointyhat to: avg
MFC after: 3 weeks
Modified:
head/sys/mips/rmi/dev/xlr/rge.c
Modified: head/sys/mips/rmi/dev/xlr/rge.c
==============================================================================
--- head/sys/mips/rmi/dev/xlr/rge.c Mon Dec 13 13:52:03 2010 (r216407)
+++ head/sys/mips/rmi/dev/xlr/rge.c Mon Dec 13 14:30:35 2010 (r216408)
@@ -170,10 +170,8 @@ extern uint32_t cpu_ltop_map[32];
static int port_counters[4][8] __aligned(XLR_CACHELINE_SIZE);
#define port_inc_counter(port, counter) atomic_add_int(&port_counters[port][(counter)], 1)
-#define port_set_counter(port, counter, value) atomic_store_int(&port_counters[port][(counter)], (value))
#else
#define port_inc_counter(port, counter) /* Nothing */
-#define port_set_counter(port, counter, value) /* Nothing */
#endif
int xlr_rge_tx_prepend[MAXCPU];
@@ -2281,7 +2279,7 @@ rmi_xlr_mac_open(struct rge_softc *sc)
mtx_unlock_spin(&priv->lock);
for (i = 0; i < 8; i++) {
- atomic_store_int(&(priv->frin_to_be_sent[i]), 0);
+ priv->frin_to_be_sent[i] = 0;
}
return 0;
More information about the svn-src-head
mailing list