mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* RISC-V: User-Visible ABI Cleanup
@ 2017-11-20 18:57 Palmer Dabbelt
  2017-11-20 18:57 ` [PATCH 1/4] RISC-V: Remove __vdso_cmpxchg{32,64} symbol versions Palmer Dabbelt
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Palmer Dabbelt @ 2017-11-20 18:57 UTC (permalink / raw)
  To: linux-kernel; +Cc: patches

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-11-30 22:50 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-20 18:57 RISC-V: User-Visible ABI Cleanup Palmer Dabbelt
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

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®