From: Alan Cox Date: Tue, 8 Jan 2019 17:02:53 +0000 (+0000) Subject: bank8k: allow for no zero base X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=73a11cfb13e9f2d73fcd02f328ad494d73b88adc;p=FUZIX.git bank8k: allow for no zero base Tormod's patch worked by changing pagemap_realloc to pass top not size. In fact we want to pass size so that - We don't break any other banking code - We can still sanely handle platforms with multiple processes per bank where pagemap_realloc has a real job. It's not quite that simple there are some other 32bit changes it would need, but lets not dig a hole to fall down --- diff --git a/Kernel/bank8k.c b/Kernel/bank8k.c index e482b3ec..9b291fc9 100644 --- a/Kernel/bank8k.c +++ b/Kernel/bank8k.c @@ -216,7 +216,7 @@ int pagemap_alloc(ptptr p) int pagemap_realloc(usize_t code, usize_t size, usize_t stack) { int8_t have = maps_needed(udata.u_top); - int8_t want = maps_needed(size); + int8_t want = maps_needed(size + MAPBASE); uint8_t *ptr = (uint8_t *)udata.u_page; int i;