summaryrefslogtreecommitdiffstats
path: root/sys/mips/rmi
diff options
context:
space:
mode:
authoravg <avg@FreeBSD.org>2010-12-13 14:30:35 +0000
committeravg <avg@FreeBSD.org>2010-12-13 14:30:35 +0000
commit7ea0322de478d2c781cc693fb43380dd4f8f8020 (patch)
tree26319fb10c70d3e25b1e391d5c15560b25e83755 /sys/mips/rmi
parent759c9ca8f23c09e92735160d2fb9e3fe30671f6b (diff)
downloadFreeBSD-src-7ea0322de478d2c781cc693fb43380dd4f8f8020.zip
FreeBSD-src-7ea0322de478d2c781cc693fb43380dd4f8f8020.tar.gz
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
Diffstat (limited to 'sys/mips/rmi')
-rw-r--r--sys/mips/rmi/dev/xlr/rge.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/mips/rmi/dev/xlr/rge.c b/sys/mips/rmi/dev/xlr/rge.c
index e6bc6da..913084f 100644
--- a/sys/mips/rmi/dev/xlr/rge.c
+++ b/sys/mips/rmi/dev/xlr/rge.c
@@ -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;
OpenPOWER on IntegriCloud