mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Palmer Dabbelt <palmer@sifive.com>
To: linux-kernel@vger.kernel.org
Cc: patches@groups.riscv.org
Subject: RISC-V: User-Visible ABI Cleanup
Date: Mon, 20 Nov 2017 10:57:41 -0800	[thread overview]
Message-ID: <20171120185745.30795-1-palmer@sifive.com> (raw)

This patch set contains all the user-visible ABI changes that we currently know
about.  There might be a few more as we get through the glibc upstreaming
process, though.  Most of the changes are pretty minor:

* Some VDSO symbols that weren't defined were versioned, which doesn't make any
  sense.
* We were missing some common VDSO entries.
* The instruction cache is flushed when making a dirty page executable.
* A system call (and VDSO entry) has been added to flush the instruction cache.

There's one big, implicit ABI change here: 'fence.i' is no longer meaningful to
execute from Linux userspace, instead users are expected to call the new VDSO
entry.  There's a lot more info in the commit, but the short version is:

* 'fence.i' performs an instruction cache flush on the local hart.
* There's no way for userspace to map threads to harts, so there's no way to
  perform global instrucion cache flushes.
* The supervisor can't trap 'fence.i', so the only other way to maintain
  correct behavior would be to flush the instruction cache before returning to
  userspace.

We don't want to take the performance hit of flushing the instruction cache
every time we return to userspace, so we're breaking the ABI to mandate that
users call the VDSO entry instead of using 'fence.i'.  Since we haven't had a
tarball release of Linux yet, I think this ABI break is still kosher.  Of
course, we won't do this once there's been a release :).

Sorry this was a bit late, but I'm really hoping to get this into 4.15 so we
don't end up with a broken ABI in our first kernel release.

[PATCH 1/4] RISC-V: Remove __vdso_cmpxchg{32,64} symbol versions
[PATCH 2/4] RISC-V: Add VDSO entries for
[PATCH 3/4] RISC-V: Flush I$ when making a dirty page executable
[PATCH 4/4] RISC-V: Allow userspace to flush the instruction cache

             reply	other threads:[~2017-11-20 18:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-20 18:57 Palmer Dabbelt [this message]
2017-11-20 18:57 ` [PATCH 1/4] RISC-V: Remove __vdso_cmpxchg{32,64} symbol versions Palmer Dabbelt
2017-11-20 18:57 ` [PATCH 2/4] RISC-V: Add VDSO entries for clock_get/gettimeofday/getcpu Palmer Dabbelt
2017-11-20 18:57 ` [PATCH 3/4] RISC-V: Flush I$ when making a dirty page executable Palmer Dabbelt
2017-11-21 16:57   ` David Laight
2017-11-22 17:38     ` [patches] " Palmer Dabbelt
2017-11-22 19:03       ` Andrew Waterman
2017-11-30 20:32   ` [patches] " Olof Johansson
2017-11-30 22:50     ` Palmer Dabbelt
2017-11-20 18:57 ` [PATCH 4/4] RISC-V: Allow userspace to flush the instruction cache Palmer Dabbelt
2017-11-21 15:58 ` RISC-V: User-Visible ABI Cleanup Christoph Hellwig
2017-11-21 16:02   ` Palmer Dabbelt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171120185745.30795-1-palmer@sifive.com \
    --to=palmer@sifive.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@groups.riscv.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®