From: Palmer Dabbelt <[email protected]>
The RISC-V ISA manual used to mandate that misaligned accesses were
supported in user mode, but that requirement was removed in 2018 via
riscv-isa-manual commit 61cadb9 ("Provide new description of misaligned
load/store behavior compatible with privileged architecture."). Since
the Linux uABI was already frozen at that point it's just been demoted
to part of the uABI, but that was never written down.
Signed-off-by: Palmer Dabbelt <[email protected]>
---
We currently rely on either hardware or M-mode to support misaligned
accesses. It's probably worth supporting the PR_SET_UNALIGN so
userspace can opt out of the emulation routines, but we can't break the
uABI so we're stuck with defaulting to them on for now. Doing so would
also require some way of informing M-mode that unsupported accesses
shouldn't be emulated.
---
Documentation/riscv/index.rst | 1 +
Documentation/riscv/uabi.rst | 6 ++++++
2 files changed, 7 insertions(+)
create mode 100644 Documentation/riscv/uabi.rst
diff --git a/Documentation/riscv/index.rst b/Documentation/riscv/index.rst
index e23b876ad6eb..2e5b18fbb145 100644
--- a/Documentation/riscv/index.rst
+++ b/Documentation/riscv/index.rst
@@ -8,6 +8,7 @@ RISC-V architecture
boot-image-header
vm-layout
patch-acceptance
+ uabi
features
diff --git a/Documentation/riscv/uabi.rst b/Documentation/riscv/uabi.rst
new file mode 100644
index 000000000000..21a82cfb6c4d
--- /dev/null
+++ b/Documentation/riscv/uabi.rst
@@ -0,0 +1,6 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+RISC-V Linux User ABI
+=====================
+
+Misaligned accesses are supported in userspace, but they may perform poorly.
--
2.34.1
On Thu, 28 Jul 2022 14:07:15 -0700, Palmer Dabbelt wrote:
> From: Palmer Dabbelt <[email protected]>
>
> The RISC-V ISA manual used to mandate that misaligned accesses were
> supported in user mode, but that requirement was removed in 2018 via
> riscv-isa-manual commit 61cadb9 ("Provide new description of misaligned
> load/store behavior compatible with privileged architecture."). Since
> the Linux uABI was already frozen at that point it's just been demoted
> to part of the uABI, but that was never written down.
>
> [...]
Applied, thanks!
[1/1] doc: RISC-V: Document that misaligned accesses are supported
commit: 06267eb2decaa6baac81bbd882265a8e7782dba4
Best regards,
--
Palmer Dabbelt <[email protected]>