<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/mips/include/atomic.h, branch release/13.2.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=release%2F13.2.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=release%2F13.2.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2020-01-02T23:20:37Z</updated>
<entry>
<title>[PowerPC] [MIPS] Implement 32-bit kernel emulation of atomic64 operations</title>
<updated>2020-01-02T23:20:37Z</updated>
<author>
<name>Brandon Bergren</name>
<email>bdragon@FreeBSD.org</email>
</author>
<published>2020-01-02T23:20:37Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=9aafc7c0523456c8b5ee8919c97f75277cf4d70b'/>
<id>urn:sha1:9aafc7c0523456c8b5ee8919c97f75277cf4d70b</id>
<content type='text'>
This is a lock-based emulation of 64-bit atomics for kernel use, split off
from an earlier patch by jhibbits.

This is needed to unblock future improvements that reduce the need for
locking on 64-bit platforms by using atomic updates.

The implementation allows for future integration with userland atomic64,
but as that implies going through sysarch for every use, the current
status quo of userland doing its own locking may be for the best.

Submitted by:	jhibbits (original patch), kevans (mips bits)
Reviewed by:	jhibbits, jeff, kevans
Differential Revision:	https://reviews.freebsd.org/D22976
</content>
</entry>
<entry>
<title>Two minor issues:</title>
<updated>2019-12-17T03:20:37Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2019-12-17T03:20:37Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=fa9b4635f0874eedc3d908f2cd21746680c8c2ed'/>
<id>urn:sha1:fa9b4635f0874eedc3d908f2cd21746680c8c2ed</id>
<content type='text'>
(1) Don't define load/store 64 atomics for o32. They aren't atomic
there.
(2) Add comment about why we need 64 atomic define on n32 only.
</content>
</entry>
<entry>
<title>add atomic_load_64 for mipsn32</title>
<updated>2019-10-07T07:42:26Z</updated>
<author>
<name>Andriy Gapon</name>
<email>avg@FreeBSD.org</email>
</author>
<published>2019-10-07T07:42:26Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=eab7984cfe35a346becfe203414be2437878b7ef'/>
<id>urn:sha1:eab7984cfe35a346becfe203414be2437878b7ef</id>
<content type='text'>
It's just an alias for atomic_load_acq_64 (same as on i386).

MFC after:	1 week
</content>
</entry>
<entry>
<title>mips: use generic sub-word atomic *cmpset</title>
<updated>2019-10-02T17:07:59Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2019-10-02T17:07:59Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=281ec62c977aba21b4aa60ed0f532d6a20b669e0'/>
<id>urn:sha1:281ec62c977aba21b4aa60ed0f532d6a20b669e0</id>
<content type='text'>
Most of this diff is refactoring to reduce duplication between the different
acq_ and rel_ variants.

Differential Revision:	https://reviews.freebsd.org/D21822
</content>
</entry>
<entry>
<title>mips: fcmpset: do not spin on sc failure</title>
<updated>2019-10-02T15:13:40Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2019-10-02T15:13:40Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=22c2c971a614a72875787e0fd0001906451ee245'/>
<id>urn:sha1:22c2c971a614a72875787e0fd0001906451ee245</id>
<content type='text'>
For ll/sc architectures, atomic(9) allows failure modes where *old == val
due to write failure and callers should compensate for this. Do not retry on
failure, just leave 0 in ret and fail the operation if we couldn't sc it.
This lets the caller determine if it should retry or not.

Reviewed by:	kib
Looks ok:	imp
Differential Revision:	https://reviews.freebsd.org/D21836
</content>
</entry>
<entry>
<title>atomic_cmpset return value is also an int.</title>
<updated>2018-12-14T19:48:42Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2018-12-14T19:48:42Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3d060215a5013c72b968aa5163833fa31fc92913'/>
<id>urn:sha1:3d060215a5013c72b968aa5163833fa31fc92913</id>
<content type='text'>
</content>
</entry>
<entry>
<title>atomic_fcmpset* return int, not the type of *.</title>
<updated>2018-12-14T19:14:51Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2018-12-14T19:14:51Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=2fb9d3808a3a0a8939502600cde69b04550d1e7d'/>
<id>urn:sha1:2fb9d3808a3a0a8939502600cde69b04550d1e7d</id>
<content type='text'>
fcmpset returns true/false as a int, so make the return types and
variables match the int to be consistent with other arch.

Reviewed by: cognet@
Differential Revision: https://reviews.freebsd.org/D18557
</content>
</entry>
<entry>
<title>Correctly implemenet atomic_swap_long for mips64.</title>
<updated>2018-12-13T00:42:26Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2018-12-13T00:42:26Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=a1128e850e3692714057c0a3632ef5b0436106ad'/>
<id>urn:sha1:a1128e850e3692714057c0a3632ef5b0436106ad</id>
<content type='text'>
MIPS64 has 64-bit longs, so use uint64_t for it, otherwise uint32_t.
sizeof(long) == sizeof(ptr) for all platforms, so define
atomic_swap_ptr in terms of atomic_swap_long.

Submitted by: hps@
</content>
</entry>
<entry>
<title>Implement atomic_swap_xxx() for all platforms.</title>
<updated>2018-12-10T13:38:13Z</updated>
<author>
<name>Hans Petter Selasky</name>
<email>hselasky@FreeBSD.org</email>
</author>
<published>2018-12-10T13:38:13Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=d7a9bfee8f10e6a787ea24581ac0db1040f409aa'/>
<id>urn:sha1:d7a9bfee8f10e6a787ea24581ac0db1040f409aa</id>
<content type='text'>
Differential Revision:	https://reviews.freebsd.org/D18450
Reviewed by:		kib@
MFC after:		3 days
Sponsored by:		Mellanox Technologies
</content>
</entry>
<entry>
<title>Remove mips MD atomic_load_64 and atomic_store_64.</title>
<updated>2017-12-22T23:27:03Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2017-12-22T23:27:03Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=7aea69e54a9df49786f5cf56fcd86dfb4c513b6f'/>
<id>urn:sha1:7aea69e54a9df49786f5cf56fcd86dfb4c513b6f</id>
<content type='text'>
The only users of the functions were db_read_bytes() and
db_write_bytes() ddb(4) interfaces.  Replace the calls with direct
reads and writes, which are automatically atomic on 64bits and n32.

Note that removed assembler implementation for mips32 is not atomic
anyway.

Reviewed by:	jhb
Discussed with:	imp
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D13586
</content>
</entry>
</feed>
