shithub: riscv

Download patch

ref: 44c0e7259800885d0028d8c5352f6760f670132b
parent: 57bf8f165dd5a19c1876278e045a5b6b791ce4dd
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Fri Nov 10 19:01:44 EST 2023

kernel: fix SEGMAXSIZE macro, force 64-bit result

--- a/sys/src/9/port/portdat.h
+++ b/sys/src/9/port/portdat.h
@@ -395,7 +395,7 @@
 #define pagedout(s)	(((uintptr)s)==0 || onswap(s))
 #define swapaddr(s)	(((uintptr)s)&~PG_ONSWAP)
 
-#define SEGMAXSIZE	(SEGMAPSIZE*PTEMAPMEM)
+#define SEGMAXSIZE	(1ULL*SEGMAPSIZE*PTEMAPMEM)
 
 struct Physseg
 {