<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-openbsd/sys/arch/hppa/include/atomic.h, branch jd/queueboosts</title>
<subtitle>WireGuard implementation for the OpenBSD kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-openbsd/atom/sys/arch/hppa/include/atomic.h?h=jd%2Fqueueboosts</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-openbsd/atom/sys/arch/hppa/include/atomic.h?h=jd%2Fqueueboosts'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/'/>
<updated>2018-05-14T09:33:20Z</updated>
<entry>
<title>Expose memory barriers to userland.</title>
<updated>2018-05-14T09:33:20Z</updated>
<author>
<name>kettenis</name>
<email>kettenis@openbsd.org</email>
</author>
<published>2018-05-14T09:33:20Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=ca950ec43995bb7d9640f1f39d8be4c78a3e7360'/>
<id>urn:sha1:ca950ec43995bb7d9640f1f39d8be4c78a3e7360</id>
<content type='text'>
ok visa@, mpi@
</content>
</entry>
<entry>
<title>make __cpu_simple_lock provide serialisation of the critical section.</title>
<updated>2016-02-09T06:46:02Z</updated>
<author>
<name>dlg</name>
<email>dlg@openbsd.org</email>
</author>
<published>2016-02-09T06:46:02Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=219fa1133a6cab8f5c345bfbe2016ac4da803913'/>
<id>urn:sha1:219fa1133a6cab8f5c345bfbe2016ac4da803913</id>
<content type='text'>
that in turn makes atomic sequences actually atomic, which in turn
means the refcnt api asserts wont fire erronously when if_get and
if_put are actually used correctly.

such embarrassment.

reported by landry@ who also let me debug on the affected machines
ok jmatthew@
</content>
</entry>
<entry>
<title>jmatthew@ points out atomic_swap_foo takes two arguments, not three.</title>
<updated>2014-09-24T06:34:37Z</updated>
<author>
<name>dlg</name>
<email>dlg@openbsd.org</email>
</author>
<published>2014-09-24T06:34:37Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=3480ef410d836ac34acc833ddbf19d74957a15e7'/>
<id>urn:sha1:3480ef410d836ac34acc833ddbf19d74957a15e7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>implement atomic_{cas,swap}_{uint,ulong,ptr} and</title>
<updated>2014-09-22T12:12:23Z</updated>
<author>
<name>dlg</name>
<email>dlg@openbsd.org</email>
</author>
<published>2014-09-22T12:12:23Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=8bf031b6c9d14bce74cd445f935fd079a0ae10a6'/>
<id>urn:sha1:8bf031b6c9d14bce74cd445f935fd079a0ae10a6</id>
<content type='text'>
atomic_{add,sub}_{int,long}_nv. sys/atomic.h turns these into the
rest of the atomic api.

on uniprocessor hppa systems "atomic" operations are implemented
as a non-interruptable sequence by disabling all interrupts on the
cpu, doing the operation, and then restoring the interrupt mask.

this isnt enough on MP systems, so we added a global atomic memory
mutex that is taken inside the interrupt disabling above to coordinate
operations between cpus.

this is a lot of overhead though cos mutexes dance around with ipls,
which is unecessary in our case because of the interrupt disabling
that is already done. also, hppa spinlocks are implemented with
ldcw which requires the word it operates on to be 16 byte aligned.
mutexes arent guaranteed to have this alignment so they compensate
by having lots of words inside themselves so they can hit the
appropriate one to use for the ldcw op.

with this in mind, this change pulls __cpu_simple_locks, which are
simply ldcw spinlocks with a 16 byte aligned word, out of
src/sys/arch/hppa/include/lock.h into src/sys/arch/hppa/include/atomic.h
so atomic.h can use them. lock.h includes atomic.h, so it still
gets and provides the same functionality as before.

finally, this also pulls the rwlock cas implementation apart. cas
ops now share the same serialising lock on MP systems as the other
memory operations, and rw_cas is defined as a wrapper around
atomic_cas_uint.

ok kettenis@
</content>
</entry>
<entry>
<title>Implement the membar(9) API for hppa.</title>
<updated>2014-06-17T19:49:53Z</updated>
<author>
<name>kettenis</name>
<email>kettenis@openbsd.org</email>
</author>
<published>2014-06-17T19:49:53Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=095af81feeb0931df8b31371d073c848b431d697'/>
<id>urn:sha1:095af81feeb0931df8b31371d073c848b431d697</id>
<content type='text'>
ok miod@, dlg@, guenther@
</content>
</entry>
<entry>
<title>It's been a quarter century: we can assume volatile is present with that name.</title>
<updated>2014-03-29T18:09:28Z</updated>
<author>
<name>guenther</name>
<email>guenther@openbsd.org</email>
</author>
<published>2014-03-29T18:09:28Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=2df76cc2a0aee2cb2166e3799b7bb5c3f883f83d'/>
<id>urn:sha1:2df76cc2a0aee2cb2166e3799b7bb5c3f883f83d</id>
<content type='text'>
ok dlg@ mpi@ deraadt@
</content>
</entry>
<entry>
<title>Normalize sentinel. Use _MACHINE_*_H_ and _&lt;ARCH&gt;_*_H_ properly and consitently.</title>
<updated>2011-03-23T16:54:33Z</updated>
<author>
<name>pirofti</name>
<email>pirofti@openbsd.org</email>
</author>
<published>2011-03-23T16:54:33Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=2fa72412907ae78c4787a4a8f888c5f0486e225c'/>
<id>urn:sha1:2fa72412907ae78c4787a4a8f888c5f0486e225c</id>
<content type='text'>
Discussed and okay drahn@. Okay deraadt@.
</content>
</entry>
<entry>
<title>Use a mutex to make atomic operations atomic on multiprocessor kernels.</title>
<updated>2010-06-27T00:04:44Z</updated>
<author>
<name>jsing</name>
<email>jsing@openbsd.org</email>
</author>
<published>2010-06-27T00:04:44Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=7dda6ca755a19f3180569d751f06136030e33332'/>
<id>urn:sha1:7dda6ca755a19f3180569d751f06136030e33332</id>
<content type='text'>
ok kettenis@
</content>
</entry>
<entry>
<title>Proper atomic_{set,clear}bits_{int,long} implementation, and use it for</title>
<updated>2007-04-26T20:52:48Z</updated>
<author>
<name>miod</name>
<email>miod@openbsd.org</email>
</author>
<published>2007-04-26T20:52:48Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=f8b1aca581460905e05ce5918c46bc607fcd64d5'/>
<id>urn:sha1:f8b1aca581460905e05ce5918c46bc607fcd64d5</id>
<content type='text'>
softintr(); ok mickey@
</content>
</entry>
<entry>
<title>only make this interface available to the kernel for now, discussed witha</title>
<updated>2007-02-19T17:18:40Z</updated>
<author>
<name>deraadt</name>
<email>deraadt@openbsd.org</email>
</author>
<published>2007-02-19T17:18:40Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=8aa3ef09f5622dd8eb8f6d30eb7512c48ec87f8b'/>
<id>urn:sha1:8aa3ef09f5622dd8eb8f6d30eb7512c48ec87f8b</id>
<content type='text'>
rt and such; tested and ok miod drahn
</content>
</entry>
</feed>
