aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorJim Wilson2018-10-16 14:42:59 -0700
committerPalmer Dabbelt2018-10-22 17:38:08 -0700
commitb90edb33010bcfb9a0d74681be2cdd52300f1e69 (patch)
treeeaabf46fb352ed526a918ee7fb3ab17be4a4cc61 /net
parentb8c8a9590e4fde82f8c3ee06a521763e6f21e9c8 (diff)
RISC-V: Add futex support.
Here is an attempt to add the missing futex support. I started with the MIPS version of futex.h and modified it until I got it working. I tested it on a HiFive Unleashed running Fedora Core 29 using the fc29 4.15 version of the kernel. This was tested against the glibc testsuite, where it fixes 14 nptl related testsuite failures. That unfortunately only tests the cmpxchg support, so I also used the testcase at the end of https://lwn.net/Articles/148830/ which tests the atomic_op functionality, except that it doesn't verify that the operations are atomic, which they obviously are. This testcase runs successfully with the patch and fails without it. I'm not a kernel expert, so there could be details I got wrong here. I wasn't sure about the memory model support, so I used aqrl which seemed safest, and didn't add fences which seemed unnecessary. I'm not sure about the copyright statements, I left in Ralf Baechle's line because I started with his code. Checkpatch reports some style problems, but it is the same style as the MIPS futex.h, and the uses of ENOSYS appear correct even though it complains about them. I don't know if any of that matters. This patch was tested on qemu with the glibc nptl/tst-cond-except testcase, and the wake_op testcase from above. Signed-off-by: Jim Wilson <jimw@sifive.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions