Skip to content

Commit 954260f

Browse files
charlie-rivospalmer-dabbelt
authored andcommitted
Revert "RISC-V: mm: Document mmap changes"
This mmap behavior caused unintended breakages so the behavior has been changed. Signed-off-by: Charlie Jenkins <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 8400291 commit 954260f

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

Documentation/arch/riscv/vm-layout.rst

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -134,19 +134,3 @@ RISC-V Linux Kernel SV57
134134
ffffffff00000000 | -4 GB | ffffffff7fffffff | 2 GB | modules, BPF
135135
ffffffff80000000 | -2 GB | ffffffffffffffff | 2 GB | kernel
136136
__________________|____________|__________________|_________|____________________________________________________________
137-
138-
139-
Userspace VAs
140-
--------------------
141-
To maintain compatibility with software that relies on the VA space with a
142-
maximum of 48 bits the kernel will, by default, return virtual addresses to
143-
userspace from a 48-bit range (sv48). This default behavior is achieved by
144-
passing 0 into the hint address parameter of mmap. On CPUs with an address space
145-
smaller than sv48, the CPU maximum supported address space will be the default.
146-
147-
Software can "opt-in" to receiving VAs from another VA space by providing
148-
a hint address to mmap. When a hint address is passed to mmap, the returned
149-
address will never use more bits than the hint address. For example, if a hint
150-
address of `1 << 40` is passed to mmap, a valid returned address will never use
151-
bits 41 through 63. If no mappable addresses are available in that range, mmap
152-
will return `MAP_FAILED`.

0 commit comments

Comments
 (0)