From: Alan Cox Date: Sun, 17 May 2015 22:11:05 +0000 (+0100) Subject: bank16: fix another swap issue X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=4f01e6744fc573925f06f2e34f18d2e0b051cc99;p=FUZIX.git bank16: fix another swap issue --- diff --git a/Kernel/bank16k.c b/Kernel/bank16k.c index 2d5304a8..6d780240 100644 --- a/Kernel/bank16k.c +++ b/Kernel/bank16k.c @@ -74,6 +74,9 @@ static int maps_needed(uint16_t top) * Allocate the maps for this task post fork * We have a hackish fix for init that would be nice * resolve. + * + * FIXME: we need to move udata.u_top into p-> in order to + * support banked swapping. */ int pagemap_alloc(ptptr p) { @@ -171,7 +174,7 @@ int swapout(ptptr p) uint16_t base = SWAPBASE; uint16_t size = (0x4000 - SWAPBASE) >> 9; uint16_t i; - uint8_t *pt = (uint8_t *)&p->page; + uint8_t *pt = (uint8_t *)&p->p_page; if (page) panic("process already swapped!\n"); @@ -214,7 +217,7 @@ void swapin(ptptr p, uint16_t map) uint16_t base = SWAPBASE; uint16_t size = (0x4000 - SWAPBASE) >> 9; uint16_t i; - uint8_t *pt = (uint8_t *)&p->page; + uint8_t *pt = (uint8_t *)&p->p_page; #ifdef DEBUG kprintf("Swapin %x, %d\n", p, p->p_page);