diff mbox series

[v3,16/29] riscv: Add <bits/pagesize.h>

Message ID d17ce3756ff69b8eea07b0d23f18aa76009871e1.1727624528.git.fweimer@redhat.com
State New
Headers show
Series Teach glibc about possible page sizes and handle gaps in ld.so | expand

Commit Message

Florian Weimer Sept. 29, 2024, 4:29 p.m. UTC
The GNU toolchain defaults to 4 KiB as the maximum page size,
and this is also the only page size supported by Linux
(according to arch/riscv/Kconfig; only HAVE_PAGE_SIZE_4KB is used).

There has been a proposal for 64 KiB page sizes:

  [RFC PATCH V1 00/11] riscv: Introduce 64K base page
  <https://lore.kernel.org/linux-riscv/20231123065708.91345-1-luxu.kernel@bytedance.com/>

But this has not been merged, and it would be necessary to rebuild
all binaries anyway due to the toolchain default, so this commit
claims that the page size is fixed at 4096 bytes.
---
 sysdeps/riscv/bits/pagesize.h | 2 ++
 1 file changed, 2 insertions(+)
 create mode 100644 sysdeps/riscv/bits/pagesize.h
diff mbox series

Patch

diff --git a/sysdeps/riscv/bits/pagesize.h b/sysdeps/riscv/bits/pagesize.h
new file mode 100644
index 0000000000..352fb732d7
--- /dev/null
+++ b/sysdeps/riscv/bits/pagesize.h
@@ -0,0 +1,2 @@ 
+#define __GLIBC_PAGE_SHIFT_MIN 12
+#define __GLIBC_PAGE_SHIFT_MAX 12