1. 23 Oct, 2018 4 commits
    • Jim Wilson's avatar
      RISC-V: Add futex support. · b90edb33
      Jim Wilson authored
      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: default avatarJim Wilson <jimw@sifive.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarPalmer Dabbelt <palmer@sifive.com>
      b90edb33
    • Jim Wilson's avatar
      RISC-V: Add FP register ptrace support for gdb. · b8c8a959
      Jim Wilson authored
      Add a variable and a macro to describe FP registers, assuming only D is
      supported.  FP code is conditional on CONFIG_FPU.  The FP regs and FCSR
      are copied separately to avoid copying struct padding.  Tested by hand and
      with the gdb testsuite.
      Signed-off-by: default avatarJim Wilson <jimw@sifive.com>
      Signed-off-by: default avatarPalmer Dabbelt <palmer@sifive.com>
      b8c8a959
    • Palmer Dabbelt's avatar
      RISC-V: Mask out the F extension on systems without D · 86e581e3
      Palmer Dabbelt authored
      The RISC-V Linux port doesn't support systems that have the F extension
      but don't have the D extension -- we actually don't support systems
      without D either, but Alan's patch set is rectifying that soon.  For now
      I think we can leave this in a semi-broken state and just wait for
      Alan's patch set to get merged for proper non-FPU support -- the patch
      set is starting to look good, so doing something in-between doesn't seem
      like it's worth the work.
      
      I don't think it's worth fretting about support for systems with F but
      not D for now: our glibc ABIs are IMAC and IMAFDC so they probably won't
      end up being popular.  We can always extend this in the future.
      
      CC: Alan Kao <alankao@andestech.com>
      Signed-off-by: default avatarPalmer Dabbelt <palmer@sifive.com>
      86e581e3
    • Palmer Dabbelt's avatar
      RISC-V: Don't set cacheinfo.{physical_line_partition,attributes} · 1760debb
      Palmer Dabbelt authored
      These are just hard coded in the RISC-V port, which doesn't make any
      sense.  We should probably be setting these from device tree entries
      when they exist, but for now I think it's saner to just leave them all
      as their default values.
      Reviewed-by: default avatarJeremy Linton <jeremy.linton@arm.com>
      Signed-off-by: default avatarPalmer Dabbelt <palmer@sifive.com>
      1760debb
  2. 22 Oct, 2018 8 commits
  3. 21 Oct, 2018 3 commits
  4. 20 Oct, 2018 11 commits
  5. 19 Oct, 2018 13 commits
  6. 18 Oct, 2018 1 commit
    • Stefano Brivio's avatar
      ip6_tunnel: Fix encapsulation layout · d4d576f5
      Stefano Brivio authored
      Commit 058214a4 ("ip6_tun: Add infrastructure for doing
      encapsulation") added the ip6_tnl_encap() call in ip6_tnl_xmit(), before
      the call to ipv6_push_frag_opts() to append the IPv6 Tunnel Encapsulation
      Limit option (option 4, RFC 2473, par. 5.1) to the outer IPv6 header.
      
      As long as the option didn't actually end up in generated packets, this
      wasn't an issue. Then commit 89a23c8b ("ip6_tunnel: Fix missing tunnel
      encapsulation limit option") fixed sending of this option, and the
      resulting layout, e.g. for FoU, is:
      
      .-------------------.------------.----------.-------------------.----- - -
      | Outer IPv6 Header | UDP header | Option 4 | Inner IPv6 Header | Payload
      '-------------------'------------'----------'-------------------'----- - -
      
      Needless to say, FoU and GUE (at least) won't work over IPv6. The option
      is appended by default, and I couldn't find a way to disable it with the
      current iproute2.
      
      Turn this into a more reasonable:
      
      .-------------------.----------.------------.-------------------.----- - -
      | Outer IPv6 Header | Option 4 | UDP header | Inner IPv6 Header | Payload
      '-------------------'----------'------------'-------------------'----- - -
      
      With this, and with 84dad559 ("udp6: fix encap return code for
      resubmitting"), FoU and GUE work again over IPv6.
      
      Fixes: 058214a4 ("ip6_tun: Add infrastructure for doing encapsulation")
      Signed-off-by: default avatarStefano Brivio <sbrivio@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d4d576f5