[git commit] libbb: enable fixed 4k pagesize on RISC-V
Denys Vlasenko
vda.linux at googlemail.com
Sun Oct 4 16:40:20 UTC 2026
commit: https://git.busybox.net/busybox/commit/?id=c6c7ab979ee0ef791f2022b20e0559d34481d604
branch: https://git.busybox.net/busybox/log/?h=master
function old new delta
dd_main 2728 2760 +32
time_main 1300 1288 -12
procps_scan 884 868 -16
devmem_main 648 632 -16
hexedit_main 1416 1392 -24
mkswap_main 408 372 -36
alloc_buf 64 - -64
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 1/5 up/down: 32/-168) Total: -136 bytes
Signed-off-by: Karthik D K <karthikdk1998 at gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
include/libbb.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/libbb.h b/include/libbb.h
index 43a44e192..062413fd7 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -460,10 +460,12 @@ void *xmmap_anon(size_t size) FAST_FUNC;
# define BB_ARCH_FIXED_PAGESIZE 4096
#elif defined(__arm__) /* only 32bit, 64bit ARM has variable page size */
# define BB_ARCH_FIXED_PAGESIZE 4096
+#elif defined(__riscv) /* both rv32 and rv64 have fixed page size of 4KiB */
+# define BB_ARCH_FIXED_PAGESIZE 4096
#else /* if defined(ARCH) */
/* add you favorite arch today! */
//From Linux kernel inspection:
-//xtenza,s390[x],riscv,nios2,csky,sparc32: fixed 4k pages
+//xtenza,s390[x],nios2,csky,sparc32: fixed 4k pages
//sparc64,alpha,openrisc: fixed 8k pages
#endif
More information about the busybox-cvs
mailing list